Handlers

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

idstringrequired

Query parameters

startstring, date-time

Inclusive session creation-time bound. Naive timestamps use UTC.

endstring, date-time

Exclusive session creation-time bound. Naive timestamps use UTC.

{
"end": str,
"handler_id": str,
"start": str
}

Response

costCostrequired

What the selected sessions cost together.

endstring, date-timerequired

Exclusive session creation-time bound, or null for no upper bound.

handler_idstringrequired

The saved handler whose sessions are counted.

sessionsHandlerSessionCountsrequired

Current outcomes of sessions created in the window; outcome counts sum to total.

spend_windowsarray<ConfigSpendWindow>required

Current trailing 1-, 7-, and 28-day credit debits and enforced handler budgets. Based on usage timestamps across all this handler's sessions and revisions, independently of the start/end session creation filters.

startstring, date-timerequired

Inclusive session creation-time bound, or null for no lower bound.

On this page

No Headings
Schedule a demo