Skip to content

Get workspace daily usage summary

PubNio API billing.usage.get: get workspace daily usage summary. Request fields, examples in five clients, errors, and idempotency.

Get workspace daily usage summary with GET /api/v1/workspaces/{workspaceId}/billing/usage. Requires an API key with the read scope or a signed-in workspace member.

Request

Parameter In Type Required
workspaceId path UUID Yes
from query string No
to query string No
meter query one of 6 strings No
provider query one of 12 strings No

Response

  • HTTP 200: BillingUsage with from, to, totals, data.

The OpenAPI document has each field’s type.

Examples

const usage = await workspace.billing.usage();
usage = workspace.billing.get_usage()
curl "https://pubnio.com/api/v1/workspaces/$WORKSPACE_ID/billing/usage" \
  -H "Authorization: Bearer $PUBNIO_API_KEY"
pnio billing usage
async () => {
  const response = await codemode.request({
    method: "GET",
    path: `/api/v1/workspaces/${codemode.workspaceId}/billing/usage`,
  });
  return response.data;
};

Errors

It also declares the problems most operations declare.

Idempotency

None needed: a read is safe to retry.

Limits

Type to search…

↑↓ navigate↵ selectEsc close