Aggregate invocation metrics
const url = 'https://example.com/v1/analytics?group_by=agent_id&bucket=hour&since=2026-04-15T12%3A00%3A00Z';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/v1/analytics?group_by=agent_id&bucket=hour&since=2026-04-15T12%3A00%3A00Z' \ --header 'Authorization: Bearer <token>'Aggregates the tenant’s invocations by agent_id and a time bucket (spec 0003). Carries its own tighter per-caller rate limit than the global limiter, since percentile aggregation is heavier than a row fetch.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Only agent_id is supported in v1; an explicit other value is rejected.
RFC 3339 timestamp; required.
RFC 3339 timestamp; defaults to now. The [since, until] window is capped at 31 days.
Responses
Section titled “Responses”Aggregated metrics.
object
object
object
Error_count / count, in [0,1].
object
object
object
Example
{ "bucket": "hour"}Missing/invalid since/until, an unsupported group_by/bucket, since after until, or a range exceeding 31 days.
The uniform error body for all 4xx responses that carry one.
object
A coarse, caller-safe message. Never contains internal state (invariant
Examplegenerated
{ "error": "example"}Missing or invalid bearer token, or the token’s tenant/user claims are absent. No body.
The endpoint’s tighter per-caller rate limit was exceeded.
The uniform error body for all 4xx responses that carry one.
object
A coarse, caller-safe message. Never contains internal state (invariant
Examplegenerated
{ "error": "example"}Headers
Section titled “Headers”Seconds until the next token is available (capped at 60).
An unexpected server-side error. No body (internal detail is never returned to callers, invariant