mirror of
https://github.com/Infisical/infisical.git
synced 2026-01-09 15:38:03 -05:00
docs(api-reference): updated audit log endpoint
This commit is contained in:
@@ -699,9 +699,12 @@ export const SECRET_IMPORTS = {
|
|||||||
|
|
||||||
export const AUDIT_LOGS = {
|
export const AUDIT_LOGS = {
|
||||||
EXPORT: {
|
EXPORT: {
|
||||||
workspaceId: "The ID of the project to export audit logs from.",
|
projectId:
|
||||||
|
"Optionally filter logs by project ID. If not provided, logs from the entire organization will be returned.",
|
||||||
eventType: "The type of the event to export.",
|
eventType: "The type of the event to export.",
|
||||||
userAgentType: "Choose which consuming application to export audit logs for.",
|
userAgentType: "Choose which consuming application to export audit logs for.",
|
||||||
|
eventMetadata:
|
||||||
|
"Filter by event metadata key-value pairs. Formatted as `key1=value1,key2=value2`, with comma-separation.",
|
||||||
startDate: "The date to start the export from.",
|
startDate: "The date to start the export from.",
|
||||||
endDate: "The date to end the export at.",
|
endDate: "The date to end the export at.",
|
||||||
offset: "The offset to start from. If you enter 10, it will start from the 10th audit log.",
|
offset: "The offset to start from. If you enter 10, it will start from the 10th audit log.",
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export const registerOrgRouter = async (server: FastifyZodProvider) => {
|
|||||||
schema: {
|
schema: {
|
||||||
description: "Get all audit logs for an organization",
|
description: "Get all audit logs for an organization",
|
||||||
querystring: z.object({
|
querystring: z.object({
|
||||||
projectId: z.string().optional(),
|
projectId: z.string().optional().describe(AUDIT_LOGS.EXPORT.projectId),
|
||||||
actorType: z.nativeEnum(ActorType).optional(),
|
actorType: z.nativeEnum(ActorType).optional(),
|
||||||
// eventType is split with , for multiple values, we need to transform it to array
|
// eventType is split with , for multiple values, we need to transform it to array
|
||||||
eventType: z
|
eventType: z
|
||||||
@@ -102,7 +102,8 @@ export const registerOrgRouter = async (server: FastifyZodProvider) => {
|
|||||||
},
|
},
|
||||||
{} as Record<string, string>
|
{} as Record<string, string>
|
||||||
);
|
);
|
||||||
}),
|
})
|
||||||
|
.describe(AUDIT_LOGS.EXPORT.eventMetadata),
|
||||||
startDate: z.string().datetime().optional().describe(AUDIT_LOGS.EXPORT.startDate),
|
startDate: z.string().datetime().optional().describe(AUDIT_LOGS.EXPORT.startDate),
|
||||||
endDate: z.string().datetime().optional().describe(AUDIT_LOGS.EXPORT.endDate),
|
endDate: z.string().datetime().optional().describe(AUDIT_LOGS.EXPORT.endDate),
|
||||||
offset: z.coerce.number().default(0).describe(AUDIT_LOGS.EXPORT.offset),
|
offset: z.coerce.number().default(0).describe(AUDIT_LOGS.EXPORT.offset),
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Export"
|
title: "Export"
|
||||||
openapi: "GET /api/v1/workspace/{workspaceId}/audit-logs"
|
openapi: "GET /api/v1/organization/audit-logs"
|
||||||
---
|
---
|
||||||
|
|||||||
Reference in New Issue
Block a user