Export audit events
Every event the filters select (the same filters as GET /audit-events, so the file holds exactly what the list pages through), newest first, as a download (Content-Disposition: attachment, nosniff, Cache-Control: no-store), streamed. csv: RFC 4180, a header row, lines ending in CRLF, columns id, at, actor kind, actor id, action, subject type, subject id, comment, data (at in ISO 8601 UTC, data as JSON text; a value a spreadsheet would run as a formula starts with '). jsonl: JSON Lines, one event per line with id and the members of AuditEventAttributes. The export itself is recorded first, as audit-log.export (data: the format and the filters given); when that fails, nothing is sent (500). A failure once the file has begun cuts the connection off, so a broken download never looks complete. HEAD is 405 (Allow: GET): every answer records an export. Needs the admin.roles permission.
bearerAuthorizationBearer <JWT>A service account's token (ccms_sat_…, issued by POST /service-accounts/{id}/tokens), or, for local use and demo mode, the server's shared CCMS_API_TOKEN.
format*stringcsv or jsonl.
"csv""jsonl"filter[subject]?stringOnly events about this subject: <type> (e.g. role) or <type>/<id> (e.g. role/author, module/en/battery-charging).
^[^/]+(?:\/.+)?$length <= 600filter[actor]?stringOnly events by this actor: <kind> (user or service) or <kind>/<id> (e.g. user/sample-author).
^[^/]+(?:\/.+)?$length <= 600filter[action]?stringOnly this action, e.g. role.assign.
^[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+$length <= 100filter[from]?stringOnly events at or after this time: ISO 8601 with an offset, e.g. 2026-01-01T00:00:00Z.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$date-timefilter[to]?stringOnly events before this time (exclusive): ISO 8601 with an offset, e.g. 2026-02-01T00:00:00Z.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$date-timeX-Ccms-User?stringDemo mode only (CCMS_AUTH_MODE=demo): the user ID to act as. The bearer token is still required; without demo mode the header is refused (400).
The file.
response?stringcurl -X GET 'http://localhost:3000/audit-events/export?format=csv'"string"