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

KeyDatatypeRequiredDescription
limitstringMax number of results that should be returned
next_pagestringCursor 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

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;data&quot;:[{&quot;starting_on&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;ending_before&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;group_key&quot;:&quot;\u003cstring\u003e&quot;,&quot;group_value&quot;:&quot;\u003cstring\u003e&quot;,&quot;value&quot;:&quot;\u003cnumber\u003e&quot;},{&quot;starting_on&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;ending_before&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;group_key&quot;:&quot;\u003cstring\u003e&quot;,&quot;group_value&quot;:&quot;\u003cstring\u003e&quot;,&quot;value&quot;:&quot;\u003cnumber\u003e&quot;}],&quot;next_page&quot;:&quot;\u003cstring\u003e&quot;}