Appearance
Audit API
6 operations. Paths are relative to the API host (http://localhost:5080 in local development). Every operation accepts an OIDC bearer token (Authorization: Bearer …) or a workspace API key (X-Api-Key: keel_live_…); errors are RFC 9457 Problem Details with a code (error codes). Permissions: matrix.
| Method | Path | Summary |
|---|---|---|
| GET | /api/v1/audit/chain | The latest hash-chain verification (nightly, F16 AC2). |
| POST | /api/v1/audit/chain:verify | Verify the tenant's hash chain now (Owners). Returns the job. |
| GET | /api/v1/audit/events | Audit events, newest first. Filters: actor (id or name), asset, action (contains), from/to; cursor paging. |
| GET | /api/v1/audit/export | Streamed export (format=csv|json) of the audit events matching the filters. Metadata only; audited. |
| GET | /api/v1/audit/settings | Audit retention (default 365 days). |
| PUT | /api/v1/audit/settings | Change audit retention (Owners, 30–3650 days). Audited. |
GetAuditChainStatus
http
GET /api/v1/audit/chainThe latest hash-chain verification (nightly, F16 AC2).
| Status | Description | Body |
|---|---|---|
| 200 | OK | AuditChainStatusDto |
Response 200: AuditChainStatusDto
| Field | Type | Notes |
|---|---|---|
anchorSequence | int64 | |
checkedAt | date-time? | |
eventsChecked | int64 | |
failure | string? | |
firstBadSequence | int64? | |
mode | string | |
status | string | |
verifiedThroughSequence | int64? |
VerifyAuditChain
http
POST /api/v1/audit/chain:verifyVerify the tenant's hash chain now (Owners). Returns the job.
| Status | Description | Body |
|---|---|---|
| 202 | Accepted | VerifyAuditChainResponse |
Response 202: VerifyAuditChainResponse
| Field | Type | Notes |
|---|---|---|
jobId | uuid |
ListAuditEvents
http
GET /api/v1/audit/eventsAudit events, newest first. Filters: actor (id or name), asset, action (contains), from/to; cursor paging.
| Parameter | In | Type | Required | Notes |
|---|---|---|---|---|
actor | query | string | no | |
asset | query | string | no | |
action | query | string | no | |
from | query | date-time | no | |
to | query | date-time | no | |
cursor | query | string | no | |
limit | query | int32 | no |
| Status | Description | Body |
|---|---|---|
| 200 | OK | AuditEventPage |
Response 200: AuditEventPage
| Field | Type | Notes |
|---|---|---|
items | AuditEventDto[] | |
nextCursor | string? |
ExportAuditEvents
http
GET /api/v1/audit/exportStreamed export (format=csv|json) of the audit events matching the filters. Metadata only; audited.
| Parameter | In | Type | Required | Notes |
|---|---|---|---|---|
format | query | string | no | |
actor | query | string | no | |
asset | query | string | no | |
action | query | string | no | |
from | query | date-time | no | |
to | query | date-time | no |
| Status | Description | Body |
|---|---|---|
| 200 | OK | string |
| 400 | Bad Request | ProblemDetails |
| 403 | Forbidden | ProblemDetails |
GetAuditSettings
http
GET /api/v1/audit/settingsAudit retention (default 365 days).
| Status | Description | Body |
|---|---|---|
| 200 | OK | AuditSettingsDto |
Response 200: AuditSettingsDto
| Field | Type | Notes |
|---|---|---|
defaultRetentionDays | int32 | |
maxRetentionDays | int32 | |
minRetentionDays | int32 | |
retentionDays | int32 |
UpdateAuditSettings
http
PUT /api/v1/audit/settingsChange audit retention (Owners, 30–3650 days). Audited.
Request body (application/json): UpdateAuditSettingsRequest
| Field | Type | Notes |
|---|---|---|
retentionDays | int32 |
| Status | Description | Body |
|---|---|---|
| 204 | No Content | — |