Webapp Settings and Deploy

Manage webapp settings, deploy webapps, and retrieve deployments.

PATCH Update Code Repository Settings

/api/v1/webapps/WEBAPP_UUID/settings/code-repo

To update code repository settings, send a PATCH request to /api/v1/webapps/WEBAPP_UUID/settings/code-repo.

NOTES:

  • To deploy on code push to deployBranch, set pushToDeploy to true.
  • To deploy on code push to release tags, set pushToDeploy to true and deployReleaseTags to true.
  • To deploy on code push to release tags (pre-release), set pushToDeploy, deployReleaseTags and deployOnPrerelease to true.
  • Make sure to provide repo in the format owner/repo.

PATCH Update Build Settings

/api/v1/webapps/WEBAPP_UUID/settings/build

To update build settings, send a PATCH request to /api/v1/webapps/WEBAPP_UUID/settings/build. Build settings are supported for the following app types: adonis, nodejs, nodejsStatic, nuxtServer, nuxtStatic, strapi, directus, nextServer, and laravel.

Default values for each app type:

  • laravel: buildCommand: "npm run build"
  • nodejs: buildCommand: "npm run build --production"
  • nodejsStatic: buildCommand: "npm run build --production"
  • nextServer: buildCommand: "npm run build --production", artifactPath: ".next"
  • nuxtStatic (Nuxt 3 / 4): buildCommand: "NITRO_PRESET=cleavr npm run generate --fail-on-error", artifactPath: ".output/public"
  • nuxtStatic (older): same buildCommand, artifactPath: "dist"
  • nuxtServer (v2): buildCommand: "NITRO_PRESET=cleavr npm run build --production", artifactPath: ".nuxt"
  • nuxtServer (v3 / v4): same buildCommand, artifactPath: ".output"
  • strapi: buildCommand: "npm run build --production", artifactPath: "build", fileUploadPath: "public/uploads"
    • (Strapi 4/5 with TypeScript enabled: artifactPath: "dist")
  • directus: buildCommand: "npx directus bootstrap", fileUploadPath: "uploads"

PATCH Update General Settings

/api/v1/webapps/WEBAPP_UUID/settings/general

To update general settings, send a PATCH request to /api/v1/webapps/WEBAPP_UUID/settings/general. name and deploymentsToKeep are required. deploymentsToKeep must be an integer from 2 to 10. useRawDeploymentScript and tags are optional.

POST Deploy Webapp

/api/v1/webapps/WEBAPP_UUID/deployments

To deploy a webapp, send a POST request to /api/v1/webapps/WEBAPP_UUID/deployments.

GET List Deployments

/api/v1/webapps/WEBAPP_UUID/deployments

To list deployments for a webapp, send a GET request to /api/v1/webapps/WEBAPP_UUID/deployments. Results are newest first.

GET Retrieve an Existing Deployment

/api/v1/webapps/WEBAPP_UUID/deployments/DEPLOYMENT_UUID

To retrieve a deployment, including logs, send a GET request to /api/v1/webapps/WEBAPP_UUID/deployments/DEPLOYMENT_UUID.