mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 15:28:25 +00:00
Update get/export audit logs spec
This commit is contained in:
+8
-68
@@ -320,7 +320,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "offset",
|
"name": "offset",
|
||||||
"description": "Number of versions to skip",
|
"description": "Number of logs to skip before starting to return logs for pagination",
|
||||||
"required": false,
|
"required": false,
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"schema": {
|
"schema": {
|
||||||
@@ -329,7 +329,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "limit",
|
"name": "limit",
|
||||||
"description": "Maximum number of versions to return",
|
"description": "Maximum number of logs to return for pagination",
|
||||||
"required": false,
|
"required": false,
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"schema": {
|
"schema": {
|
||||||
@@ -338,7 +338,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "startDate",
|
"name": "startDate",
|
||||||
"description": "Filter logs from the provided date",
|
"description": "Filter logs from this date in ISO-8601 format",
|
||||||
"required": false,
|
"required": false,
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"schema": {
|
"schema": {
|
||||||
@@ -347,7 +347,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "endDate",
|
"name": "endDate",
|
||||||
"description": "Filter logs till the provided date",
|
"description": "Filter logs till this date in ISO-8601 format",
|
||||||
"required": false,
|
"required": false,
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"schema": {
|
"schema": {
|
||||||
@@ -356,7 +356,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "eventType",
|
"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,
|
"required": false,
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"schema": {
|
"schema": {
|
||||||
@@ -365,7 +365,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "userAgentType",
|
"name": "userAgentType",
|
||||||
"description": "Type of event",
|
"description": "Filter by type of user agent such as web, cli, k8-operator, or other",
|
||||||
"required": false,
|
"required": false,
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"schema": {
|
"schema": {
|
||||||
@@ -374,7 +374,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "actor",
|
"name": "actor",
|
||||||
"description": "Source of operation. It can be user, service token etc",
|
"description": "Filter by actor such as user or service",
|
||||||
"required": false,
|
"required": false,
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"schema": {
|
"schema": {
|
||||||
@@ -405,8 +405,7 @@
|
|||||||
},
|
},
|
||||||
"security": [
|
"security": [
|
||||||
{
|
{
|
||||||
"apiKeyAuth": [],
|
"apiKeyAuth": []
|
||||||
"bearerAuth": []
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -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": {
|
"/api/v2/workspace/{workspaceId}/tags": {
|
||||||
|
|||||||
@@ -583,8 +583,7 @@ export const getWorkspaceAuditLogs = async (req: Request, res: Response) => {
|
|||||||
#swagger.description = 'Return audit logs'
|
#swagger.description = 'Return audit logs'
|
||||||
|
|
||||||
#swagger.security = [{
|
#swagger.security = [{
|
||||||
"apiKeyAuth": [],
|
"apiKeyAuth": []
|
||||||
"bearerAuth": []
|
|
||||||
}]
|
}]
|
||||||
|
|
||||||
#swagger.parameters['workspaceId'] = {
|
#swagger.parameters['workspaceId'] = {
|
||||||
@@ -595,43 +594,43 @@ export const getWorkspaceAuditLogs = async (req: Request, res: Response) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#swagger.parameters['offset'] = {
|
#swagger.parameters['offset'] = {
|
||||||
"description": "Number of versions to skip",
|
"description": "Number of logs to skip before starting to return logs for pagination",
|
||||||
"required": false,
|
"required": false,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
|
|
||||||
#swagger.parameters['limit'] = {
|
#swagger.parameters['limit'] = {
|
||||||
"description": "Maximum number of versions to return",
|
"description": "Maximum number of logs to return for pagination",
|
||||||
"required": false,
|
"required": false,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
|
|
||||||
#swagger.parameters['startDate'] = {
|
#swagger.parameters['startDate'] = {
|
||||||
"description": "Filter logs from the provided date",
|
"description": "Filter logs from this date in ISO-8601 format",
|
||||||
"required": false,
|
"required": false,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
|
|
||||||
#swagger.parameters['endDate'] = {
|
#swagger.parameters['endDate'] = {
|
||||||
"description": "Filter logs till the provided date",
|
"description": "Filter logs till this date in ISO-8601 format",
|
||||||
"required": false,
|
"required": false,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
|
|
||||||
#swagger.parameters['eventType'] = {
|
#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,
|
"required": false,
|
||||||
"type": "string",
|
"type": "string",
|
||||||
}
|
}
|
||||||
|
|
||||||
#swagger.parameters['userAgentType'] = {
|
#swagger.parameters['userAgentType'] = {
|
||||||
"description": "Type of event",
|
"description": "Filter by type of user agent such as web, cli, k8-operator, or other",
|
||||||
"required": false,
|
"required": false,
|
||||||
"type": "string",
|
"type": "string",
|
||||||
}
|
}
|
||||||
|
|
||||||
#swagger.parameters['actor'] = {
|
#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,
|
"required": false,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Export"
|
title: "Export"
|
||||||
openapi: "GET /api/v1/{workspaceId}/audit-logs"
|
openapi: "GET /api/v1/workspace/{workspaceId}/audit-logs"
|
||||||
---
|
---
|
||||||
|
|||||||
+9
-50
@@ -202,43 +202,45 @@ paths:
|
|||||||
type: string
|
type: string
|
||||||
description: ID of the workspace where to get folders from
|
description: ID of the workspace where to get folders from
|
||||||
- name: offset
|
- name: offset
|
||||||
description: Number of versions to skip
|
description: Number of logs to skip before starting to return logs for pagination
|
||||||
required: false
|
required: false
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
- name: limit
|
- name: limit
|
||||||
description: Maximum number of versions to return
|
description: Maximum number of logs to return for pagination
|
||||||
required: false
|
required: false
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
- name: startDate
|
- name: startDate
|
||||||
description: Filter logs from the provided date
|
description: Filter logs from this date in ISO-8601 format
|
||||||
required: false
|
required: false
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
- name: endDate
|
- name: endDate
|
||||||
description: Filter logs till the provided date
|
description: Filter logs till this date in ISO-8601 format
|
||||||
required: false
|
required: false
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
- name: eventType
|
- 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
|
required: false
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
- name: userAgentType
|
- name: userAgentType
|
||||||
description: Type of event
|
description: Filter by type of user agent such as web, cli, k8-operator, or other
|
||||||
required: false
|
required: false
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
- name: actor
|
- name: actor
|
||||||
description: Source of operation. It can be user, service token etc
|
description: Filter by actor such as user or service
|
||||||
required: false
|
required: false
|
||||||
in: query
|
in: query
|
||||||
schema:
|
schema:
|
||||||
@@ -258,7 +260,6 @@ paths:
|
|||||||
description: List of audit log
|
description: List of audit log
|
||||||
security:
|
security:
|
||||||
- apiKeyAuth: []
|
- apiKeyAuth: []
|
||||||
bearerAuth: []
|
|
||||||
/api/v1/workspace/{workspaceId}/audit-logs/filters/actors:
|
/api/v1/workspace/{workspaceId}/audit-logs/filters/actors:
|
||||||
get:
|
get:
|
||||||
description: ''
|
description: ''
|
||||||
@@ -2913,48 +2914,6 @@ paths:
|
|||||||
example: dev
|
example: dev
|
||||||
required:
|
required:
|
||||||
- environmentSlug
|
- 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:
|
/api/v2/workspace/{workspaceId}/tags:
|
||||||
get:
|
get:
|
||||||
description: ''
|
description: ''
|
||||||
|
|||||||
Reference in New Issue
Block a user