Skip to main content

App Environment Configuration API

The App Environment Configuration API allows you to manage configuration settings for app environments in Quave Cloud, including git branch, health checks, security settings, and environment name.

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.

Update Git Branch

Updates the git branch for an app environment. Changing the branch creates pending build changes that require a new build.

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

Request Body

FieldTypeRequiredDescription
appEnvIdStringEitherThe ID of the app environment.
envNameStringEitherThe CLI environment name (alternative to appEnvId).
gitBranchStringYesThe git branch name to deploy from (e.g., "main").
applyImmediatelyBooleanNoIf true, trigger build immediately. Default: false.

Example

curl -X PATCH \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"gitBranch": "develop",
"applyImmediately": true
}' \
https://api.quave.cloud/api/public/v1/app-env/branch

Example Response

{
"success": true,
"message": "Git branch updated and build triggered",
"appEnv": {
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"name": "Production",
"gitBranch": "develop"
},
"appliedImmediately": true
}

Notes

  • Changing the branch always creates pending build changes (not just deploy changes).
  • If applyImmediately: true, a new build will be triggered from the specified branch.

Update HTTP Probes

Updates the HTTP probes (health check) configuration for an app. Probe settings are app-level and shared across all environments of the app.

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

Configuration Modes

The API supports two configuration modes:

  1. Basic Mode (default): Use a single path for all probes (readiness, liveness, startup)
  2. Advanced Mode: Configure each probe individually with path, periodSeconds, and failureThreshold

Request Body

FieldTypeRequiredDescription
appEnvIdStringEitherThe ID of the app environment.
envNameStringEitherThe CLI environment name (alternative to appEnvId).
enableHttpProbesBooleanNoMaster toggle to enable/disable HTTP probes.
isConfigurationByProbeEnabledBooleanNoEnable advanced mode with individual probe configs.
healthCheckPathStringNoPath for basic mode (used for all probes). Set to empty/null to clear.
healthCheckPortNumberNoPort to check. If not set, uses app port. Set to null to clear.
livenessProbeObjectNo*Liveness probe config. *Required when advanced mode enabled.
readinessProbeObjectNo*Readiness probe config. *Required when advanced mode enabled.
startupProbeObjectNo*Startup probe config. *Required when advanced mode enabled.
applyImmediatelyBooleanNoIf true, deploy changes immediately. Default: false.

Probe Object Fields

Each probe object (livenessProbe, readinessProbe, startupProbe) contains:

FieldTypeRequiredDescription
pathStringYesHTTP path to check (e.g., "/health").
periodSecondsNumberYesHow often to perform the probe (in seconds).
failureThresholdNumberYesConsecutive failures before taking action.

Example: Basic Mode (Enable Probes)

curl -X PATCH \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"enableHttpProbes": true,
"healthCheckPath": "/api/health",
"applyImmediately": true
}' \
https://api.quave.cloud/api/public/v1/app-env/healthcheck

Example: Advanced Mode (Individual Probes)

When using advanced mode, all 9 fields (3 probes x 3 fields) are required.

curl -X PATCH \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"enableHttpProbes": true,
"isConfigurationByProbeEnabled": true,
"readinessProbe": {
"path": "/ready",
"periodSeconds": 10,
"failureThreshold": 3
},
"livenessProbe": {
"path": "/health",
"periodSeconds": 30,
"failureThreshold": 5
},
"startupProbe": {
"path": "/started",
"periodSeconds": 5,
"failureThreshold": 30
},
"applyImmediately": true
}' \
https://api.quave.cloud/api/public/v1/app-env/healthcheck

Example: Disable HTTP Probes

curl -X PATCH \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"enableHttpProbes": false
}' \
https://api.quave.cloud/api/public/v1/app-env/healthcheck

Example Response

