Retrieve granular usage data for a specific customer and billable metric, with the ability to break down usage by custom grouping dimensions. This endpoint enables deep usage analytics by segmenting data across attributes like region, user, model type, or any custom dimension defined in your billable metrics.
An array of PagedUsageAggregate objects containing:
starting_on and ending_before: Time window boundariesgroup_key: The dimension being grouped by (e.g., “region”)group_value: The specific value for this group (e.g., “US-East”)value: Aggregated usage for this group and time windownext_page: Pagination cursor for large datasetscustomer_id, billable_metric_id, and window_sizewindow_size to hour, day, or none for different granularitiesgroup_by to specify:
next_page for large result setsgroup_value may be null for unmatched dataBearer authentication header of the form Bearer <token>, where <token> is your auth token.
Max number of results that should be returned
1 <= x <= 100Cursor that indicates where the next page of results should start.
The usage query to run
A window_size of "day" or "hour" will return the usage for the specified period segmented into daily or hourly aggregates. A window_size of "none" will return a single usage aggregate for the entirety of the specified period.
hour, day, none, HOUR, DAY, NONE, Hour, Day, None If true, will return the usage for the current billing period. Will return an error if the customer is currently uncontracted or starting_on and ending_before are specified when this is true.