Skip to main content
POST
Get batched usage data

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

next_page
string

Cursor that indicates where the next page of results should start.

Body

application/json

The usage query to run

window_size
enum<string>
required

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.

Available options:
hour,
day,
none,
HOUR,
DAY,
NONE,
Hour,
Day,
None
starting_on
string<date-time>
required
ending_before
string<date-time>
required
customer_ids
string<uuid>[]

A list of Metronome customer IDs to fetch usage for. If absent, usage for all customers will be returned.

billable_metrics
object[]

A list of billable metrics to fetch usage for. If absent, all billable metrics will be returned.

Response

200 - application/json

Success

data
object[]
required
next_page
string | null
required