Deployments.ai Docs
Governance

Create an immutable audit export

POST /v1/organizations/{id}/audit-exports · SDK createImmutableAuditExport · CLI deployments governance audit-export

POST
/v1/organizations/{id}/audit-exports

Requires governance:write. A suspended organization can still call it.

Authorization

platformBearer
headerAuthorizationBearer <token>

Platform bearer credential accepted as an opaque API key or JWT.

Path Parameters

id*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Header Parameters

x-deployments-organization*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
idempotency-key*string
Length1 <= length <= 512

Response Body

ImmutableAuditExportResponse

application/json
  1. response
completedAt?string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
createdAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
error?
expiresAt?string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
id*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
organizationId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
startedAt?string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
status*string
Value in"canceled""completed""failed""pending""running"
summary?
updatedAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
version*integer
Range1 <= value
kind*"audit-export"
Value in"audit-export"
output?
curl -X POST "https://example.com/v1/organizations/string/audit-exports" \  -H "x-deployments-organization: string" \  -H "idempotency-key: string"
{  "completedAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "error": {    "property1": null,    "property2": null  },  "expiresAt": "2019-08-24T14:15:22Z",  "id": "string",  "organizationId": "string",  "startedAt": "2019-08-24T14:15:22Z",  "status": "canceled",  "summary": {    "property1": null,    "property2": null  },  "updatedAt": "2019-08-24T14:15:22Z",  "version": 1,  "kind": "audit-export",  "output": {    "downloadUrl": "string",    "downloadUrlExpiresAt": "2019-08-24T14:15:22Z",    "fileName": "string",    "sha256": "string",    "sizeBytes": 0,    "archiveDownloadUrl": "string",    "archiveDownloadUrlExpiresAt": "2019-08-24T14:15:22Z",    "archiveFileName": "string",    "archiveSha256": "string",    "archiveSizeBytes": 0,    "contentType": "application/json",    "immutable": true  }}