Skip to main content

Audit logs

Query the immutable audit trail, and (on premium tiers) export a tamper-evident signed copy for archival or SIEM ingestion.

::: tip Auth

  • GET /v1/audit-logs — any platform admin.
  • GET /v1/admin/audit-export — platform Admin + the AuditExport entitlement (premium tier). :::

GET /v1/audit-logs

Query the audit log, newest-first, with offset pagination and optional filters.

Request

GET /v1/audit-logs?user_id=&action=&from=&to=&page=&page_size=

Query paramTypeNotes
user_idUUIDFilter to events whose actor is this user.
actionstringExact-match action filter (e.g. auth.login).
fromRFC3339Lower time bound (inclusive).
toRFC3339Upper time bound (inclusive).
pageint1-indexed. Defaults to 1.
page_sizeintDefaults to 25, clamped to [1, 100].

Response

200 OK

{
"items": [
{
"id": 91823,
"event_id": "b1e2…",
"timestamp": "2026-06-01T12:00:00Z",
"organization_id": "f47a…",
"actor_id": "a3f1…",
"actor_type": "user",
"action": "auth.login",
"resource_type": "session",
"resource_id": "c9d8…",
"ip_address": "203.0.113.7",
"user_agent": "Mozilla/5.0 …",
"request_id": "7f3a…",
"metadata": { "method": "password" },
"outcome": "success"
}
],
"total": 1,
"page": 1,
"page_size": 25
}
FieldTypeMeaning
idintMonotonic row id (sort key).
event_idUUIDStable event identifier.
timestampstringRFC3339, UTC.
organization_idUUIDTenant the event is scoped to.
actor_idUUID|nullThe acting user, if any.
actor_typestringuser, system, api_key, etc.
actionstringDotted event name (e.g. auth.login, mfa.reset).
resource_type / resource_idstringThe affected resource.
ip_address / user_agentstring|nullRequest origin.
request_idUUID|nullCorrelates with request logs.
metadataobjectEvent-specific structured payload.
outcomestringsuccess / failure / etc.

GET /v1/admin/audit-export

Stream the audit log as newline-delimited JSON (NDJSON) with a detached HMAC-SHA256 signature, so the export is tamper-evident.

Request

GET /v1/admin/audit-export?from=&to=

Query paramTypeNotes
fromRFC3339Lower time bound (inclusive). No lower bound when absent.
toRFC3339Upper time bound (inclusive). No upper bound when absent.

Response

200 OK

  • Content-Type: application/x-ndjson
  • One JSON object per line (each an audit row), followed by a final trailer line carrying the signature and row count:
{"id":91823,"action":"auth.login", ...}
{"id":91824,"action":"auth.logout", ...}
{"_signature":"sha256=4f3c…","_count":2}
  • Header X-IdentSphere-Signature: sha256=<hex> carries the same signature.

The signature is HMAC-SHA256 over the data region only — every line except the trailer (a signature can't sign itself). To verify: concatenate all lines except the final _signature line, recompute the HMAC with your signing key, and compare. The key is IDENTSPHERE_AUDIT_EXPORT_KEY (a deterministic fallback is used when unset — set it in production).


Error responses

StatusCodeWhen
401authentication_requiredNo valid auth credential.
402payment_requiredaudit-export on a tier without the AuditExport entitlement. Checked before the admin role.
403forbiddenCaller is not a platform admin (or lacks Admin for export).
400invalid_inputMalformed from/to timestamp.