App Environment Management API
The App Environment Management API allows you to manage resources, scaling, and apply pending changes to 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.
Apply Pending Changes
Applies any pending configuration changes to an app environment. This works like terraform apply - it takes the pending changes (from resources, scaling, env vars updates, etc.) and deploys them to the infrastructure.
Endpoint: POST /api/public/v1/app-env/apply-changes
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). |
Example
curl -X POST \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b"
}' \
https://api.quave.cloud/api/public/v1/app-env/apply-changes
Example Response
{
"success": true,
"message": "Changes applied successfully",
"appEnv": {
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"name": "Production",
"status": "UPDATING"
}
}
Notes
- If there are no pending changes, the API will return a success response with a message indicating no changes were applied.
- The operation determines the type of changes (build, deploy, or scale) and executes them in the correct priority order.
Update Resources
Updates the resource allocation for an app environment. You can use either zClouds (simplified abstraction) or custom resources (CPU/memory/disk) for BYOP accounts.
Endpoint: PATCH /api/public/v1/app-env/resources
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). |
zClouds | Number | No | Number of zClouds (1 zCloud = 0.5 CPU + 512MB memory + 5GB disk). |
cpu | Number | No | CPU limit in cores (e.g., 2.0). Requires BYOP account. |
cpuRequest | Number | No | CPU request (guaranteed minimum). Must not exceed cpu. Requires BYOP. |
memory | Number | No | Memory limit in MB (e.g., 2048). Requires BYOP account. |
memoryRequest | Number | No | Memory request (guaranteed minimum). Must not exceed memory. BYOP. |
disk | Number | No | Disk storage in MB. Requires BYOP account. |
networkIngress | Number | No | Network ingress in MB. Requires BYOP account. |
networkEgress | Number | No | Network egress in MB. Requires BYOP account. |
applyImmediately | Boolean | No | If true, deploy changes immediately. Default: false (pending changes). |
Example: Update zClouds
curl -X PATCH \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"zClouds": 4,
"applyImmediately": true
}' \
https://api.quave.cloud/api/public/v1/app-env/resources
Example: Update Custom Resources (BYOP)
curl -X PATCH \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"cpu": 2.0,
"cpuRequest": 1.0,
"memory": 2048,
"memoryRequest": 1024,
"disk": 10240
}' \
https://api.quave.cloud/api/public/v1/app-env/resources
Example Response
{
"success": true,
"message": "Resources updated and changes applied",
"appEnv": {
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"name": "Production",
"zClouds": 4
},
"appliedImmediately": true
}
Notes
- zClouds vs Custom Resources: Use
zCloudsfor simplified resource allocation, or custom fields (cpu,memory,disk) for fine-grained control. Don't mix both. - BYOP Requirement: Custom resources are only available for accounts with BYOP (Bring Your Own Provider) enabled.
- Request vs Limit: Request values are the guaranteed minimum resources; limit values are the maximum. Request must not exceed limit.
Update Autoscaling
Updates the autoscaling configuration for an app environment.
Endpoint: PATCH /api/public/v1/app-env/autoscaling
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). |
autoScalingEnabled | Boolean | No | Enable or disable autoscaling. |
minReplicaCount | Number | No | Minimum number of replicas (at least 1). |
maxReplicaCount | Number | No | Maximum replicas (must be at least minReplicaCount). |
cpuTargetUtilization | Number | No | Target CPU utilization percentage (1-100). |
memoryTargetUtilization | Number | No | Target memory utilization percentage (1-100). |
incrementStep | Number | No | Number of pods to add when scaling up. |
decrementStep | Number | No | Number of pods to remove when scaling down. |
scaleUpStabilizationWindowSeconds | Number | No | Stabilization window for scaling up (seconds). |
scaleDownStabilizationWindowSeconds | Number | No | Stabilization window for scaling down (seconds). |
applyImmediately | Boolean | No | If true, deploy changes immediately. Default: false. |
Example
curl -X PATCH \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"autoScalingEnabled": true,
"minReplicaCount": 2,
"maxReplicaCount": 10,
"cpuTargetUtilization": 70,
"applyImmediately": true
}' \
https://api.quave.cloud/api/public/v1/app-env/autoscaling
Example Response
{
"success": true,
"message": "Autoscaling configuration updated and changes applied",
"appEnv": {
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"name": "Production",
"autoScalingEnabled": true,
"minReplicaCount": 2,
"maxReplicaCount": 10
},
"appliedImmediately": true
}
Scale Containers
Manually scales the number of containers for an app environment.
Endpoint: POST /api/public/v1/app-env/scale
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). |
containers | Number | Yes | Number of containers to run (at least 1). |
applyImmediately | Boolean | No | If true, deploy changes immediately. Default: false. |
Example
curl -X POST \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"containers": 5,
"applyImmediately": true
}' \
https://api.quave.cloud/api/public/v1/app-env/scale
Example Response
{
"success": true,
"message": "Container count updated and changes applied",
"appEnv": {
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"name": "Production",
"containers": 5
},
"appliedImmediately": true
}
Notes
- If autoscaling is enabled, manual scaling will temporarily override it until the next autoscaling event.
- Consider disabling autoscaling if you need consistent manual control over container count.
Error Responses
All endpoints may return the following error responses:
| Status | Description |
|---|---|
400 | Invalid request (missing required fields, invalid values). |
401 | User not authenticated. |
403 | User doesn't have permission to access this app environment. |
404 | App environment not found for the given appEnvId or envName. |