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 variables admin capability group. To read a value with
revealEnvironmentVariable, the key needs Environment variable values viewer, which Environment variables admin does not include.
Operations
Scopes
Every operation names one scope:
A user’s own Code IDE variables are not part of the API. Each user manages them in the app.
A variable name starts with a letter or
_, then has letters, digits, and _. Names are case-sensitive. A value can’t be empty and can’t contain a NUL character.
Set variables
setEnvironmentVariables writes every variable you send in one write. mode decides what happens to the scope’s other variables:
MERGE, the default, keeps every other variable of the scope.REPLACEmakes the variables you send the scope’s only variables, and deletes the others. It needs at least one variable.
changedNames lists the names that the call added, gave a new value, or deleted. It is empty when nothing changed: sending the same input again changes nothing and adds no audit entry.
When the workspace’s variables or a Bolt environment’s variables change, Paradime redeploys the workspace’s Bolt schedules. When the workspace’s variables change, Paradime also rewrites the workspace’s editor settings.
An empty value does not delete a variable: it fails with
VALIDATION_FAILED. To delete variables, use deleteEnvironmentVariables.Example response
Example response
List variables
environmentVariables lists the names of one scope’s variables, ordered by name, and never their values. A scope’s variables are stored together, so they all show the same updatedAt.
variableNames on environments.
Rename or delete variables
renameEnvironmentVariable renames a variable and keeps its value. No other variable of the scope can have the new name. A retry is safe: when name is missing and newName exists, the call succeeds and changes nothing. A success therefore does not prove that name existed.
deleteEnvironmentVariables deletes the names you send. It ignores names that do not exist, and deletedNames lists the ones it deleted. Rename and delete redeploy the Bolt schedules the same way as setEnvironmentVariables.
Read a value
revealEnvironmentVariable returns one variable’s value. It needs Environment variable values viewer, and every read adds an entry to the audit log. Give this group only to keys that must read values: a key that sets variables does not need it.
Errors
These are the cases specific to environment variables. For the error format and the codes every area shares, see Errors.Related
- Python SDK: Environment variables: the same operations in
paradime.admin.environment_variables. - Paradime CLI:
paradime admin:paradime admin env-varslists, sets, renames, deletes, and reveals variables. - Environment variables: the same variables in the app.
- Bolt schedule environment variables and Agent environment variables: how runs use them.