Get batched usage data
POST {{baseUrl}}/usage?next_page=<string>
Fetch aggregated usage data for multiple customers and billable-metrics, broken into intervals of the specified length.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
next_page | string | Cursor that indicates where the next page of results should start. |
Request Body
{"window_size"=>"DAY", "starting_on"=>"<dateTime>", "ending_before"=>"<dateTime>", "customer_ids"=>["<uuid>", "<uuid>"], "billable_metrics"=>[{"id"=>"<uuid>", "group_by"=>{"key"=>"<string>", "values"=>["<string>"]}}, {"id"=>"<uuid>", "group_by"=>{"key"=>"<string>", "values"=>["<string>"]}}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"data":[{"customer_id":"\u003cuuid\u003e","billable_metric_id":"\u003cuuid\u003e","billable_metric_name":"\u003cstring\u003e","start_timestamp":"\u003cdateTime\u003e","end_timestamp":"\u003cdateTime\u003e","value":"\u003cnumber\u003e","groups":{"do724":"\u003cnumber\u003e"}},{"customer_id":"\u003cuuid\u003e","billable_metric_id":"\u003cuuid\u003e","billable_metric_name":"\u003cstring\u003e","start_timestamp":"\u003cdateTime\u003e","end_timestamp":"\u003cdateTime\u003e","value":"\u003cnumber\u003e","groups":{"sintba6":"\u003cnumber\u003e","eiusmod5":"\u003cnumber\u003e"}}],"next_page":"\u003cstring\u003e"}