Skip to content

Get Workspace Usage

GET /workspaces/{workspace_id}/usage

One workspace’s usage.

The workspace is narrowed onto the scope, not filtered in a WHERE clause written here: an organization principal asking about a workspace it does not own gets the empty set from the same predicate that governs every other read (I-01), rather than from a check this handler would have to remember to perform.

NameInTypeNotes
workspace_idpathstring (uuid)required—
fromquerystring (date-time) | nulloptional—
toquerystring (date-time) | nulloptional—
group_byqueryagent | model | provider | day | workspace | credential | trigger | persona | nulloptional—
StatusDescriptionBody
200Successful ResponseUsageSummaryView
422Validation ErrorHTTPValidationError
Terminal window
curl -X GET https://your-deployment.example.com/workspaces/{workspace_id}/usage \
-H "Authorization: Bearer $COBRE_TOKEN"
FieldTypeNotes
window_startstring (date-time)required—
window_endstring (date-time)required—
group_byagent | model | provider | day | workspace | credential | trigger | persona | nulloptional—
currencystringoptionalDefault "USD".
totalUsageBucketrequired—
groupsUsageBucket[]optional—
unpriced_callsintegeroptionalDefault 0.