Sign in
Docs

API reference

Get traffic

Have a token? Manage tokens in the console
GET
/v1/accounts/orgs/{org_id}/requests/traffic

The account's calls over a window, from the request log: about 30 equal buckets of calls, failures and p50/p95 answer times, the totals with the error rate and calls a minute, the ten operations failing most with their most common code, and the last 20 failed calls with their operation, code, time and request id. Aggregates only: never a key, a person or what was sent or answered. Percentiles are approximate (t-digest).

Needs scope usage:read.

Authorization

bearer
headerAuthorizationBearer <token>

An access token from the identity provider: a person's, or a customer's from the client credentials grant with an API key (developers.inorbit.hr). The gateway verifies it; the audience is iohr-api.

Path Parameters

org_id*string

The account's id: org in GET /v1/me.

Query Parameters

window?string

5m, 15m, 1h, 6h or 24h; empty is 15m.

until?string

RFC 3339; the window ends here. Empty is now; within the last 30 days.

rpc_prefix?string

Only operations whose full name starts with this, such as iohr.billing.; empty for all.

Response Body

iohr.accounts.v1.GetTrafficResponse

application/json
  1. response

iohr.accounts.v1.GetTrafficResponse

bucket_secs*integer
Formatint32
buckets*array<>
from*string
quantiles*string
recent_failures*array<>
to*string
top_failing*array<>
totals?

iohr.accounts.v1.TrafficTotals

import { ApiError, Public } from "@inorbithr/sdk";// Reads INORBIT_TOKEN, or INORBIT_KEY_ID and INORBIT_KEY_SECRET.const api = Public.fromEnv();try {  const { value } = await api.accounts.getTraffic("<org_id>");  console.log(value);} catch (e) {  if (!(e instanceof ApiError)) throw e;  console.error(`${e.code}: ${e.problem} (request id ${e.raw.requestId})`);}

npm install @inorbithr/sdk. Calls the package's public surface; an operation newer than your package needs the next release or a client generated for your account. The SDKs.

{  "bucket_secs": 0,  "buckets": [    {      "at": "string",      "calls": "string",      "client_failures": "string",      "failures": "string",      "p50_ms": 0,      "p95_ms": 0,      "platform_failures": "string"    }  ],  "from": "string",  "quantiles": "string",  "recent_failures": [    {      "at": "string",      "code": "string",      "duration_ms": 0,      "outcome": "string",      "request_id": "string",      "rpc": "string"    }  ],  "to": "string",  "top_failing": [    {      "calls": "string",      "error_rate": 0.1,      "failures": "string",      "p95_ms": 0,      "rpc": "string",      "top_code": "string"    }  ],  "totals": {    "calls": "string",    "calls_per_minute": 0.1,    "client_failures": "string",    "error_rate": 0.1,    "failures": "string",    "p50_ms": 0,    "p95_ms": 0,    "p99_ms": 0,    "platform_error_rate": 0.1,    "platform_failures": "string"  }}