Get handler metrics
GET /v1/handlers/{id}/metrics- Permissions
read:sessionsread:configs- Tokens
- API key, CLI user token, Session token
Read session counts by current status and accumulated cost for a saved handler. Optional start and end timestamps filter session creation time, including start and excluding end. Cost includes the selected sessions' full history, in millicents. Requires configs:read matching handlers/{service} and unrestricted sessions:read.
Path parameters
Query parameters
Inclusive session creation-time bound. Naive timestamps use UTC.
Exclusive session creation-time bound. Naive timestamps use UTC.
Response
Sessions created and usage in each bucket of the window, oldest first, with zeros for buckets without either.
What the selected sessions cost together.
Exclusive session creation-time bound.
The saved handler whose sessions are counted.
The width of each bucket, chosen from the window's length.
hourdayweekCurrent outcomes of sessions created in the window; outcome counts sum to total.
Current trailing 1-, 7-, and 28-day spend, including subscription tokens, and enforced handler budgets. Based on usage timestamps across all this handler's sessions and revisions, independently of the start/end session creation filters.
Inclusive session creation-time bound.