diff --git a/backend/spec.json b/backend/spec.json index eb4a1d488..1f9c0a498 100644 --- a/backend/spec.json +++ b/backend/spec.json @@ -320,7 +320,7 @@ }, { "name": "offset", - "description": "Number of versions to skip", + "description": "Number of logs to skip before starting to return logs for pagination", "required": false, "in": "query", "schema": { @@ -329,7 +329,7 @@ }, { "name": "limit", - "description": "Maximum number of versions to return", + "description": "Maximum number of logs to return for pagination", "required": false, "in": "query", "schema": { @@ -338,7 +338,7 @@ }, { "name": "startDate", - "description": "Filter logs from the provided date", + "description": "Filter logs from this date in ISO-8601 format", "required": false, "in": "query", "schema": { @@ -347,7 +347,7 @@ }, { "name": "endDate", - "description": "Filter logs till the provided date", + "description": "Filter logs till this date in ISO-8601 format", "required": false, "in": "query", "schema": { @@ -356,7 +356,7 @@ }, { "name": "eventType", - "description": "Type of event", + "description": "Filter by type of event such as get-secrets, get-secret, create-secret, update-secret, delete-secret, etc.", "required": false, "in": "query", "schema": { @@ -365,7 +365,7 @@ }, { "name": "userAgentType", - "description": "Type of event", + "description": "Filter by type of user agent such as web, cli, k8-operator, or other", "required": false, "in": "query", "schema": { @@ -374,7 +374,7 @@ }, { "name": "actor", - "description": "Source of operation. It can be user, service token etc", + "description": "Filter by actor such as user or service", "required": false, "in": "query", "schema": { @@ -405,8 +405,7 @@ }, "security": [ { - "apiKeyAuth": [], - "bearerAuth": [] + "apiKeyAuth": [] } ] } @@ -4684,65 +4683,6 @@ } } } - }, - "get": { - "summary": "Get all accessible environments of a workspace", - "description": "Fetch all environments that the user has access to in a specified workspace", - "parameters": [ - { - "name": "workspaceId", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "ID of the workspace" - } - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "accessibleEnvironments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "example": "Development" - }, - "slug": { - "type": "string", - "example": "development" - }, - "isWriteDenied": { - "type": "boolean", - "example": false - }, - "isReadDenied": { - "type": "boolean", - "example": false - } - } - } - } - }, - "description": "List of environments the user has access to in the specified workspace" - } - } - } - } - }, - "security": [ - { - "apiKeyAuth": [] - } - ] } }, "/api/v2/workspace/{workspaceId}/tags": { diff --git a/backend/src/ee/controllers/v1/workspaceController.ts b/backend/src/ee/controllers/v1/workspaceController.ts index c58814e9c..fd068373b 100644 --- a/backend/src/ee/controllers/v1/workspaceController.ts +++ b/backend/src/ee/controllers/v1/workspaceController.ts @@ -583,8 +583,7 @@ export const getWorkspaceAuditLogs = async (req: Request, res: Response) => { #swagger.description = 'Return audit logs' #swagger.security = [{ - "apiKeyAuth": [], - "bearerAuth": [] + "apiKeyAuth": [] }] #swagger.parameters['workspaceId'] = { @@ -595,43 +594,43 @@ export const getWorkspaceAuditLogs = async (req: Request, res: Response) => { } #swagger.parameters['offset'] = { - "description": "Number of versions to skip", + "description": "Number of logs to skip before starting to return logs for pagination", "required": false, "type": "string" } #swagger.parameters['limit'] = { - "description": "Maximum number of versions to return", + "description": "Maximum number of logs to return for pagination", "required": false, "type": "string" } #swagger.parameters['startDate'] = { - "description": "Filter logs from the provided date", + "description": "Filter logs from this date in ISO-8601 format", "required": false, "type": "string" } #swagger.parameters['endDate'] = { - "description": "Filter logs till the provided date", + "description": "Filter logs till this date in ISO-8601 format", "required": false, "type": "string" } #swagger.parameters['eventType'] = { - "description": "Type of event", + "description": "Filter by type of event such as get-secrets, get-secret, create-secret, update-secret, delete-secret, etc.", "required": false, "type": "string", } #swagger.parameters['userAgentType'] = { - "description": "Type of event", + "description": "Filter by type of user agent such as web, cli, k8-operator, or other", "required": false, "type": "string", } #swagger.parameters['actor'] = { - "description": "Source of operation. It can be user, service token etc", + "description": "Filter by actor such as user or service", "required": false, "type": "string" } diff --git a/docs/api-reference/endpoints/audit-logs/export-audit-log.mdx b/docs/api-reference/endpoints/audit-logs/export-audit-log.mdx index 6dce23eef..aa5adb004 100644 --- a/docs/api-reference/endpoints/audit-logs/export-audit-log.mdx +++ b/docs/api-reference/endpoints/audit-logs/export-audit-log.mdx @@ -1,4 +1,4 @@ --- title: "Export" -openapi: "GET /api/v1/{workspaceId}/audit-logs" +openapi: "GET /api/v1/workspace/{workspaceId}/audit-logs" --- diff --git a/docs/spec.yaml b/docs/spec.yaml index 2d1d0292e..366c05438 100644 --- a/docs/spec.yaml +++ b/docs/spec.yaml @@ -202,43 +202,45 @@ paths: type: string description: ID of the workspace where to get folders from - name: offset - description: Number of versions to skip + description: Number of logs to skip before starting to return logs for pagination required: false in: query schema: type: string - name: limit - description: Maximum number of versions to return + description: Maximum number of logs to return for pagination required: false in: query schema: type: string - name: startDate - description: Filter logs from the provided date + description: Filter logs from this date in ISO-8601 format required: false in: query schema: type: string - name: endDate - description: Filter logs till the provided date + description: Filter logs till this date in ISO-8601 format required: false in: query schema: type: string - name: eventType - description: Type of event + description: >- + Filter by type of event such as get-secrets, get-secret, + create-secret, update-secret, delete-secret, etc. required: false in: query schema: type: string - name: userAgentType - description: Type of event + description: Filter by type of user agent such as web, cli, k8-operator, or other required: false in: query schema: type: string - name: actor - description: Source of operation. It can be user, service token etc + description: Filter by actor such as user or service required: false in: query schema: @@ -258,7 +260,6 @@ paths: description: List of audit log security: - apiKeyAuth: [] - bearerAuth: [] /api/v1/workspace/{workspaceId}/audit-logs/filters/actors: get: description: '' @@ -2913,48 +2914,6 @@ paths: example: dev required: - environmentSlug - get: - summary: Get all accessible environments of a workspace - description: >- - Fetch all environments that the user has access to in a specified - workspace - parameters: - - name: workspaceId - in: path - required: true - schema: - type: string - description: ID of the workspace - responses: - '200': - description: OK - content: - application/json: - schema: - type: object - properties: - accessibleEnvironments: - type: array - items: - type: object - properties: - name: - type: string - example: Development - slug: - type: string - example: development - isWriteDenied: - type: boolean - example: false - isReadDenied: - type: boolean - example: false - description: >- - List of environments the user has access to in the specified - workspace - security: - - apiKeyAuth: [] /api/v2/workspace/{workspaceId}/tags: get: description: ''