Skip to content

Get audit summary

GET
/api/v1/audit/summary

Returns aggregate statistics for audit events including session counts, tool usage, cost totals, and top tools.

projectId
string

Filter by project ID

worktree
string

Filter by worktree ID

since
string

Filter entries after this timestamp (RFC3339)

until
string

Filter entries before this timestamp (RFC3339)

OK

object
timeRange

TimeRange holds the earliest and latest event timestamps.

object
earliest
string
latest
string
topTools

TopTools lists the most frequently used tools with counts.

Array<object>
object
count
integer
name
string
totalCostUsd

TotalCostUSD is the aggregate cost across all projects.

number
totalPrompts

TotalPrompts is the number of user_prompt events.

integer
totalSessions

TotalSessions is the number of session_start events.

integer
totalToolUses

TotalToolUses is the number of tool_use events.

integer
uniqueProjects

UniqueProjects is the number of distinct projects with events.

integer
uniqueWorktrees

UniqueWorktrees is the number of distinct worktrees with events.

integer

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