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

The account's units this month: the plan, the allowance, what was used by category, operation and key, and what remains. A key reads its own account.

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.

Response Body

iohr.accounts.v1.GetUnitsResponse

application/json
  1. response

iohr.accounts.v1.GetUnitsResponse

account_id*string
allowance*string
Formatint64
days*array<>
granted*string
Formatint64
month*string
plan?

iohr.accounts.v1.Plan

remaining*string
Formatint64
resets_at*string
usage*array<>
used*string
Formatint64
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.getUnits("<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.

{  "account_id": "string",  "allowance": "string",  "days": [    {      "day": "string",      "units": "string"    }  ],  "granted": "string",  "month": "string",  "plan": {    "accounts": "string",    "at_zero": "string",    "description": "string",    "monthly_units": "string",    "name": "string",    "updated_at": "string"  },  "remaining": "string",  "resets_at": "string",  "usage": [    {      "calls": "string",      "category": "string",      "client_errors": "string",      "key_id": "string",      "key_name": "string",      "p50_ms": 0,      "p95_ms": 0,      "platform_errors": "string",      "rpc": "string",      "tokens": "string",      "units": "string",      "user_id": "string",      "user_name": "string"    }  ],  "used": "string"}