Skip to main content
Workspace methods let you query the workspaces (teams) you belong to, inspect their nodes, and check resource quotas. Every CVM belongs to a workspace, and quotas are enforced at the workspace level.

list_workspaces

GET /workspaces Lists all workspaces the authenticated user has access to. Parameters: Optional dictionary of query parameters. Returns: List of workspace summaries. Example:
workspaces = client.list_workspaces()
for ws in workspaces.items:
    print(ws.slug, ws.name)

get_workspace

GET /workspaces/{teamSlug} Retrieves detailed information about a specific workspace. You can pass the team slug as a plain string or as a dictionary. Parameters:
FieldTypeRequiredDescription
team_slugstrYesWorkspace slug identifier
Returns: Workspace detail response. Example:
# Pass slug directly as a string
ws = client.get_workspace("my-team")

# Or pass as a dict
ws = client.get_workspace({"team_slug": "my-team"})
print(ws.name)

get_workspace_nodes

GET /workspaces/{teamSlug}/nodes Lists the TEE nodes available to a workspace. Supports pagination. Parameters:
FieldTypeRequiredDescription
team_slugstrYesWorkspace slug identifier
pageintNoPage number (1-based)
page_sizeintNoItems per page
Returns: Paginated list of workspace nodes. Example:
nodes = client.get_workspace_nodes({
    "team_slug": "my-team",
    "page": 1,
    "page_size": 20,
})
for node in nodes.items:
    print(node.id, node.name)

get_workspace_quotas

GET /workspaces/{teamSlug}/quotas Returns the resource quotas and current usage for a workspace. This includes limits on CVMs, vCPUs, memory, and other resources. Like get_workspace, you can pass the team slug as a string or dictionary. Parameters:
FieldTypeRequiredDescription
team_slugstrYesWorkspace slug identifier
Returns: Workspace quotas response with limits and current usage. Example:
quotas = client.get_workspace_quotas("my-team")
print(quotas.model_dump())