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.
bearerAuthorizationBearer <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.
org_id*stringThe account's id: org in GET /v1/me.
iohr.accounts.v1.GetUnitsResponse
application/json- response
iohr.accounts.v1.GetUnitsResponse
account_id*stringallowance*stringint64days*array<>granted*stringint64month*stringplan?iohr.accounts.v1.Plan
remaining*stringint64resets_at*stringusage*array<>used*stringint64import { 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"}List audit log entries GET
The account's audit log: who changed its members, roles, invitations, keys, tokens, name, plan, policy or deletion, and when, with the changed fields before and after. Newest first; with `after`, only newer entries, oldest first, which is how an `audit.event` webhook receiver fetches what it was told about. Needs a token given `account:audit`, and reads its own account. Needs scope `account:audit`.
Get units per day GET
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`.