PT EN

Exportação de conformidade

URL base: $BUSINESS_API

O objecto

idstring · opcional
statusstring · opcional

um de queued, running, completed, failed

file_namestring · opcional
size_bytesinteger · opcional
sha256string · opcional
audit_chain_verifiedboolean · opcional
errorstring · opcional
download_urlstring · opcional
created_atstring (date-time) · opcional
started_atstring (date-time) · opcional
completed_atstring (date-time) · opcional
O objecto
{
  "id": "com_2iGtfOIPN6mnFkwXXuCbD6uJj8K",
  "status": "queued",
  "file_name": "Ana Matsinhe",
  "size_bytes": 1,
  "sha256": "sha256",
  "audit_chain_verified": true,
  "error": "error",
  "download_url": "https://example.org/",
  "created_at": "2026-11-19T09:30:00Z",
  "started_at": "2026-11-19T09:30:00Z",
  "completed_at": "2026-11-19T09:30:00Z"
}

Pedir uma exportação de conformidade

Registos

POST /export/compliance

Queues a ZIP package of all tenant data (tenant metadata, each dataset as CSV and JSON, the audit chain and its verification result, and a manifest with row counts) and returns the export record with status queued and 202. Only one export may be queued or running per tenant; another request returns 409. The request is recorded in the audit chain and remains allowed after the workspace is closed. Requires the compliance:export permission.

Devolve

202 Queue an asynchronous compliance export

Mostrar atributos
idstring · opcional
statusstring · opcional

um de queued, running, completed, failed

file_namestring · opcional
size_bytesinteger · opcional
sha256string · opcional
audit_chain_verifiedboolean · opcional
errorstring · opcional
download_urlstring · opcional
created_atstring (date-time) · opcional
started_atstring (date-time) · opcional
completed_atstring (date-time) · opcional

Erros 400 · 401 · 403 · 409

Permissões compliance:export · Funções: admin, owner

curl -X POST "$BUSINESS_API/export/compliance" \
  -H "Authorization: Bearer sk_test_..."
Resposta 202
{
  "id": "com_2iGtfOIPN6mnFkwXXuCbD6uJj8K",
  "status": "queued",
  "file_name": "Ana Matsinhe",
  "size_bytes": 1,
  "sha256": "sha256",
  "audit_chain_verified": true,
  "error": "error",
  "download_url": "https://example.org/",
  "created_at": "2026-11-19T09:30:00Z",
  "started_at": "2026-11-19T09:30:00Z",
  "completed_at": "2026-11-19T09:30:00Z"
}

Obter o estado de uma exportação

Registos

GET /export/compliance/status

Get an export status (latest, or by id)

Returns one compliance export, or the tenant's most recent one when no id is given, with status (queued, running, completed or failed), file name, size, SHA-256 digest, whether the audit chain verified and any error. download_url is set only once the export is completed. Returns 404 when no matching export exists; available after the workspace is closed. Requires the compliance:read permission.

Parâmetros

idstring · consulta · opcional

Optional compliance export identifier; omit it to get the latest export of the tenant.

Devolve

200 Get an export status (latest, or by id)

Mostrar atributos
idstring · opcional
statusstring · opcional

um de queued, running, completed, failed

file_namestring · opcional
size_bytesinteger · opcional
sha256string · opcional
audit_chain_verifiedboolean · opcional
errorstring · opcional
download_urlstring · opcional
created_atstring (date-time) · opcional
started_atstring (date-time) · opcional
completed_atstring (date-time) · opcional

Erros 400 · 401 · 403 · 404

Permissões compliance:read · Funções: admin, owner

curl -X GET "$BUSINESS_API/export/compliance/status" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "id": "com_2iGtfOIPN6mnFkwXXuCbD6uJj8K",
  "status": "queued",
  "file_name": "Ana Matsinhe",
  "size_bytes": 1,
  "sha256": "sha256",
  "audit_chain_verified": true,
  "error": "error",
  "download_url": "https://example.org/",
  "created_at": "2026-11-19T09:30:00Z",
  "started_at": "2026-11-19T09:30:00Z",
  "completed_at": "2026-11-19T09:30:00Z"
}

Descarregar uma exportação de conformidade

Registos

GET /export/compliance/{id}/download

Download a completed compliance package (ZIP)

Streams the completed package as application/zip with an attachment file name, or answers 302 with a short-lived presigned link when the file store supports it. Exports that are not completed return 404. Each download is recorded in the audit chain, and the endpoint stays available after the workspace is closed. Requires the compliance:read permission.

Parâmetros

idstring · caminho · obrigatório

Identifier of a completed compliance export in the current tenant.

Devolve

200 Download a completed compliance package (ZIP)

Erros 400 · 401 · 403 · 404

Permissões compliance:read · Funções: admin, owner

curl -X GET "$BUSINESS_API/export/compliance/{id}/download" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200

Download a completed compliance package (ZIP)