Skip to main content
GET
Get monthly usage totals by metric or currency.

Authorizations

x-api-key
string
header
required

LedgerUp API Key.

Query Parameters

start_at
integer<int64>
required

Inclusive lower bound for event occurrence time. Unix timestamp in seconds.

Example:

1767225600

end_at
integer<int64>
required

Exclusive upper bound for event occurrence time. Unix timestamp in seconds.

Example:

1767225600

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"

currency
string

Aggregate only events for this currency. Normalized to lowercase.

Pattern: ^[A-Za-z]{3}$
Example:

"usd"

Response

Namespace usage grouped by UTC calendar month and metric or currency.

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