GET /api/v1/audit-export
Export audit logs with filtering and pagination.Query Parameters
Example
Response — JSON Format
The export envelope carries the formatteddata string plus an integrity
block. The data field is a JSON-encoded string of the matching audit rows.
integrity block is computed with the same content-hash recompute the
verify endpoint uses — not a link-only check — so a
tampered payload in the exported slice is caught by the export itself. On a
detected tamper, integrity.valid is false and the block adds
brokenAtId and brokenReason (hash_mismatch or chain_link_mismatch):
soc2 format’s summary.integrityChainStatus and
complianceChecks.tamperDetection reflect the same content-verified verdict.
Response — CSV Format
Returns a CSV file download withContent-Disposition: attachment. The
content-verified integrity verdict is surfaced on the
X-Audit-Integrity response header (valid or broken), with an
X-Audit-Integrity-Reason header when broken.
POST /api/v1/audit-export
Verify the integrity of the audit log chain. Recomputes each row’s content hash (honoring the row’s hash version) and checks the chain links, so an editedbefore/after/changes payload is detected even if the chain links are
intact. Admin only.