Docs
Have a token? Manage tokens in the console
GET
/v1/accounts/orgs/{org_id}/units/series

The account's calls, tokens and units per UTC day, split by who made them (a key, or a person on the sites), by category or by operation. The four largest groups are named and the rest are summed as other. Thirty days by default, 92 at most.

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 (docs.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

from?string

The first day, YYYY-MM-DD (UTC); 29 days before to when empty.

to?string

The last day, YYYY-MM-DD (UTC); today when empty.

by?string

who, category or operation; empty for the account's total.

Response Body

iohr.accounts.v1.GetUnitSeriesResponse

application/json
  1. response

iohr.accounts.v1.GetUnitSeriesResponse

by*string
from*string
groups*array<>
rows*array<>
to*string
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.getUnitSeries("<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.

{  "by": "string",  "from": "string",  "groups": [    {      "id": "string",      "label": "string",      "units": "string"    }  ],  "rows": [    {      "calls": "string",      "client_errors": "string",      "day": "string",      "group": "string",      "p50_ms": 0,      "p95_ms": 0,      "platform_errors": "string",      "tokens": "string",      "units": "string"    }  ],  "to": "string"}