Skip to main content

App Environment Management API

The App Environment Management API allows you to manage resources, scaling, and apply pending changes to app environments in Quave ONE.

Make sure to read the Get Started document to understand how the API works.

Note: All endpoints in this API accept both appEnvId and envName parameters 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, Job config updates, startup command updates, etc.) and deploys them to the infrastructure.

Endpoint: POST /api/public/v1/app-env/apply-changes

Request Body

FieldTypeRequiredDescription
appEnvIdStringEitherThe ID of the app environment.
envNameStringEitherThe 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.
  • For Job apps, applying Job config changes updates the applied Job config snapshot used by future default JobRuns. It does not run the Job by itself.
  • For regular Apps and Functions, applying a startup command change redeploys the current content with the saved runtime override. It does not rebuild the image. See Startup Command Overrides.

Update Resources

Updates the resource allocation for an app environment. You can use either zClouds (simplified abstraction) or custom resources (CPU/memory) for Connect accounts. Disk storage can be set for managed databases and regular app environments with a local persistent volume.

Endpoint: PATCH /api/public/v1/app-env/resources

Request Body

FieldTypeRequiredDescription
appEnvIdStringEitherThe ID of the app environment.
envNameStringEitherThe CLI environment name (alternative to appEnvId).
zCloudsNumberNoNumber of zClouds. 1 zCloud includes 0.5 CPU, 512 MB memory, and 5 GB of included managed-database disk allowance.
cpuNumberNoCPU limit in cores (e.g., 2.0). Requires a Connect account.
cpuRequestNumberNoCPU request (guaranteed minimum). Must not exceed cpu. Requires a Connect account.
memoryNumberNoMemory limit in MB (e.g., 2048). Requires a Connect account.
memoryRequestNumberNoMemory request (guaranteed minimum). Must not exceed memory. BYOP.
diskNumberNoAllocated disk storage in MB. Applies only to managed databases and regular app environments with a local persistent volume (useVolume=true and useNfsVolume=false). Once this disk size has been applied, this value can only stay the same or increase. Shared NFS volumes and stateless apps do not use this disk setting. For DevOps databases, use at least 1000 MB (1 GB). Starting with July 2026 billing, eligible Direct local disk above the included zClouds * 5 GB allowance is billed as storage overage. See pricing.
networkIngressNumberNoNetwork ingress in Mbps. Requires a Connect account.
networkEgressNumberNoNetwork egress in Mbps. Requires a Connect account.
applyImmediatelyBooleanNoIf 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 (Connect)

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 zClouds for simplified resource allocation, or custom fields (cpu, memory, disk) for fine-grained control. Don't mix both.
  • Connect Requirement: Custom resources are only available for accounts with Quave ONE Connect enabled (legacy API fields may still use BYOP names).
  • Persistent Disk: Auto-provisioned database disks must be between the minDiskMb and maxDiskMb values returned by GET /api/public/v1/database-presets. Regular app local persistent volumes are limited to 1000 MB for ordinary customer accounts unless support changes the size for you. Applied disks are grow-only: updates may keep the current value or increase it, but decreases are rejected. Redis without persistence is the database exception and uses disk: 0.
  • Request vs Limit: Request values are the guaranteed minimum resources; limit values are the maximum. Request must not exceed limit.

Update Scaling Options

Updates Autoscaling and Connect Scale to zero in one atomic configuration change. You may send either nested object or both. Autoscaling can be available to Direct accounts when enabled for the account; Scale to zero is available only to eligible Connect accounts with account Autoscaling enabled.

Endpoint: PATCH /api/public/v1/app-env/scaling-options

Request Body

FieldTypeRequiredDescription
appEnvId / envNameStringEitherApp environment identifier.
autoscalingObjectNoWarm container policy: autoScalingEnabled, containers (Immediate Desired), replica range, targets, steps and stabilization windows.
scaleToZeroObjectNoIdle parking policy: enabled, idleMinutes, wakeTimeoutSeconds, and wakeMode.
applyImmediatelyBooleanNoDeploy now with a user/API token; default is pending changes. Environment tokens can save the pending configuration, but cannot apply it immediately.

Example

curl -X PATCH -H 'Authorization: YOUR_TOKEN' -H 'Content-Type: application/json' \
-d '{"appEnvId":"5f7b1b7b7b7b7b7b7b7b7b7b","autoscaling":{"autoScalingEnabled":true,"containers":2,"minReplicaCount":1,"maxReplicaCount":5,"cpuTargetUtilization":70},"scaleToZero":{"enabled":true,"idleMinutes":60,"wakeMode":"BLOCKING"},"applyImmediately":true}' \
https://api.quave.cloud/api/public/v1/app-env/scaling-options

Scale Containers

Manually scales the number of containers for an app environment.

Endpoint: POST /api/public/v1/app-env/scale

Request Body

FieldTypeRequiredDescription
appEnvIdStringEitherThe ID of the app environment.
envNameStringEitherThe CLI environment name (alternative to appEnvId).
containersNumberYesNumber of containers to run (at least 1).
applyImmediatelyBooleanNoIf 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:

StatusDescription
400Invalid request (missing required fields, invalid values).
401User not authenticated.
403User doesn't have permission to access this app environment.
404App environment not found for the given appEnvId or envName.