Export shell audit events as CSV or JSON
GET
/api/audit/export
Stream a full CSV or JSON export of audit events for the organisation.
The export is capped at EXPORT_ROW_CAP rows (default 100 000). Requests
that would exceed the cap receive a 413 response. Exporting is itself an
auditable event (audit.exported) with the filter params and row count in
the payload.
Role required: audit.view.
CSV columns: id, created_at, event_type, actor_id, target_user_id, payload_json, reason, prev_hash, event_hash.
Authorizations
Parameters
Query Parameters
organization_id
required
string format: uuid
format
Export format: ‘csv’ (default) or ‘json’.
string
Export format: ‘csv’ (default) or ‘json’.
Responses
200
Successful Response
422
Validation Error
object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string