Skip to navigation

List runs

Runs with their revenue, cost and margin, newest first. A run has a margin only when it has a confirmed charge and a traced cost: see has_margin. Without one, margin and margin_percent are null. Retrieve one with GET /v1/runs/{run_id}, and total all the runs that match the same filters, not just a page, with GET /v1/runs/summary.

Authentication

AuthorizationBearer

A secret key (rl_sk_test_..., rl_sk_live_...) or a restricted key with limited scopes (rl_rk_test_..., rl_rk_live_...). A restricted key can carry agent: true and an expires_at, and is what a coding agent should hold. Keys end in a checksum so secret scanners can recognize them. People create, roll and revoke keys in the dashboard; GET /v1/api_keys lists them, masked.

Query parameters

customer_idstringOptional
Only objects belonging to this customer.
outcome_definitionstringOptional

Only runs that produced a charge for this outcome definition (ID or key).

fromdatetimeOptional
Only runs first seen at or after this time.
todatetimeOptional
Only runs first seen before this time.
has_marginbooleanOptional

true: only runs that have a margin, which needs both a confirmed charge and a traced cost. false: only runs without one, that is, runs with no traced cost, or with no confirmed charge. A run whose charges are all pending or reversed has no confirmed charge, so it has no margin; a later reversal drops a run back to no margin. Applies to GET /v1/runs and GET /v1/runs/summary.

limitintegerOptional1-100Defaults to 20
Maximum number of objects to return, from 1 to 100.
cursorstringOptional

The next_cursor from the previous page.

Response

A page of runs.
object"list"
datalist of objects
has_moreboolean
next_cursorstringOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error
500
Internal Server Error