Skip to content
Markets open

API reference

API usage

Request volume, error rate and latency for your own API traffic.

1 operationBase URL https://packetexchange.io/api/v1Postman collection

Get API usage for your account or one key

GET/api/v1/account/api-usage

Access
API key. Scoped keys need account:read.
Rate limit
100 requests per second (the default)

Request volume, error rate, p95 latency, per-day counts and top endpoints over a trailing window (default 7 days, max 90). Pass keyId to see one API key; omit it for all traffic including dashboard sessions.

Parameters

NameInTypeDescription
daysqueryintegerTrailing window in days (1-90)Default 7
keyIdquerystring (uuid)Only requests made with this API key (one of yours)

Response 200

FieldTypeDescription
datarequiredobject-
totalRequestsrequireddata.totalRequestsinteger-
errorRaterequireddata.errorRatenumberFraction of requests answered 4xx/5xx, 0 to 1
p95LatencyMsrequireddata.p95LatencyMsinteger-
byDayrequireddata.byDayobject[]-
daterequireddata.byDay[].datestringYYYY-MM-DD (UTC)
countrequireddata.byDay[].countinteger-
errorsrequireddata.byDay[].errorsinteger-
topEndpointsrequireddata.topEndpointsobject[]-
pathrequireddata.topEndpoints[].pathstringRoute pattern, e.g. /api/v1/routes/:id
countrequireddata.topEndpoints[].countinteger-
keyIdrequireddata.keyIdstring (uuid) | nullThe key the figures are filtered to, or null for all traffic

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.