Appearance
Audit API Reference
GET /audit/
List audit entries
Use for compliance review and incident investigation. Audit rows are append-only while retained; retention defaults to keep forever and an optional team_id filter is supported. Results are ordered by ascending numeric audit ID. The cursor is a non-negative decimal string ID (omit, leave empty, or use 0 for the first page); IDs remain numeric in items. See REST pagination for the shared limit, envelope, and terminal-cursor contract.
Required permission — iam:audit:any
Responses
- 200 — Successful response
json
{
"items": [
{
"action": "user.created",
"actor_id": "01J8Z3ADMIN000000000000001",
"at": "2026-01-01T00:00:00Z",
"diff": {
"status": "active"
},
"id": 1,
"request_id": "req-01J8Z3",
"target": "01J8Z3USER000000000000001",
"team_id": "01J8Z3TEAM000000000000001"
}
],
"next_cursor": ""
}Errors
| Status | Code | Detail |
|---|---|---|
| 400 | cursor must be a non-negative integer | Invalid Request; Invalid Request |
| 400 | limit must be a positive integer | Invalid Request; Invalid Request |
| 401 | authentication failed | Unauthorized |
| 403 | insufficient_permissions | Forbidden |
| 500 | authentication service unavailable | Internal Server Error |
GET /audit/export
Export audit entries
Stream matching audit rows as JSON Lines (one row per line, the default) or CSV. The optional team_id filter matches GET /audit; export scans all matching rows and does not use cursor pagination.
Required permission — iam:audit:any
Responses
- 200 — Successful response
json
[
{
"action": "user.created",
"actor_id": "01J8Z3ADMIN000000000000001",
"at": "2026-01-01T00:00:00Z",
"diff": {
"status": "active"
},
"id": 1,
"request_id": "req-01J8Z3",
"target": "01J8Z3USER000000000000001",
"team_id": "01J8Z3TEAM000000000000001"
}
]Errors
| Status | Code | Detail |
|---|---|---|
| 400 | format must be jsonl or csv | Invalid Request |
| 401 | authentication failed | Unauthorized |
| 403 | insufficient_permissions | Forbidden |
| 500 | authentication service unavailable | Internal Server Error |