Atom

Audit Log

Query the audit log for authorization decisions and identity events.

GET /audit

Reads audit log entries that Atom already writes for authorization checks, logins, logouts, and credential operations. Also available as GET /entities/:id/audit (alias for GET /audit?entity_id=:id).

Query parameters

ParameterTypeDefaultDescription
entity_idUUIDFilter by entity
eventstringFilter by event type
outcomeallow | deny | errorFilter by outcome
fromdatetime (ISO 8601)Start of time range (inclusive)
todatetime (ISO 8601)End of time range (exclusive)
limitint50Results per page (1-200)
offsetint0Pagination offset

Response

{
  "items": [
    {
      "id": "log1-...",
      "entity_id": "aaa-...",
      "event": "authz.check",
      "outcome": "deny",
      "details": {
        "action": "write",
        "resource_id": "r1-...",
        "reason": "no matching allow policy"
      },
      "created_at": "2026-04-24T10:30:00Z"
    },
    {
      "id": "log2-...",
      "entity_id": "aaa-...",
      "event": "auth.login",
      "outcome": "allow",
      "details": {
        "credential_kind": "password",
        "session_id": "s1-..."
      },
      "created_at": "2026-04-24T10:25:00Z"
    }
  ],
  "total": 142
}

Event types

EventWhen it's writtenDetails contain
authz.checkEvery POST /authz/check callaction, resource_id, reason
authz.explainEvery POST /authz/explain callaction, resource_id, reason
auth.loginSuccessful or failed logincredential_kind, session_id
auth.logoutSession revocationsession_id
credential.createPassword or API key createdcredential_id, credential_kind
credential.revokeCredential revokedcredential_id, credential_kind

Use cases

QueryEndpoint
Why was sensor-01 denied in the last hour?GET /audit?entity_id=bbb&event=authz.check&outcome=deny&from=2026-04-24T09:30:00Z
All login activity todayGET /audit?event=auth.login&from=2026-04-24T00:00:00Z
All audit events for AliceGET /entities/aaa/audit
All failed authorization checksGET /audit?event=authz.check&outcome=deny&limit=100

Audit logs are immutable — there are no write or delete operations on this endpoint.

On this page