An API token is required. Set it as an environment variable before running the examples:
Get aggregated consumption
Returns the selected metric aggregated across all matching clients into a single daily total for the reporting period.
The API returns:
The amount field reports the accrued value of the selected metric for that date.
Get consumption per client
Returns the same metric keyed by client ID, with one list of daily entries per client instead of a single aggregated total. It accepts the same parameters as the aggregated total endpoint.
The API returns:
Each key under clients is a client ID, and its value is the same date and amount pairs returned by the aggregated total endpoint, scoped to that one client.