Cost By User Agent
Cost + token totals grouped by (user, agent type) — feeds a “who spends the most, with which agent” chart (CLO-434 follow-up).
Visibility matches every other endpoint in this router: the
caller, their child agents, and dataset-shared sessions. On top
of that base scope, a tenant owner/admin (same check
GET /tenants/{id}/users uses) additionally sees every
member’s spend on the tenant’s own datasets; a member’s sessions
in another tenant, or with no dataset, do not appear. A regular
member — or anyone with no tenant, i.e. single-user/local mode —
just keeps the base scope rather than being denied outright.
Query Parameters
- range (Literal[‘24h’, ‘7d’, ‘30d’, ‘all’]): Time window filtered on last_activity_at: 24h, 7d, 30d, or all. Defaults to ‘30d’.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Time window filtered on last_activity_at: 24h, 7d, 30d, or all.
24h, 7d, 30d, all "30d"
Response
Successful Response