includeUsage=true on GET /reseller/account or GET /reseller/users instead.
Both endpoints are served from stored history without contacting the proxy network, so they are fast and you can call them as often as you like. Use them for dashboards and trends.
Request
- Node.js
- Python
- cURL
Node.js
/reseller/users/acme_customer1/usage-history with the same parameters.
Query Parameters
When you leave out
from, you get this default range:
Response
Response
Real-Time Totals
Stored history can be up to 15 minutes behind. Addlive=true to read the current counters and add the difference to the current period:
cURL
live=true looks up your own account and every sub-user, so it is slower. It is skipped automatically when the range doesn’t reach the present, so historical queries stay fast.
How the Data Is Collected
- Every account’s usage counters are saved every 15 minutes.
hourseries use these, so they can be up to 15 minutes behind. These snapshots are kept for 90 days. - Every day at 00:20 UTC, the previous day is summed into one record per account, which is kept forever.
day,week,monthandyearseries use these. - The current day is filled in from the latest snapshots, so “today” is never empty.
- If an account’s counters reset, for example because the account was recreated, the period is never shown as negative.
- Deleting a sub-user doesn’t remove its usage from your history.
Errors
Range too long (400)
Range too long (400)
Each granularity has a maximum range. Use a shorter range or a larger granularity, for example
week instead of day.Sub-user not found (404)
Sub-user not found (404)
The username in
/reseller/users/:username/usage-history isn’t one of your sub-users.Limits
- Freshness: up to 15 minutes behind without
live=true. - Hourly data: kept for 90 days. Daily and longer periods are kept forever.
- Start date: history starts from when this feature launched. Older periods show as empty.
Related
Sub-Users
Live usage for one sub-user.
Error Handling
All Reseller API errors and when to retry.