OpenFolia

Export audit events

GET
/audit-events/export

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.

Authorization

bearer
headerAuthorizationBearer <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.

Query Parameters

format*string

csv or jsonl.

Value in"csv""jsonl"
filter[subject]?string

Only events about this subject: <type> (e.g. role) or <type>/<id> (e.g. role/author, module/en/battery-charging).

Match^[^/]+(?:\/.+)?$
Lengthlength <= 600
filter[actor]?string

Only events by this actor: <kind> (user or service) or <kind>/<id> (e.g. user/sample-author).

Match^[^/]+(?:\/.+)?$
Lengthlength <= 600
filter[action]?string

Only this action, e.g. role.assign.

Match^[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+$
Lengthlength <= 100
filter[from]?string

Only events at or after this time: ISO 8601 with an offset, e.g. 2026-01-01T00:00:00Z.

Match^(?:(?:\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)))$
Formatdate-time
filter[to]?string

Only events before this time (exclusive): ISO 8601 with an offset, e.g. 2026-02-01T00:00:00Z.

Match^(?:(?:\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)))$
Formatdate-time

Header Parameters

X-Ccms-User?string

Demo 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).

Response Body

The file.

response?string
Example Request
curl -X GET 'http://localhost:3000/audit-events/export?format=csv'
Example Response
"string"