Prerequisites:
- These operations are part of the Enterprise plan. On other plans, they fail with
PLAN_UPGRADE_REQUIRED. - An account API key with the
X-Paradime-Workspaceheader, or a workspace API key. - The Environment admin capability group. To read
Environment.discovery, the key also needs Discovery API viewer. To readEnvironment.deferSchedule, it also needs Bolt admin or another group withbolt:schedules:list.
Operations
Environment types and slugs
An environment’stype is SCHEDULER for a Bolt environment, where scheduled runs execute, or AGENT for an agent environment, where DinoAI agent runs execute. Each type has one default environment: runs of that type use it when they name no environment.
Every environment has a slug, unique in its workspace, and the slug never changes. The operations on this page name an environment by its slug. A slug is lowercase letters and digits in groups joined by single hyphens, at most 80 characters, and is not production.
Older workspaces have a built-in Bolt environment with the slug production. A new workspace, such as one from createWorkspace, gets a default Bolt environment and a default agent environment with generated slugs. Read environments to find the slugs.
Create an environment
createEnvironment creates an environment in the workspace that the key targets. A new agent environment defers to the default Bolt environment.
nameis the display name.slugis optional. Send your own slug to make the call safe to retry: sending the same input again returns the same environment, and the same slug with other settings is aCONFLICT. Without a slug, Paradime generates one, and every call creates another environment.branchis the git branch its runs use. Leave it out for the workspace’s default branch.dbtVersionis one of the workspace’ssupportedDbtVersions. Leave it out to follow the workspace’s dbt™ version.
Example response
Example response
createWarehouseConnection, and its variables with setEnvironmentVariables.
List environments
environments lists the workspace’s environments, ordered by slug. Pass type to list only one type.
deferEnvironment is null when the agent environment defers to a schedule or to nothing. deferSchedule is null when it defers to an environment or to nothing.
To read a Bolt environment’s Discovery API data, select discovery. It returns the same data as the root environment(slug:) query, and it is null for an agent environment.
Change an environment
updateEnvironment changes only the settings that you send:
name: a new display name. It can’t benull.branch: the git branch its runs use.nullsets the workspace’s default branch.dbtVersion: the dbt™ version its runs use.nullfollows the workspace’s dbt™ version. Changing a Bolt environment’s version redeploys the workspace’s Bolt schedules.
setDefaultEnvironment:
Set what an agent environment defers to
An agent environment’s runs defer to the most recent run of a Bolt environment, or to the runs of one Bolt schedule. IndeferTo, set exactly one of environmentSlug and scheduleSlug. Send deferTo: null to clear the target. Only an agent environment has a defer target.
Delete an environment
deleteEnvironment deletes an environment with its warehouse connections and variables. Its slug is free to use again. Deleting it again is not an error.
Errors
These are the cases specific to environments. For the error format and the codes every area shares, see Errors.Related
- Python SDK: Environments: the same operations in
paradime.admin.environments. - Paradime CLI:
paradime admin:paradime admin environmentslists, creates, updates, and deletes environments, and sets the default and the defer target. - Create and manage environments: the same settings in the app.
- Agent environment: defer to a previous run: how agents use the defer target.
- Administration API: Warehouse connections and Environment variables: what each environment holds.