Skip to main content
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 ascending period 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

Authorization
string
header
required

Tenant API key obtained from POST /auth/register or POST /v1/developer/keys.

Query Parameters

subscription_id
string<uuid>
customer_id
string<uuid>
dimension
string

Filter to a single dimension.

from
string<date-time>

Window start (RFC3339, inclusive). Default: to - 30 days.

to
string<date-time>

Window end (RFC3339, exclusive). Default: now.

granularity
enum<string>
default:day
Available options:
day,
month

Response

Usage buckets plus the resolved window.

data
object[]
from
string<date-time>
to
string<date-time>
granularity
enum<string>
Available options:
day,
month