{
"success": true,
"message": "HTTP probes configuration updated and changes applied",
"probesConfig": {
"enableHttpProbes": true,
"isConfigurationByProbeEnabled": true,
"healthCheckPath": null,
"healthCheckPort": null,
"livenessProbe": {
"path": "/health",
"periodSeconds": 30,
"failureThreshold": 5
},
"readinessProbe": {
"path": "/ready",
"periodSeconds": 10,
"failureThreshold": 3
},
"startupProbe": {
"path": "/started",
"periodSeconds": 5,
"failureThreshold": 30
}
},
"appEnv": {
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"name": "Production"
},
"environmentsAffected": 2,
"appliedImmediately": true
}

Notes

  • HTTP probes configuration is app-level - changes affect all environments of the app.
  • environmentsAffected shows how many environments were updated.
  • When isConfigurationByProbeEnabled is true, all 9 probe fields are required.
  • Learn more about HTTP probes in the HTTP Probes documentation.

Update Security Settings

Updates security settings for an app environment including ModSecurity WAF (Web Application Firewall), rate limiting, and security context.

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

Request Body

FieldTypeRequiredDescription
appEnvIdStringEitherThe ID of the app environment.
envNameStringEitherThe CLI environment name (alternative to appEnvId).
enableModSecurityBooleanNoEnable/disable OWASP ModSecurity WAF.
limitConnectionsNumberNoMax concurrent connections per IP per controller replica.
limitRPSNumberNoMax requests per second per IP per container.
limitRPMNumberNoMax requests per minute per IP per container.
clearRateLimitBooleanNoSet to true to clear all rate limit settings.
fsGroupNumberNoFile system group ID for volume mounts.
runAsUserNumberNoUID to run the container process as.
runAsGroupNumberNoGID to run the container process as.
clearSecurityContextBooleanNoSet to true to clear all security context settings.
applyImmediatelyBooleanNoIf true, deploy changes immediately. Default: false.

Example: Enable WAF and Rate Limiting

curl -X PATCH \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"enableModSecurity": true,
"limitConnections": 150,
"limitRPS": 100,
"limitRPM": 3000,
"applyImmediately": true
}' \
https://api.quave.cloud/api/public/v1/app-env/security

Example: Set Security Context

curl -X PATCH \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"fsGroup": 1001,
"runAsUser": 1001,
"runAsGroup": 1001
}' \
https://api.quave.cloud/api/public/v1/app-env/security

Example: Clear Rate Limiting

curl -X PATCH \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"clearRateLimit": true
}' \
https://api.quave.cloud/api/public/v1/app-env/security

Example Response

{
"success": true,
"message": "Security settings updated and changes applied",
"securitySettings": {
"enableModSecurity": true,
"rateLimit": {
"limitConnections": 150,
"limitRPS": 100,
"limitRPM": 3000
},
"securityContext": {}
},
"appEnv": {
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"name": "Production"
},
"appliedImmediately": true
}

Notes

  • ModSecurity: OWASP Web Application Firewall helps protect against common web attacks (XSS, SQL injection, etc.).
  • Rate Limiting: Protects against DDoS and brute force attacks. Returns 503 error when limits are exceeded.
  • Security Context: Useful for resolving permission issues with mounted volumes.
  • All parameters are flat (no nested objects required), making the API easier to use.

Update Environment Name

Updates the display name of an app environment. This may affect CLI deploy targets if you use the name for identification.

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

Request Body

FieldTypeRequiredDescription
appEnvIdStringEitherThe ID of the app environment.
envNameStringEitherThe CLI environment name (alternative to appEnvId).
nameStringYesThe new name for the environment.
applyImmediatelyBooleanNoIf true, deploy changes immediately. Default: false.

Example

curl -X PATCH \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"name": "Production v2",
"applyImmediately": true
}' \
https://api.quave.cloud/api/public/v1/app-env/name

Example Response

{
"success": true,
"message": "Environment name updated and changes applied",
"appEnv": {
"appEnvId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"name": "Production v2"
},
"appliedImmediately": true
}

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.