Skip to content

Usage

Get Usage Cost

COGS breakdown — byo provider spend vs platform cost. Admin/owner only (dollar figures are org-sensitive). Checked against the path org, not a header, so it can’t be bypassed with a mismatched X-Org-Id.

Parameters

NameInTypeRequiredDescription
org_idpathstring (uuid)yes
windowquerystringnoWindow: 24h, 7d, 30d (default 30d)

Responses

StatusDescriptionBody
200Successful ResponseCostBreakdownResponse
422Validation ErrorHTTPValidationError

Get Usage Series

Time series for one metric, oldest→newest. 400 on an unknown/derived metric (e.g. storage_bytes — use its component metrics) or bad granularity.

Parameters

NameInTypeRequiredDescription
granularityquerystringnoOne of (‘day’, ‘month’)
metricquerystringyesRollup metric value (see the metric catalog)
org_idpathstring (uuid)yes
windowquerystringnoWindow: 24h, 7d, 30d (default 30d)

Responses

StatusDescriptionBody
200Successful ResponseUsageSeriesResponse
422Validation ErrorHTTPValidationError

Get Usage Summary

Current usage for an org: counters summed over the window, gauges at their latest reading (window-independent), derived storage_bytes, and cost totals.

Empty while metering is dark — no rollups yet means zeroed maps.

Parameters

NameInTypeRequiredDescription
org_idpathstring (uuid)yes
windowquerystringnoCounter/cost window: 24h, 7d, 30d (default 30d)

Responses

StatusDescriptionBody
200Successful ResponseUsageSummaryResponse
422Validation ErrorHTTPValidationError