Sazabi
APIBilling

Get billing usage

GET
/billing/usage

Get per-dimension usage breakdown for the current or previous billing cycle.

Query Parameters

organizationId?string

Organization to query usage for. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).

Length1 <= length
cycle?string

Which billing cycle to report usage for.

Default"current"

Value in

  • "current"
  • "previous"

Response Body

application/json

curl -X GET "https://example.com/billing/usage"
{  "cycle": {    "startsAt": "2019-08-24T14:15:22Z",    "endsAt": "2019-08-24T14:15:22Z",    "billableStartsAt": "2019-08-24T14:15:22Z"  },  "usage": [    {      "dimension": "logs_ingested_bytes",      "totalQuantity": "string",      "ratedQuantity": "string",      "creditsConsumed": "string",      "sourceBreakdown": {        "property1": "string",        "property2": "string"      }    }  ]}