Get usage data with paginated groupings
POST {{baseUrl}}/usage/groups?limit=<integer>&next_page=<string>
Fetch aggregated usage data for the specified customer, billable-metric, and optional group, broken into intervals of the specified length.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
limit | string | Max number of results that should be returned | |
next_page | string | Cursor that indicates where the next page of results should start. |
Request Body
{"billable_metric_id"=>"<uuid>", "customer_id"=>"<uuid>", "window_size"=>"None", "starting_on"=>"<dateTime>", "ending_before"=>"<dateTime>", "group_by"=>{"key"=>"<string>", "values"=>["<string>"]}, "current_period"=>"<boolean>"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"data":[{"starting_on":"\u003cdateTime\u003e","ending_before":"\u003cdateTime\u003e","group_key":"\u003cstring\u003e","group_value":"\u003cstring\u003e","value":"\u003cnumber\u003e"},{"starting_on":"\u003cdateTime\u003e","ending_before":"\u003cdateTime\u003e","group_key":"\u003cstring\u003e","group_value":"\u003cstring\u003e","value":"\u003cnumber\u003e"}],"next_page":"\u003cstring\u003e"}