Skip to main content
GET
Get all recorded monthly usage for one metric or currency.

Authorizations

x-api-key
string
header
required

LedgerUp API Key.

Path Parameters

metric_id
string
required

LedgerUp metric identifier or three-letter currency code.

Pattern: ^(metric_[0-9a-f]{32}|[A-Za-z]{3})$
Example:

"usd"

Query Parameters

aggregation
enum<string>
default:sum

Aggregation applied to corrected usage events. latest returns the quantity from the event with the latest occurred_at; ties use accepted_at then event ID. count returns the number of events.

Available options:
sum,
min,
max,
avg,
latest,
count
Example:

"sum"

Response

Metric or currency usage grouped by UTC calendar month.

aggregation
enum<string>
default:sum
required

Aggregation applied to corrected usage events. latest returns the quantity from the event with the latest occurred_at; ties use accepted_at then event ID. count returns the number of events.

Available options:
sum,
min,
max,
avg,
latest,
count
Example:

"sum"

data
object[]
required