Skip to main content
paradime.admin.environments manages a workspace’s Bolt (SCHEDULER) and DinoAI agent (AGENT) environments. Environments are named by slug. For the GraphQL operations, see Environments.
Prerequisites
  • These operations are part of the Enterprise plan. On other plans, they raise AdminPlanUpgradeRequiredException.
  • Your API key needs the Environment admin capability group. To read an agent environment’s defer_schedule, the key also needs a Bolt group that lists schedules, such as Bolt admin.
  • The admin client of the paradime-io package. See Admin client.
The examples on this page use this client:
Every new workspace has a default Bolt environment named Production and a default agent environment named Agent, which defers to it. In a workspace created through the API, their slugs are generated. Read them with list before you add connections or variables to them.

List environments

Iterates over the workspace’s environments, ordered by slug.
Optional[EnvironmentType]
default:"None"
Only environments of this type: SCHEDULER or AGENT.
Optional[str]
default:"None"
The workspace to read, for a company API key.
int
default:"100"
How many environments to read per request, at most 500.
Iterator[Environment]
The environments, read one page at a time.

Get an environment

Finds an environment by slug.
str
required
The environment’s slug.
Optional[str]
default:"None"
The workspace to read, for a company API key.
Optional[Environment]
The environment, or None when the workspace has no environment with this slug.

Create an environment

Creates an environment. With a slug, sending the same input again returns the same environment. Without one, every call creates another environment. A new agent environment defers to the default Bolt environment.
EnvironmentType
required
SCHEDULER for Bolt, AGENT for DinoAI agents.
str
required
The display name.
Optional[str]
default:"None"
The slug to give it. Generated when left out. A slug is lowercase letters and digits in groups joined by single hyphens, at most 80 characters, and is not production.
Optional[str]
default:"None"
The git branch its runs use. The workspace’s default branch when left out.
Optional[str]
default:"None"
The dbt™ version its runs use, one of the workspace’s supported_dbt_versions. The workspace’s dbt™ version when left out.
Optional[str]
default:"None"
The workspace to change, for a company API key.
Environment
The new environment, or the existing one.

Update an environment

Changes an environment. A setting you leave out keeps its value. None for branch or dbt_version falls back to the workspace’s branch or dbt™ version. name can’t be None.
str
required
The slug of the environment to change.
str
A new display name.
Optional[str]
The git branch its runs use.
Optional[str]
The dbtâ„¢ version its runs use.
Optional[str]
default:"None"
The workspace to change, for a company API key.
Environment
The environment, with its new settings.

Delete an environment

Deletes an environment with its warehouse connections and variables. Deleting it again is not an error. These environments can’t be deleted, and the call raises AdminConflictException:
  • The built-in production environment.
  • The default environment of each type.
  • A Bolt environment that an agent environment defers to.
str
required
The slug of the environment to delete.
Optional[str]
default:"None"
The workspace to change, for a company API key.
Environment
The deleted environment.

Set the default environment

Makes an environment the default of its type. Runs of that type use the default environment when they name none.
str
required
The slug of the environment.
Optional[str]
default:"None"
The workspace to change, for a company API key.
Environment
The environment, now the default.

Set an agent environment’s defer target

Sets what an agent environment’s runs defer to: the latest run of a Bolt environment, or the runs of a Bolt schedule. Give neither to clear the target. Giving both raises ValueError before any request.
str
required
The slug of the agent environment.
Optional[str]
default:"None"
A Bolt environment to defer to.
Optional[str]
default:"None"
A Bolt schedule to defer to.
Optional[str]
default:"None"
The workspace to change, for a company API key.
Environment
The environment, with its new target.

Types

Import the model and enum from paradime.apis.admin.environments.types.
model