Documentation menu

API reference

2 operations in audit. Raw spec: openapi.json.

GET/api/v1/audit-events

GET /api/audit-events — append-only audit trail. Newest first by default; `order=asc` + `after` turns it into a forward-only export tail.

Parameters

NameInTypeRequiredDescription
beforequery—NoLegacy cursor (kept for compatibility): strictly older than this.
cursorquery—NoKeyset cursor from a previous page's `next_cursor`; strictly older than this position (newest-first mode).
afterquery—NoEXPORT cursor: a previous page's `next_cursor` in ascending mode. Rows strictly AFTER this position, oldest first, so an external consumer can resume exactly where it stopped. Mutually exclusive with `cursor`.
orderquery—No`desc` (default) for a human list, `asc` for an export tail. `after` implies `asc`.
actorquery—NoActor filter: user uuid or "system".
actionquery—NoAction prefix filter, e.g. "auth" matches every auth.* event.
fromquery—NoInclusive lower bound on occurred_at.
toquery—NoInclusive upper bound on occurred_at.
limitqueryintegerNo

Responses

StatusDescription
200
400cursor and after are mutually exclusive, order is not asc|desc, or a cursor does not decode

Security: bearer

GET/api/v1/provenance

GET /api/provenance — the provenance read model: who / record+field / before-after / actor kind / agent session+skill+rule-set hash / when, newest first, filterable, cursor-paged. Extends the 2.3 audit-log query API with provenance-grade filters backed by the materialized projection (no raw-row scans).

Parameters

NameInTypeRequiredDescription
cursorquery—NoKeyset cursor from a previous page's `next_cursor`.
actor_kindquery—NoActor-kind filter (the write-trail vocabulary: human, agent, import, ...).
actorquery—NoThe "who" filter: a user uuid. Ignored (forced to the caller) for callers without the audit permission.
entityquery—NoEntity family, e.g. "ticket". Required by `entity_id` and `field`.
entity_idquery—NoRecord id; requires `entity`.
fieldquery—NoSingle-field provenance; requires `entity`.
session_idquery—NoAgent session filter (rows carry it when present).
skillquery—NoAgent skill filter (rows carry it when present).
ruleset_hashquery—NoRule-set hash filter (rows carry it when present).
undoquery—NoRestrict to undo reverts (`true`) or exclude them (`false`).
fromquery—NoInclusive lower bound on occurred_at.
toquery—NoInclusive upper bound on occurred_at.
limitqueryintegerNo

Responses

StatusDescription
200

Security: bearer