Usage
Query Usage
Time-windowed usage buckets for a subscription or customer
GET
Time-windowed usage buckets
Aggregates usage events into time buckets (
date_trunc by day or month) over
an arbitrary window. Use it to power usage charts and consumption dashboards.
At least one of subscription_id or customer_id is required. Both may be
combined to scope a customer’s usage to a single subscription.
Query Parameters
Example Request
Response
Buckets are returned in ascendingperiod order, alongside the resolved
window (useful when you relied on the defaults). Buckets with no usage are
omitted rather than zero-filled.
Errors
Errors use the standard envelope — see Errors.
Usage is tenant-scoped through the subscription: you can only ever see
buckets for subscriptions that belong to the authenticated tenant.
Authorizations
Tenant API key obtained from POST /auth/register or POST /v1/developer/keys.
Query Parameters
Filter to a single dimension.
Window start (RFC3339, inclusive). Default: to - 30 days.
Window end (RFC3339, exclusive). Default: now.
Available options:
day, month Time-windowed usage buckets