feat(audit-log): added doc for export endpoint

This commit is contained in:
Akhil Mohan
2023-11-22 17:04:09 +05:30
parent 9d9e830d73
commit 89ae3070ce
7 changed files with 445 additions and 47 deletions

View File

@@ -0,0 +1,4 @@
---
title: "Export"
openapi: "GET /api/v1/{workspaceId}/audit-logs"
---

View File

@@ -1,4 +1,4 @@
---
title: "Create"
openapi: "POST /api/v2/workspace/{workspaceId}/environments"
---
openapi: "POST /api/v1/workspace/{workspaceId}/environments"
---

View File

@@ -380,6 +380,10 @@
{
"group": "Service Tokens",
"pages": ["api-reference/endpoints/service-tokens/get"]
},
{
"group": "Audit Logs",
"pages": ["api-reference/endpoints/audit-logs/export-audit-log"]
}
]
},

View File

@@ -192,16 +192,73 @@ paths:
description: Version of secret snapshot to roll back to
/api/v1/workspace/{workspaceId}/audit-logs:
get:
description: ''
summary: Return audit logs
description: Return audit logs
parameters:
- name: workspaceId
in: path
required: true
schema:
type: string
description: ID of the workspace where to get folders from
- name: offset
description: Number of versions to skip
required: false
in: query
schema:
type: string
- name: limit
description: Maximum number of versions to return
required: false
in: query
schema:
type: string
- name: startDate
description: Filter logs from the provided date
required: false
in: query
schema:
type: string
- name: endDate
description: Filter logs till the provided date
required: false
in: query
schema:
type: string
- name: eventType
description: Type of event
required: false
in: query
schema:
type: string
- name: userAgentType
description: Type of event
required: false
in: query
schema:
type: string
- name: actor
description: Source of operation. It can be user, service token etc
required: false
in: query
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
auditLogs:
type: array
items:
$ref: '#/components/schemas/AuditLog'
description: List of audit log
security:
- apiKeyAuth: []
bearerAuth: []
/api/v1/workspace/{workspaceId}/audit-logs/filters/actors:
get:
description: ''
@@ -691,6 +748,28 @@ paths:
responses:
'200':
description: OK
/api/v1/admin/config:
get:
description: ''
responses:
'200':
description: OK
patch:
description: ''
responses:
'200':
description: OK
/api/v1/admin/signup:
post:
description: ''
parameters:
- name: user-agent
in: header
schema:
type: string
responses:
'200':
description: OK
/api/v1/bot/{workspaceId}:
get:
description: ''
@@ -4342,6 +4421,45 @@ components:
createdAt:
type: string
example: '2023-01-13T14:16:12.210Z'
AuditLog:
type: object
properties:
actor:
type: object
properties:
type:
type: string
example: ''
metadata:
type: object
properties: {}
organization:
type: string
example: ''
workspace:
type: string
example: ''
ipAddress:
type: string
example: ''
event:
type: object
properties:
type:
type: string
example: ''
metadata:
type: object
properties: {}
userAgent:
type: string
example: ''
userAgentType:
type: string
example: ''
expiresAt:
type: string
example: ''
securitySchemes:
bearerAuth:
type: http