Skip to content

Get audit log

GET
/api/v1/audit

Returns audit-relevant events (sessions, tool uses, prompts, lifecycle) with optional filtering by project, worktree, category, and time range.

projectId
string

Filter by project ID

worktree
string

Filter by worktree ID

category
string

Filter by category (session, agent, prompt, config, budget, system, debug)

source
string

Filter by source (agent, backend, frontend, container)

level
string

Filter by level (info, warning, error)

since
string

Filter entries after this timestamp (RFC3339)

until
string

Filter entries before this timestamp (RFC3339)

limit
integer

Maximum entries to return (default 10000)

offset
integer

Number of entries to skip

OK

Array<object>
object
agentType

AgentType identifies the agent that produced this event (e.g. “claude-code”, “codex”).

string
attrs

Attrs carries structured key-value metadata.

object
key
additional properties
category

Category is the audit category (session, agent, prompt, config, system). Computed at query time from the event name — not stored in the DB.

string
containerName

ContainerName is a snapshot of the container name at the time of the event.

string
data

Data carries the raw event payload (for agent events, preserves hook JSON).

Array<integer>
event

Event is a snake_case identifier for the event type (e.g. “session_start”).

string
id

ID is the database row identifier. Unique across all entries.

integer
level

Level is the severity of the entry (info, warn, error).

string
Allowed values: info warn error
msg

Message is a human-readable description.

string
projectId

ProjectID is the deterministic project identifier (sha256 of host path, 12 hex chars).

string
source

Source identifies the origin layer (agent, backend, frontend, container).

string
Allowed values: agent backend frontend container external
ts

Timestamp is when the event occurred (ISO 8601 with milliseconds).

string
worktree

Worktree is the worktree ID (only for agent events).

string

Internal Server Error

object
code
string
Allowed values: INVALID_BODY INVALID_CONTAINER_ID INVALID_CONTAINER_NAME INVALID_WORKTREE_ID INVALID_WORKTREE_NAME REQUIRED_FIELD INVALID_PATH INVALID_NETWORK_CONFIG NOT_A_DIRECTORY NOT_FOUND NAME_TAKEN NOT_CONFIGURED STALE_MOUNTS BUDGET_EXCEEDED PROXY_ERROR INTERNAL
error
string