AuditExport


GET /orgs/{orgId}/audit-export/config

Get the audit-export config

Org owner/admin only. Returns the masked S3 export config or 404 when not configured.

Auth: Bearer token required

Path parameters

NameTypeDescription
orgIdstring

Responses

StatusDescriptionSchema
200OKAuditExportConfig
401UnauthorizedError
403ForbiddenError
404Not FoundError

POST /orgs/{orgId}/audit-export/config

Upsert the audit-export config

Org owner/admin only. Create or update the S3 audit-export configuration.

Auth: Bearer token required

Path parameters

NameTypeDescription
orgIdstring

Request body (application/json)

FieldTypeDescription
bucketstringS3 bucket name (required)
regionstringAWS region (required)
roleArnstringIAM role ARN for assume-role (required)
enabledbooleanEnable/disable export

Responses

StatusDescriptionSchema
201CreatedAuditExportConfig
401UnauthorizedError
403ForbiddenError
404Not FoundError

POST /orgs/{orgId}/audit-export/test-connection

Test the audit-export S3 connection

Org owner/admin only. Performs a write+delete dry-run against the configured/provided bucket.

Auth: Bearer token required

Path parameters

NameTypeDescription
orgIdstring

Request body (application/json)

FieldTypeDescription
bucketstringS3 bucket name (required)
regionstringAWS region (required)
roleArnstringIAM role ARN for assume-role (required)

Responses

StatusDescriptionSchema
200OKAuditExportTestResult
401UnauthorizedError
403ForbiddenError
404Not FoundError

GET /orgs/{orgId}/audit-export/runs

List audit-export runs

Org owner/admin only. Returns recent export batch runs, newest-first.

Auth: Bearer token required

Path parameters

NameTypeDescription
orgIdstring

Query parameters

NameTypeDescription
limitintegerMax results (default 20, max 100)

Responses

StatusDescriptionSchema
200OKAuditExportRunList
401UnauthorizedError
403ForbiddenError
404Not FoundError

Schemas

AuditExportConfig

FieldTypeDescription
idstring(required)
orgIdstring(required)
bucketstring(required)
regionstring(required)
roleArnMaskedstring(required)
enabledboolean(required)
lastTestedAtstring | null(required)
lastTestOkboolean | null(required)
lastErrorstring | null(required)
lastExportedAtstring | null(required)
createdAtstring(required)
updatedAtstring(required)

AuditExportRun

FieldTypeDescription
idstring(required)
orgIdstring(required)
startedAtstring(required)
completedAtstring | null(required)
eventCountinteger(required)
bytesinteger(required)
successboolean(required)
errorstring | null(required)
s3Keystring | null(required)

AuditExportRunList

Type: AuditExportRun[]

AuditExportTestResult

FieldTypeDescription
successboolean(required)
errorstring

Error

FieldTypeDescription
errorstring(required)
codestring