Skip to main content
GET
Mission Control usage of several workspaces
Use this endpoint when you belong to several workspaces and want their consumption side by side: one call answers every workspace you name, or all your workspaces when you name none. It takes no x-workspace-id header. Each workspace is answered exactly as Mission Control usage answers it, with what you may see there: your own usage, your teams or the whole workspace. A workspace you cannot read does not fail the call; it comes back marked and stays out of the grand total.
This endpoint returns period totals only. To break one workspace down by person, agent, model or day, call Mission Control usage for that workspace.

Code examples

Consumption of two workspaces in November:

Headers

No workspace header. The workspaces come from workspace_ids[], or from your memberships when you leave it out. Use List workspaces to get the ids.

Query parameters

array of integer
Workspaces to include, at most 25, in the order you give. Leave it out to include every workspace your token can be used in, ordered by name. Without it, a token that can be used in more than 25 workspaces is refused with too_many_workspaces.
date (YYYY-MM-DD)
required
Start of the period, a local date in timezone (inclusive).
date (YYYY-MM-DD)
required
End of the period (inclusive). The period is at most 93 days.
string
IANA timezone of the local dates (for example America/Sao_Paulo). Default: the platform timezone.
array of string
Metrics to return, with the same ids as Mission Control usage. Default: consumption_net, consumption_charged, consumption_refunded.

Response

Response fields

Errors

Query refusals are JSON objects with a stable code, the same for every workspace of the call. Request validation failures (more than 25 workspace_ids, a malformed date) come back as a 422 in Laravel’s {message, errors} shape instead: