Skip to main content
paradime.admin.workspaces creates, reads, changes and deletes workspaces. For the GraphQL operations, see Workspaces.
Prerequisites
  • Reading workspaces and their settings works on every plan. Creating, updating, and deleting a workspace is part of the Enterprise plan. On other plans, these calls raise AdminPlanUpgradeRequiredException.
  • To create, update or delete a workspace, use a company API key with the Workspace admin capability group. Only company API keys can have this group.
  • To list workspaces or read their settings, the key needs Workspace admin or Workspace metadata viewer.
  • The admin client of the paradime-io package. See Admin client.
The examples on this page use this client:

Get a workspace

Reads a workspace and its settings.
Optional[str]
default:"None"
The workspace’s uid. Leave it out for the workspace that the API key targets: a workspace key’s own workspace, or the workspace_uid of the client.
Optional[AdminWorkspace]
The workspace, or None when the server returned none. A uid that the key can’t reach raises AdminNotFoundException.

List workspaces

Iterates over the workspaces that the API key can reach, ordered by uid. A company API key reaches every workspace that it was granted.
int
default:"100"
How many workspaces to read per request, at most 500.
Iterator[AdminWorkspace]
The workspaces, read one page at a time.

Create a workspace

Creates a workspace and lets the calling company API key reach it. Needs a company API key. The new workspace has no members: invite its first admin with users.create. It comes with two environments: a default Bolt environment named Production, and a default agent environment named Agent that defers to it. Their slugs are generated: read them with environments.list. Sending the same name again returns the existing workspace. When that workspace runs another dbt™ version than the dbt_version you send, or the API key can’t reach it, the call raises AdminConflictException. When the company has used every workspace its plan allows, the call raises AdminPlanUpgradeRequiredException.
str
required
The workspace’s name, unique among the company’s workspaces. The check ignores case.
Optional[str]
default:"None"
The dbtâ„¢ version to run. The latest version by default.
AdminWorkspace
The new workspace, or the existing one.

Update a workspace

Changes a workspace’s settings. Needs a company API key. A setting you leave out keeps its value. None clears default_branch and schedule_deployment_branch. name, dbt_version and dbt_partial_parsing can’t be None.
str
required
The uid of the workspace to change.
str
A new name, unique among the company’s workspaces.
str
The dbt™ version to run, one of the workspace’s supported_dbt_versions. The change restarts the workspace’s editors and redeploys its Bolt schedules.
bool
Whether dbtâ„¢ uses partial parsing.
Optional[str]
The git branch that Paradime treats as the repository’s default. None clears it. The change reparses the Bolt schedules.
Optional[str]
The git branch that Bolt schedules deploy from. None deploys from the default branch. The change reparses the Bolt schedules.
AdminWorkspace
The workspace, with its new settings.

Delete a workspace

Deletes a workspace. Needs a company API key. Deleting it again is not an error. The company’s last workspace can’t be deleted: that call raises AdminConflictException.
str
required
The uid of the workspace to delete.
AdminWorkspace
The deleted workspace. Its settings read as None.

Types

Import the model from paradime.apis.admin.workspaces.types.
model