Skip to main content
GET
Get usage

Authorizations

x-api-key
string
header
required

Query Parameters

from
string

Start date to query usage (UTC).

Maximum 31 days from current date.

Must be earlier than the to date/time.

to
string

End date/time to query usage (UTC).

Accepted formats: date (2025-01-01) or RFC3339 (2025-01-01T10:00:00Z).

Must be later than the from date/time.

Usage is aggregated in hourly buckets, and the range includes the hourly bucket containing to. A date-only value is interpreted as midnight UTC (00:00:00), so it returns only the first hour of that day — to include a full final day, pass to=YYYY-MM-DDT23:59:59Z.

group_by
string

Group usage data by the specified dimension.

When set to subaccount, returns usage broken down by sub-account with an additional username field in each record.

When set to subuser, returns usage broken down by the subaccount label set in the proxy username, with an additional subuser field in each record. Traffic without a label is returned in a record without subuser.

Any other value returns 400.

Response

Successfully retrieved usage

date
string

Date for usage data

Example:

"2025-01-01"

username
string

Sub-account proxy username. Only present when group_by=subaccount.

subuser
string

Sub-user label from the subaccount proxy username parameter. Only present when group_by=subuser and the traffic has a label.

total
number

Total number of connections

Example:

1000

successful
number

The number of successful connections

Example:

500

used_bytes
number

Bytes consumed (raw bytes).

To convert to GB as shown in the dashboard, divide by 10⁹ (decimal GB, not 2³⁰).

Example:

123456789