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-iopackage. See Admin client.
Get a workspace
Reads a workspace and its settings.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.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.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 withusers.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.
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.
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.The git branch that Paradime treats as the repository’s default.
None clears it. The change reparses the Bolt schedules.The git branch that Bolt schedules deploy from.
None deploys from the default branch. The change reparses the Bolt schedules.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 raisesAdminConflictException.
Types
Import the model fromparadime.apis.admin.workspaces.types.