Audit

Session-level usage summary (Enterprise)

Enterprise — session-level usage reporting (#2759). The Community build mounts the same route but returns 501 Not Implemented.

Buckets audit logs into per-session aggregates for the date window: a bucket is per-session when session_id is present on its rows, otherwise rows without a session id fall back to a per-user-day bucket (the day field is set instead of session_id). Buckets are capped at bucket_limit (most-recent activity first); truncated is true when the window held more buckets than the cap — narrow the window or raise limit. Drill into a bucket's raw events via POST /api/v1/audit/search with its session_id (#2857).

The window start is clamped to the tenant's tier retention floor, like /api/v1/audit/search and /api/v1/audit/export.

avg_latency_ms is nullable on the bucket and on every entry of its tools array (#3433), paired with a latency_sample_count. null means no row in that bucket carried a measurement, which is a different fact from a measured zero and used to be coalesced onto it. A strict deserializer binding it to a non-optional float will raise; see the SessionSummaryBucket schema.

get/api/v1/audit/session-summary

Request

Query parameters

start_datestring date required

Window start, calendar day (YYYY-MM-DD)

end_datestring date required

Window end, calendar day (YYYY-MM-DD), inclusive

user_emailstring

Case-insensitive partial (ILIKE substring) filter

limitinteger

Caps the number of returned buckets. Default 200. Values above the server max (1000) are clamped; the effective bound is echoed back as bucket_limit. A non-positive or non-integer value is a 400.

Headers

X-Tenant-IDstring required

Tenant identifier scoping the request. The AxonFlow Agent gateway sets this header after authentication; the orchestrator fails closed when it is absent (401 on audit/decision endpoints, 400 on others — see each operation). Clients cannot widen their scope through it: handlers force the tenant filter from this header, never from the request body.

Response

Session summary buckets

tenant_idstring
user_emailstring

Echoed filter; omitted when not filtered

start_datestring date
end_datestring date
bucket_limitinteger

Effective bucket cap applied to this response

truncatedboolean

True when the window held more buckets than bucket_limit — narrow the window or raise ?limit=

Changes

No recorded changes to this operation across all 1 revision of this API.