Audit API
GET /api/v1/audit?project_id=...&action=task.retry&from=...&to=...&actor_user_id=...Filters:
project_id- scopeaction- prefix match (e.g.auth.*,task.retry)actor_user_id- filter by actorfrom/to- RFC 3339 timestampstarget_type,target_id- narrow by resource
Response:
{ "items": [ { "id": "01H...", "ts": "...", "actor_user_id": "...", "project_id": "...", "action": "task.retry", "target_type": "task", "target_id": "01H...", "details": { "original_task_id": "01H...", "new_task_id": "01H..." }, "row_hmac": "...", "prev_row_hmac": "..." } ], "next_cursor": "...", "has_more": true}Export
Section titled “Export”GET /api/v1/audit/export?format=csv&from=2026-01-01&to=2026-04-01Role: admin. Formats: csv, ndjson. Includes row_hmac and prev_row_hmac for external chain verification.
For large ranges, exports are streamed (no size cap) with Transfer-Encoding: chunked.
Verify chain
Section titled “Verify chain”POST /api/v1/audit/verifyRole: admin. Runs the full-chain verification and returns:
{ "ok": true, "rows_verified": 42091, "first_broken_id": null}Or on failure:
{ "ok": false, "rows_verified": 1028, "first_broken_id": "01H..."}See security § HMAC audit chain for how the chain is constructed.