---
title: "Export the audit log (csv | json) with a verifiable content hash"
method: GET
path: "/v1/audit-logs/export.{fmt}"
tags: ["Team"]
---

# Export the audit log (csv | json) with a verifiable content hash

`GET /v1/audit-logs/export.{fmt}`

## Request

- Base URL: `https://api.sqai.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.sqai.com/v1/audit-logs/export.{fmt}`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Export this org's audit log, with `X-Content-SHA256` over the exact bytes returned.

WHY THE BODY IS BUFFERED RATHER THAN STREAMED. The header has to be the digest of the bytes the
client actually receives, and HTTP headers precede the body -- so a genuinely streamed response
could only carry the digest in a trailer, which most clients silently drop. A hash the recipient
cannot check is worse than none, because it invites trust it has not earned. The DB read IS
batched (`_AUDIT_EXPORT_BATCH`), so a large history does not materialise as one result set;
memory is bounded by the size of the export the caller asked for.

Filters are the same ones /v1/audit-logs accepts, through the same helper, so an export is
exactly the rows an operator saw in the UI.

## Path parameters

- `fmt` string, required: Export format: csv | json

## Query parameters

- `actor_email` string, nullable
- `action` string, nullable
- `resource_type` string, nullable
- `result` string, nullable
- `policy_snapshot_id` string, nullable
- `schema_snapshot_id` string, nullable
- `manifest_version` string, nullable
- `request_hash` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/sqai/apis/algenta-control-plane.md) · [All operations](https://skmtc.dev/sqai/apis/algenta-control-plane/llms.txt) · [OpenAPI document](https://skmtc.dev/sqai/apis/algenta-control-plane/revisions/f30391a81130?raw)
