App Environment Variables API
The App Environment Variables API allows you to manage environment variables for app environments in Quave Cloud.
Make sure to read the Get Started document to understand how the API works.
Note: All endpoints in this API accept both
appEnvIdandenvNameparameters for identifying the environment.
List Environment Variables
Retrieves the list of environment variables for an app environment.
Endpoint: GET /api/public/v1/app-env/variables
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
appEnvId | String | Either | The ID of the app environment. |
envName | String | Either | The CLI environment name (alternative to appEnvId). |
showSecrets | Boolean | No | If true, show decrypted secret values. Requires admin permission and quave:read:secrets scope. Default: false. |
Example: List Variables (secrets masked)
curl -X GET \
-H 'Authorization: YOUR_TOKEN' \
'https://api.quave.cloud/api/public/v1/app-env/variables?appEnvId=5f7b1b7b7b7b7b7b7b7b7b7b'
Example Response (secrets masked)
{
"variables": [
{
"_id": "abc123",
"name": "NODE_ENV",
"value": "production",
"type": "DEPLOY",
"isSecret": false
},
{
"_id": "def456",
"name": "DATABASE_URL",
"value": "***SECRET***",
"type": "DEPLOY",
"isSecret": true
},
{
"_id": "ghi789",
"name": "BUILD_VERSION",
"value": "1.2.3",
"type": "BUILD",
"isSecret": false
}
]
}
Example: List Variables (with secrets)
curl -X GET \
-H 'Authorization: YOUR_TOKEN' \
'https://api.quave.cloud/api/public/v1/app-env/variables?appEnvId=5f7b1b7b7b7b7b7b7b7b7b7b&showSecrets=true'
Example Response (with secrets)
{
"variables": [
{
"_id": "abc123",
"name": "NODE_ENV",
"value": "production",
"type": "DEPLOY",
"isSecret": false
},
{
"_id": "def456",
"name": "DATABASE_URL",
"value": "mongodb://user:pass@host:27017/db",
"type": "DEPLOY",
"isSecret": true
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
_id | String | Unique identifier for the variable. |
name | String | Environment variable name. |
value | String | Environment variable value. Masked as ***SECRET*** if isSecret is true and showSecrets is false. |
type | String | When the variable is available: DEPLOY, BUILD, or BOTH. |
isSecret | Boolean | Whether the variable is encrypted at rest. |
Update Environment Variables
Adds, updates, or removes environment variables for an app environment. This is a partial update - only the variables you specify are modified; existing variables not in the request are left untouched.
Endpoint: PUT /api/public/v1/app-env/variables
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
appEnvId | String | Either | The ID of the app environment. |
envName | String | Either | The CLI environment name (alternative to appEnvId). |
variables | Array | No | Array of variables to add or update (see Variable Object). |
variablesToRemove | Array | No | Array of variable names to remove. |
applyImmediately | Boolean | No | If true, deploy changes immediately. Default: false. |
Variable Object
| Field | Type | Required | Description |
|---|---|---|---|
name | String | Yes | Environment variable name. |
value | String | Yes | Environment variable value. |
isSecret | Boolean | No | Whether to encrypt the value. Default: false. |
sendToBuild | Boolean | No | Whether to include during build phase. Default: false. |
sendToDeploy | Boolean | No | Whether to include during deployment (runtime). Default: true. |