Skip to main content
Every action taken in the Idem Ledger — whether by a human operator or an automated agent — is recorded in an immutable audit log. The compliance export endpoint lets you stream those records as newline-delimited JSON (NDJSON) for any time window you specify, making it straightforward to feed audit data into your SIEM, data warehouse, or compliance reporting pipeline.

Export audit log

Send a GET request to /api/v1/compliance/audit-export with the required from and to query parameters. The response is a streaming NDJSON body: one JSON object per line, one line per audit record.

Query parameters

Use type=HUMAN to export only records generated by human operators (console or direct API key usage), and type=AGENT to isolate automated agent activity. This is especially useful when your compliance team needs to audit human approvals separately from programmatic operations.

NDJSON format

The response body is a stream of newline-delimited JSON. Each line is a self-contained JSON object representing one audit record. There is no wrapping array — process the stream line by line. A single audit record looks like this:
Key fields in each record:

Processing NDJSON

Because each line is independent JSON, you can pipe the response directly into jq to filter or transform records on the fly:
To write the raw stream to a file for offline processing:

Required scope

Your API key must have the COMPLIANCE_EXPORT scope to call this endpoint. Requests from keys without this scope receive a 403 Forbidden response. This scope should be granted only to keys used by compliance systems or authorized administrators, not to general-purpose service accounts.
For tenants with high transaction volumes, requesting large time windows in a single export can produce very large response streams. As a best practice, export in shorter windows — daily or weekly — rather than requesting months of data in one call. This keeps response sizes manageable, reduces the risk of a network interruption mid-stream, and makes it easier to parallelize ingestion into your downstream systems.