App Environment Deployments API
The App Environment Deployments API allows you to manage deployments, builds, and lifecycle operations 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.
Trigger Build
Triggers a new build for an app environment. This starts the build process to create a new deployment artifact from the configured git branch.
Endpoint: POST /api/public/v1/app-env/build
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). |
forceNewBuild | Boolean | No | Force a new build even if no code changes detected. Default: false. |
isRebuild | Boolean | No | Whether this is a rebuild of existing content. Default: false. |
fromContentId | String | No | Content ID to rebuild from. Used with isRebuild: true. |
Example: Trigger New Build
curl -X POST \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b"
}' \
https://api.quave.cloud/api/public/v1/app-env/build
Example: Force New Build
curl -X POST \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"forceNewBuild": true
}' \
https://api.quave.cloud/api/public/v1/app-env/build
Example: Rebuild from Previous Version
curl -X POST \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"isRebuild": true,
"fromContentId": "abc123def456"
}' \
https://api.quave.cloud/api/public/v1/app-env/build
Example Response
{
"success": true,
"message": "Build triggered successfully",
"appEnv": {
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"name": "Production",
"status": "UPDATING"
}
}
Redeploy
Redeploys an app environment using the current or a specified deployment version. This restarts the containers with the existing build artifact.
Endpoint: POST /api/public/v1/app-env/redeploy
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). |
contentId | String | No | Content ID to redeploy. If not provided, redeploys current version. |
Example: Redeploy Current Version
curl -X POST \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b"
}' \
https://api.quave.cloud/api/public/v1/app-env/redeploy
Example: Redeploy Specific Version
curl -X POST \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"contentId": "abc123def456"
}' \
https://api.quave.cloud/api/public/v1/app-env/redeploy
Example Response
{
"success": true,
"message": "Redeploy triggered successfully",
"appEnv": {
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"name": "Production",
"status": "UPDATING"
}
}
Use Cases
- Restart Containers: Redeploy the current version to restart all containers.
- Apply Configuration Changes: After updating environment variables or resources, redeploy to apply changes.
- Recover from Issues: Redeploy if containers are in an unhealthy state.
Rollback
Rolls back an app environment to a previous version. If no targetContentId is specified, rolls back to the immediately previous deployment.
Endpoint: POST /api/public/v1/app-env/rollback
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). |
targetContentId | String | No | Content ID to rollback to. If not provided, uses previous version. |
Example: Rollback to Previous Version
curl -X POST \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b"
}' \
https://api.quave.cloud/api/public/v1/app-env/rollback
Example: Rollback to Specific Version
curl -X POST \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"targetContentId": "abc123def456"
}' \
https://api.quave.cloud/api/public/v1/app-env/rollback
Example Response
{
"success": true,
"message": "Rollback triggered successfully",
"rollbackInfo": {
"fromVersion": 42,
"toVersion": 41,
"contentId": "abc123def456"
},
"appEnv": {
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"name": "Production",
"status": "UPDATING"
}
}
Notes
- Dangerous Operation: Rollback replaces the current deployment with a previous version.
- Use the App Environment History API to get available
contentIdvalues. - You cannot rollback to the currently deployed version.
Stop Environment
Stops an app environment by scaling its containers to zero. The environment can be started again later.
Endpoint: POST /api/public/v1/app-env/stop
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/stop
Example Response
{
"success": true,
"message": "Environment stop triggered",
"appEnv": {
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"name": "Production",
"status": "UPDATING"
}
}
Notes
- Dangerous Operation: Stopping an environment makes it unreachable.
- The environment status will change to
STOPPEDonce the operation completes. - Use the Start Environment endpoint to restart.
Start Environment
Starts a stopped app environment by redeploying its current version.
Endpoint: POST /api/public/v1/app-env/start
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/start
Example Response
{
"success": true,
"message": "Environment start triggered",
"appEnv": {
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"name": "Production",
"status": "UPDATING"
}
}
Notes
- The environment must have been deployed at least once before it can be started.
- The environment status will change to
RUNNINGonce the operation completes.
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. |