Retrieve aggregated usage data across multiple customers and billable metrics in a single query. This batch endpoint enables you to fetch usage patterns at scale, broken down by time windows, making it ideal for building analytics dashboards, generating reports, and monitoring platform-wide usage trends.
An array of UsageBatchAggregate
objects containing:
customer_id
: The customer this usage belongs tobillable_metric_id
and billable_metric_name
: What was measuredstart_timestamp
and end_timestamp
: Time window for this data pointvalue
: Aggregated usage amount for the periodgroups
(optional): Usage broken down by group keys with valuesnext_page
: Pagination cursor for large result setswindow_size
to hour
, day
, or none
(entire period)starting_on
, ending_before
, and window_size
customer_ids
: Limit to specific customers (omit for all customers)billable_metrics
: Limit to specific metrics (omit for all metrics)next_page
cursor to retrieve large datasetsBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Cursor that indicates where the next page of results should start.
The usage query to run
The body is of type object
.
Success
The response is of type object
.