Durable, per-tenant, hash-chained audit log (ADR-0008). Every request needs a bearer token with a tenant context. Writes are service-to-service only (audit_writer workload role, AuditWrite permission; no human role holds it). Reads need AuditRead and always return the caller's own tenant chain.
Version 1.0.0. Download the OpenAPI specification.
Authentication: bearer.
Operations
| Method | Path | Summary |
|---|
GET | /v1/audit/anchors | Daily chain-head anchors for export to WORM storage |
GET | /v1/audit/events | Read the caller tenant's chain, oldest first, paged by sequence |
POST | /v1/audit/events | Append an event to the caller tenant's chain (services only) |
GET | /v1/audit/export | SIEM export of the caller tenant's events (JSON lines or CEF) |
GET | /v1/audit/jit-sessions | Just-in-time operator sessions recorded on the caller tenant (newest first) |
GET | /v1/audit/jit-sessions/{grantId} | Timeline of one JIT grant on the caller tenant |
GET | /v1/audit/platform/tenants/{tenantId}/jit-sessions/{grantId} | Operator console view of one grant timeline (platform session without JIT only) |
GET | /v1/audit/verify | Verify the caller tenant's hash chain |
GET /v1/audit/anchors
Daily chain-head anchors for export to WORM storage
| Parameter | In | Type | Required | Description |
|---|
from | query | string | no | Defaults to 30 days ago |
to | query | string | no | Defaults to today |
| Status | Description | Body |
|---|
| 200 | Anchors in the range | AuditAnchor[] |
| 403 | Caller lacks AuditRead | |
GET /v1/audit/events
Read the caller tenant's chain, oldest first, paged by sequence
| Parameter | In | Type | Required | Description |
|---|
afterSequence | query | integer | no | |
limit | query | integer | no | |
| Status | Description | Body |
|---|
| 200 | One page of events | AuditPage |
| 401 | Missing or invalid token | |
| 403 | Caller lacks AuditRead | |
POST /v1/audit/events
Append an event to the caller tenant's chain (services only)
| Parameter | In | Type | Required | Description |
|---|
Idempotency-Key | header | string | no | UUID; a retried append with the same key returns the original event with 200. |
Request body: AuditEntry (JSON).
| Status | Description | Body |
|---|
| 200 | Already appended under this idempotency key | AuditEvent |
| 201 | Appended | AuditEvent |
| 400 | Validation problem (field lengths, idempotency key) | |
| 401 | Missing or invalid token | |
| 403 | Caller lacks AuditWrite | |
GET /v1/audit/export
SIEM export of the caller tenant's events (JSON lines or CEF)
| Parameter | In | Type | Required | Description |
|---|
format | query | string | no | |
afterSequence | query | integer | no | |
limit | query | integer | no | |
| Status | Description | Body |
|---|
| 200 | One event per line | |
| 400 | Unknown format | |
| 403 | Caller lacks AuditRead | |
GET /v1/audit/jit-sessions
Just-in-time operator sessions recorded on the caller tenant (newest first)
| Status | Description | Body |
|---|
| 200 | One summary per grant | JitSessionSummary[] |
| 403 | Caller lacks AuditRead | |
GET /v1/audit/jit-sessions/{grantId}
Timeline of one JIT grant on the caller tenant
| Parameter | In | Type | Required | Description |
|---|
grantId | path | string | yes | |
| Status | Description | Body |
|---|
| 200 | Calls in order (method, route template, status, duration, request id; no bodies) | JitSessionTimeline |
| 403 | Caller lacks AuditRead | |
| 404 | No calls recorded for this grant on this tenant | |
Operator console view of one grant timeline (platform session without JIT only)
| Parameter | In | Type | Required | Description |
|---|
tenantId | path | string | yes | |
grantId | path | string | yes | |
| Status | Description | Body |
|---|
| 200 | Calls in order | JitSessionTimeline |
| 403 | Caller lacks PlatformOperate or holds a JIT token | |
| 404 | No calls recorded | |
GET /v1/audit/verify
Verify the caller tenant's hash chain
| Status | Description | Body |
|---|
| 200 | Verification result | VerifyResult |
| 403 | Caller lacks AuditRead | |