Box’a’Fox
API referenceAnalytics

Usage time series

GET
/v1/analytics/graph

Usage over time by minute, hour or day. Minute data covers the last 48 hours. Points without traffic are returned as zeros.

Authorization

ApiKey
headerX-API-Key<token>

prx_live_<40 base62>

Query Parameters

preset?string

Sets from/to/interval.

Value in"last_hour""last_day""last_week""last_30_days""last_90_days"
from?string

Required without preset.

Formatdate-time
to?string

Exclusive; max 90 days after from.

Formatdate-time
interval?string

minute ≤ 24 h span, hour ≤ 31 d, day.

Value in"minute""hour""day"
network?string
Value in"residential""mobile"
proxy_user_id?string

Response Body

OK

application/json
  1. response
data*
message*string

Human-readable status, safe to show to end users.

curl -X GET "https://example.com/v1/analytics/graph"
{  "data": {    "from": "2019-08-24T14:15:22Z",    "interval": "minute",    "points": [      {        "bytes": 0,        "bytes_mobile": 0,        "bytes_residential": 0,        "error": 0,        "requests": 0,        "successful": 0,        "ts": "2019-08-24T14:15:22Z"      }    ],    "to": "2019-08-24T14:15:22Z",    "totals": {      "bytes": 0,      "error": 0,      "requests": 0,      "successful": 0    }  },  "message": "OK"}