Skip to main content
Togul supports two types of data exports: an audit log export and a full account data snapshot. Both are stored via the configured export storage backend, and both require the exports.write permission.

Export types

TypeDescription
auditExport of the organization’s audit log
account_dataFull snapshot of organization-scoped data, excluding secrets

DataExport schema

FieldTypeDescription
idUUIDUnique export identifier
organization_idUUIDThe organization this export belongs to
export_typestringaudit or account_data
statusstringcompleted, failed, or expired
storage_pathstringLocation in the configured export storage backend
requested_byUUID | nullUser ID who requested the export
completed_atdatetime | nullWhen the export finished
created_atdatetimeWhen the export job was created
updated_atdatetimeWhen the export record was last updated

Creating an export

Creates an export of the organization’s audit log. The export is generated immediately and stored through the configured backend.POST /api/v1/exports/audit — requires exports.write permission.
curl -X POST http://localhost:8080/api/v1/exports/audit \
  -H "Authorization: Bearer $TOKEN"
Response:
{
  "export": {
    "id": "e1f2a3b4-c5d6-7890-abcd-ef1234567890",
    "organization_id": "org-uuid-here",
    "export_type": "audit",
    "status": "completed",
    "storage_path": "exports/org-uuid-here/audit-2026-03-21.json",
    "requested_by": "user-uuid-here",
    "completed_at": "2026-03-21T15:04:05Z",
    "created_at": "2026-03-21T15:04:00Z",
    "updated_at": "2026-03-21T15:04:05Z"
  }
}

List exports

Returns all export jobs for the current organization, across both export types. GET /api/v1/exports — requires exports.write permission.
curl http://localhost:8080/api/v1/exports \
  -H "Authorization: Bearer $TOKEN"
Response:
{
  "exports": [
    {
      "id": "e1f2a3b4-c5d6-7890-abcd-ef1234567890",
      "organization_id": "org-uuid-here",
      "export_type": "audit",
      "status": "completed",
      "storage_path": "exports/org-uuid-here/audit-2026-03-21.json",
      "requested_by": "user-uuid-here",
      "completed_at": "2026-03-21T15:04:05Z",
      "created_at": "2026-03-21T15:04:00Z",
      "updated_at": "2026-03-21T15:04:05Z"
    }
  ]
}

Export storage

Exports are written to the export storage backend configured for your deployment. The storage_path field on each export record indicates the location of the file within that backend. Contact your administrator to retrieve exported files if you do not have direct storage access.

Build docs developers (and LLMs) love