Usage
Read-only ledger-derived Organization usage summary, semantically identical to the dashboard usage projection. Responses are Cache-Control no-store. An unknown or foreign organization is indistinguishable from a missing one.
Authorization
DeveloperCredential In: header
Query Parameters
Organization to read. Optional for callers with exactly one active Membership; required (organization_required) when membership is ambiguous. Never an authorization input on its own.
^[A-Za-z0-9]{16}$16 <= length <= 16Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/usage"{
"organization_id": "stringstringstri",
"available_credit_units": 0,
"allowance_ends_at": "2019-08-24T14:15:22Z",
"allowance": {
"starts_at": "2019-08-24T14:15:22Z",
"ends_at": "2019-08-24T14:15:22Z"
},
"active_reservations": 0,
"reserved_credit_units": 0,
"settled_credit_units": 0,
"current_cycle": {
"starts_at": "2019-08-24T14:15:22Z",
"ends_at": "2019-08-24T14:15:22Z",
"settled_events": 0,
"settled_credit_units": 0,
"reserved_credit_units": 0
},
"previous_cycle": {
"starts_at": "2019-08-24T14:15:22Z",
"ends_at": "2019-08-24T14:15:22Z",
"settled_events": 0,
"settled_credit_units": 0,
"reserved_credit_units": 0
}
}Cursor-paged, append-only settled usage events, newest first. Settlements and compensating Credit entries are immutable and typed as what they are. Cursors are opaque and stable across pages.
Authorization
DeveloperCredential In: header
Query Parameters
Organization to read. Optional for callers with exactly one active Membership; required (organization_required) when membership is ambiguous. Never an authorization input on its own.
^[A-Za-z0-9]{16}$16 <= length <= 16length <= 5121 <= value <= 20050Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/usage/events"{
"items": [
{
"id": "stringstringstri",
"type": "settlement",
"job_id": "stringstringstri",
"workflow": "string",
"rating_policy_version": "string",
"rated_quantity": 0,
"rated_unit": "string",
"credit_units": 0,
"settled_at": "2019-08-24T14:15:22Z"
}
],
"next_cursor": "string"
}Bounded aggregation of settled usage grouped by day, project, or workflow over a server-bounded window (92 days maximum; oversized windows are clamped and the effective window echoed). The credential dimension is reserved vocabulary and fails with the stable error code unsupported_dimension until credential attribution is recorded on Jobs.
Authorization
DeveloperCredential In: header
Query Parameters
Organization to read. Optional for callers with exactly one active Membership; required (organization_required) when membership is ambiguous. Never an authorization input on its own.
^[A-Za-z0-9]{16}$16 <= length <= 16"day"Value in
- "day"
- "project"
- "workflow"
- "credential"
date-timedate-timeResponse Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/usage/breakdown"{
"dimension": "day",
"from": "2019-08-24T14:15:22Z",
"to": "2019-08-24T14:15:22Z",
"groups": [
{
"key": "string",
"settled_events": 0,
"charged_credit_units": 0,
"released_credit_units": 0
}
],
"truncated": true
}