Skip to main content
paradime.admin.usage reads Bolt and DinoAI usage in a period: the numbers that the Usage page shows. For the GraphQL operations, see Usage.
Prerequisites
  • These operations are part of the Enterprise plan. On other plans, they raise AdminPlanUpgradeRequiredException.
  • Your API key needs the Usage viewer capability group.
  • The admin client of the paradime-io package. See Admin client.
The examples on this page use this client. Usage calls need no workspace, so the client has no workspace_uid:
A period starts at period_from (included) and ends at period_to (excluded). It can be at most 366 days long. A datetime without a timezone is UTC. A UTC calendar month gives the numbers that the Usage page shows for that month. Deleted workspaces are left out, and a recent period can still grow while runs end.

Get usage

Reads Bolt and DinoAI usage in a period, summed over the workspaces you ask for.
datetime
required
When the period starts, included.
datetime
required
When the period ends, excluded. At most 366 days after period_from.
Optional[str]
default:"None"
One workspace to sum. Leave it out for every workspace that the API key can reach.
Optional[Usage]
The usage, or None when the server returned none.

List usage per workspace

Iterates over a period’s usage one workspace at a time, ordered by workspace uid.
datetime
required
When the period starts, included.
datetime
required
When the period ends, excluded.
Optional[str]
default:"None"
Only this workspace.
int
default:"100"
How many workspaces to read per request, at most 500.
Iterator[WorkspaceUsage]
Each workspace’s usage, read one page at a time.

Types

Import the models from paradime.apis.admin.usage.types.
model
model