Get billing usage
Returns an organization's billing usage for a month as cost-annotated line items grouped into time windows. Finalized windows are returned through the end of yesterday at daily granularity, or the last completed hour at hourly granularity (UTC).
Authorization
bearerAuth In: header
Query Parameters
Billing month in YYYY-MM format. Defaults to the current month, which returns data through yesterday (daily) or the last completed hour (hourly).
^\d{4}-(0[1-9]|1[0-2])$Organization to report on. Usage is always reported for the organization that owns the API key, so this is optional; supplying an ID that is not that organization returns 403.
1 <= lengthTime window size for rows. 'hour' returns ~24x more rows than 'day'.
"day"Value in
- "day"
- "hour"
Maximum number of time windows per page (max 1000).
1 <= value <= 1000100Opaque cursor from a previous response's next_cursor. Only valid for the month and granularity it was issued for. Current-month data is a moving snapshot: each page reflects data as of its request, so newly completed windows may appear at the end of the sequence.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/billing/usage"{ "object": "list", "organization_id": "string", "billing_period": "string", "earliest_window_start": "2019-08-24T14:15:22Z", "latest_window_end": "2019-08-24T14:15:22Z", "currency": "USD", "data": [ { "date": "string", "start_time": "2019-08-24T14:15:22Z", "end_time": "2019-08-24T14:15:22Z", "line_items": [ { "product_name": "string", "quantity": "string", "unit_price": "string", "cost": "string", "pricing_dimensions": { "property1": "string", "property2": "string" }, "attributes": { "property1": "string", "property2": "string" } } ] } ], "next_cursor": "string"}