Skip to main content

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 appEnvId and envName parameters 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

FieldTypeRequiredDescription
appEnvIdStringEitherThe ID of the app environment.
envNameStringEitherThe CLI environment name (alternative to appEnvId).
forceNewBuildBooleanNoForce a new build even if no code changes detected. Default: false.
isRebuildBooleanNoWhether this is a rebuild of existing content. Default: false.
fromContentIdStringNoContent 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

FieldTypeRequiredDescription
appEnvIdStringEitherThe ID of the app environment.
envNameStringEitherThe CLI environment name (alternative to appEnvId).
contentIdStringNoContent 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

FieldTypeRequiredDescription
appEnvIdStringEitherThe ID of the app environment.
envNameStringEitherThe CLI environment name (alternative to appEnvId).
targetContentIdStringNoContent 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 contentId values.
  • 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

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/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 STOPPED once 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

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/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 RUNNING once the operation completes.

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.