Skip to content
Go to Boltz API

Get a workspace spending limit

admin.workspaces.retrieve_spending_limit(strworkspace_id) -> WorkspaceRetrieveSpendingLimitResponse
GET/compute/v1/admin/workspaces/{workspace_id}/spending-limit

Get a workspace spending limit

ParametersExpand Collapse
workspace_id: str
ReturnsExpand Collapse
class WorkspaceRetrieveSpendingLimitResponse:

Configured lifetime workspace spending limit, or null if unset. Unset workspaces have no workspace-level cap and continue to use organization-level billing.

limit: Limit
amount: int

Workspace spending limit amount in milli-USD. Tracking starts when the limit is configured; prior or already-committed unreserved work is not counted in this workspace cap ledger.

minimum0
maximum9007199254740991
currency: Literal["MILLI_USD"]

Workspace spending limits currently support milli-USD only.

type: Literal["lifetime"]

Get a workspace spending limit

import os
from boltz_api import Boltz

client = Boltz(
    api_key=os.environ.get("BOLTZ_API_KEY"),  # This is the default and can be omitted
)
response = client.admin.workspaces.retrieve_spending_limit(
    "workspace_id",
)
print(response.limit)
{
  "limit": {
    "amount": 5000,
    "currency": "MILLI_USD"
  },
  "type": "lifetime"
}
Returns Examples
{
  "limit": {
    "amount": 5000,
    "currency": "MILLI_USD"
  },
  "type": "lifetime"
}