Skip to main content
PUT
Set environment variables, including connecting or changing a database
Upserts deployment environment variables by name; variables not included keep their existing values. Passing the [ENCRYPTED] placeholder (the masked read value) is rejected — omit variables you do not intend to change. New variable names must be POSIX identifiers (^[A-Za-z_][A-Za-z0-9_]*$); names already stored on the deployment may be resent unchanged so a legacy name can still be updated or removed. A deployment connects to its databases through these variables — there is no separate connections endpoint. The default data source uses CUBEJS_DB_* (for example CUBEJS_DB_TYPE, CUBEJS_DB_HOST, CUBEJS_DB_USER, CUBEJS_DB_PASS), plus the CUBEJS_JDBC_*, CUBEJS_AWS_* or CUBEJS_FIREBOLT_* families some drivers use. Additional data sources are listed in CUBEJS_DATASOURCES and configured as CUBEJS_DS_<NAME>_DB_*. Saving does not test the connection: a wrong value is accepted here and only fails when the deployment next connects to the database.

Authorizations

Authorization
string
header
required

Token authentication. Send Authorization: Bearer <YOUR_TOKEN>.

Path Parameters

deploymentId
integer
required

Body

application/json

SetEnvVariablesInput

env_variables
object[]
required

Response

200 - application/json
data
object[]
required
deprecated

Deprecated: use items instead. Kept for backward compatibility.

items
object[]
required
pageInfo
object | null