Hanzo
OpenapiAudit

List reads the caller's OWN org audit trail, newest first, with the total the…

List reads the caller's OWN org audit trail, newest first, with the total the filter matched so a console can page it.

GET /v1/audit

Addresshttps://api.hanzo.ai/v1/audit
MethodGET
Operationget_audit
AuthAuthorization: Bearer $HANZO_API_KEY

List reads the caller's OWN org audit trail, newest first, with the total the filter matched so a console can page it.

Every filter is optional and applies WITHIN the caller's org — the org itself is the validated principal's and can never be widened by a request. Fails closed: an absent principal is a true "not signed in" (401), and a deployment with no local tamper-evident store answers an honest 501 rather than silently serving somebody else's trail.

Request

9 fields.

FieldInTypeRequiredDescription
subquerystringSub narrows the trail to one actor — the validated subject that made the request.
actionquerystringAction narrows it to one action name, e.g.
resourcequerystringResource narrows it to one resource TYPE, e.g.
resourceIdquerystringResourceID narrows it to one resource instance.
resultquerystringResult narrows it to one outcome: "success", "deny" or "error".
sincequerystringSince is the inclusive lower time bound, RFC3339.
untilquerystringUntil is the upper time bound, RFC3339, with the same tolerance.
pageSizequerystringPageSize is rows per page, default 100.
pquerystringPage is the 1-based page number, driving the offset.

Response

StatusBodyMeaning
200trailPageok

200 body — 25 fields.

FieldInTypeAlwaysDescription
databodyWire[]Data is one page of the org's events, newest first.
data[].actionbodystringAction is the verb that was performed. It is the event's name, not the HTTP method — a request-sourced record carries both, and the pair is what makes a row…
data[].authMethodbodystringAuth is the credential the actor presented: "jwt", "api-key", or "none".
data[].emailbodystringEmail is the actor's validated address, absent when the credential carried none.
data[].hashbodystringHash is this record's SHA-256 over its own canonical JSON with both hash fields cleared, folded with prevHash.
data[].homebodystringHome is present ONLY on a cross-org action: the org the actor came FROM, while Org is the org they acted IN.
data[].isAdminbodybooleanIsAdmin is the VALIDATED platform-SuperAdmin bit at decision time (membership of the reserved admin org), never the client's own claim to be one.
data[].methodbodystringMethod is the HTTP verb, on a record a request produced.
data[].orgbodystringOrg is the tenant the action was taken IN — the effective org, which for everyone but an impersonating SuperAdmin is also the actor's own.
data[].pathbodystringPath is the request's route. Any segment shaped like a credential is replaced before the record is written, so a key that rides in a path is not preserved here…
data[].prevHashbodystringPrevHash is the hash of record seq-1, which is what links the rows into a chain: a deleted or reordered record breaks the recomputation at that point.
data[].reasonbodystringReason is a short explanation for a deny or an error ("SuperAdmin required", "insufficient_balance").
data[].requestIdbodystringRequestID ties this row to the request-line log and any downstream trace — the X-Request-Id the pipeline minted for that request.
data[].resourcebodystringResource is the KIND of thing acted upon ("org", "role", "secret", "provider-config", "credit").
data[].resourceIdbodystringResourceID is the specific instance, absent when the kind alone identifies it.
data[].resultbodystringResult is how the action ended: "success", "deny" or "error".
data[].seqbodyintegerSeq is the record's position in the chain, 0-based and gapless.
data[].sourceIpbodystringSourceIP is the client address the edge resolved for the request, after the proxy chain — the address a responder would act on, not the socket peer.
data[].statusbodyintegerStatus is the HTTP status the caller received.
data[].subbodystringSub is the acting user (the IAM subject).
data[].timebodystringTime is when the action happened, RFC3339Nano in UTC.
data[].userAgentbodystringUserAgent is the client the request announced itself as.
msgbodystringMsg is the envelope's message slot, empty on success.
statusbodystringStatus is the envelope's status slot, "ok" on success.
totalbodyintegerTotal is how many events match the filter, across all pages — what a pager needs to size itself.

Failure carries the platform error shape — see Errors.

Examples

hanzo audit get

Audit API · All Hanzo APIs · Interactive reference

How is this guide?

On this page