Billing aggregation
How much I spent over a period and where it went: an interval total plus a grouped breakdown by day, by data app or by credential. Independent of /account — account is an identity endpoint and carries no time series.
The time range shares vocabulary with the run list: created_from
/ created_to (ISO-8601 absolute timestamps, inclusive start,
exclusive end, attributed by run start time) — carry the same
parameters into GET /runs and you get exactly the runs behind any
group’s numbers. tz_offset only affects which day a run falls
into for day buckets (so callers can reconcile by their local day)
and changes no amounts or range predicates. Only data fees are
aggregated. Day groups are ascending (read reconciliation front to
back); data app / credential groups are by amount descending
(where the money mainly goes / which key spends it).
The credential grouping answers “how much did each of my
credentials spend” (tracing which key a runaway script holds): the
key is the originating credential’s non-secret stable identifier,
the same value as the credential filter on GET /runs — ownership
is always user-scoped; credentials are only a partition within it,
never a cross-user view.
Authorizations
DataHub API Key
Query Parameters
^(day|data_app|credential)$timezone offset for day buckets (minutes relative to UTC, e.g. 480 for UTC+8); default 0 means UTC days. Fixed offset, no DST; drill-down boundaries must be converted with the same offset into UTC absolute timestamps and passed as created_from/to
-720 <= x <= 840Response
Successful Response
Spending aggregate from the caller's perspective (billing report): range total plus per-group breakdown. Data fees only.