Skip to navigation

Count runs per product

Total and failed runs for several products in one read, over the same window and traffic filter as GET /v1/runs/stats. A product counts its agent capabilities’ runs by agentId and its other capabilities’ runs by flowId, each family read the way /v1/runs/stats reads it, and the two summed. Name at most 100 products; one the caller does not own is left out, as is one that does not exist. An API key needs PRODUCTS:READ, plus AGENTS:READ or FLOWS:READ for each family the named products run.

Authentication

AuthorizationBearer
API key or Clerk session token

Query parameters

trafficenumOptional

live keeps runs real users and integrations started; test keeps runs started from the dashboard (Test, step tests, Ask); eval keeps eval-batch runs; sim keeps simulation turns; all, or omitted, keeps every run. A simulation turn is sim even when a schedule started it, a schedule run is live, and an eval batch run is eval whoever started it.

Allowed values:
fromstringOptional

Window start (ISO 8601). Defaults to 24 hours ago.

tostringOptional

Window end (ISO 8601). Defaults to now.

productIdsstringRequired

Comma-separated product ids, at most 100. A product the caller does not own is left out of the answer.

Response

Run counts per product returned
dataobject
windowobject

The started_at window the query resolved to, after defaults.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error
503
Service Unavailable Error