AuditExport


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

Get the audit-export config

Org-scoped (admin/owner). Returns the masked S3 export config or 404 when not configured.

Auth: Bearer token required

Path parameters

NameTypeDescription
orgIdstring

Responses

StatusDescriptionSchema
200Audit-export config (roleArn masked)AuditExportConfig
404Not configuredError

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

Upsert the audit-export config

Org-scoped (admin/owner). Create or update the S3 audit-export configuration.

Auth: Bearer token required

Path parameters

NameTypeDescription
orgIdstring

Request body (application/json)

FieldTypeDescription
bucketstring(required)
regionstring(required)
roleArnstring(required)
enabledboolean

Responses

StatusDescriptionSchema
201Stored configAuditExportConfig
404Org not foundError

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

Test the audit-export S3 connection

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

Auth: Bearer token required

Path parameters

NameTypeDescription
orgIdstring

Request body (application/json)

FieldTypeDescription
bucketstring(required)
regionstring(required)
roleArnstring(required)
enabledboolean

Responses

StatusDescriptionSchema
200Connection test resultAuditExportTestResult
404Org not foundError

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

List audit-export runs

Org-scoped (admin/owner). Returns recent export batch runs, newest-first.

Auth: Bearer token required

Path parameters

NameTypeDescription
orgIdstring

Responses

StatusDescriptionSchema
200Export runsAuditExportRunList
404Org not 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)

AuditExportRunList

Type: object[]

AuditExportTestResult

FieldTypeDescription
successboolean(required)
errorstring

Error

FieldTypeDescription
errorstring(required)
codestring