Skip to main content

Apps API

The Apps API allows you to manage apps in Quave Cloud. You can create, retrieve, and delete apps.

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

Note: All endpoints in this API accept only the user token.

Create App

To create a new app, send a POST request to the /api/public/v1/app endpoint. Provide the required fields in the request body.

Below are the required fields:

FieldTypeDescription
nameStringThe name of the app.
accountIdStringThe ID of the account to create the app in.
portNumberThe port number the app listens on.

Optional fields:

FieldTypeDescription
dockerPresetStringThe Docker preset to use. Default is CUSTOM. Possible values are: NODE_JS_18_NEXT_JS, NODE_JS_18_REMIX, NODE_JS_18_VITE, NODE_JS_18_VUE_JS, NODE_JS_18_EXPRESS, NODE_JS_18_INSTALL_START, NODE_JS_18_INSTALL_BUILD_START, NODE_JS_18_ANGULAR, METEOR_JS_3_0_3, METEOR_JS_3_0, METEOR_JS_2_16, METEOR_JS_2_15, METEOR_JS_2_14, METEOR_JS_2_13_3, METEOR_JS_2_13, METEOR_JS_2_12, METEOR_JS_2_11_0, METEOR_JS_2_7_3, METEOR_JS_2_5_8, METEOR_JS_2_5_1, METEOR_JS_2_2_4, METEOR_JS_1_11_1, METEOR_JS_1_8_3, METEOR_JS_1_8_1, ONCE_37SIGNALS, CUSTOM.
useImageBooleanWhether to use a Docker image.
gitNamespaceStringThe Git namespace (required for GitHub deployments).
gitRepoStringThe Git repository name (required for GitHub deployments).
gitInstallationIdStringThe Git installation ID (required for GitHub deployments).
imageStringThe Docker image to use (if useImage is true).
builderStringThe builder to use. Possible values are DOCKER (default) and BUILDPACK.
buildArgsStringBuild arguments for the Buildpack build. Only used when builder is set to BUILDPACK.
contextDirStringThe context directory for the Docker build (default is "./").
dockerfilePathStringThe path to the Dockerfile.
customDockerfileContentStringThe custom Dockerfile content.
isCliDeploymentBooleanWhether this is a CLI deployment.

Example:

curl -X POST \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"name": "My New App",
"accountId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"port": 3000,
"gitNamespace": "my-org",
"gitRepo": "my-app",
"gitInstallationId": "12345678"
}' \
https://api.zcloud.ws/api/public/v1/app

Example Response:

{
"appId": "5f7b1b7b7b7b7b7b7b7b7b7b"
}

The response contains the appId of the newly created app.

Get App

To retrieve an app, send a GET request to the /api/public/v1/app endpoint. You need to provide the appId as a query parameter.

Example:

curl -X GET \
-H 'Authorization: YOUR_TOKEN' \
https://api.zcloud.ws/api/public/v1/app?appId=5f7b1b7b7b7b7b7b7b7b7b7b

Example Response:

{
"appId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"name": "My App",
"slug": "my-app",
"gitProvider": "GITHUB",
"gitNamespace": "my-org",
"gitRepo": "my-app",
"gitInstallationId": "12345678",
"dockerPreset": "NODE",
"contextDir": "./",
"customDockerfileContentInUse": false,
"dockerfilePath": "Dockerfile",
"useSSL": true,
"useTCP": false,
"useImage": false,
"port": 3000,
"builder": "DOCKER",
"isCliDeployment": false
}

The response contains various fields describing the app configuration. Below is a description of the fields:

FieldTypeDescription
appIdStringThe app ID.
nameStringThe name of the app.
slugStringThe slug of the app.
gitProviderStringThe Git provider.
gitNamespaceStringThe Git namespace.
gitRepoStringThe Git repository name.
gitInstallationIdStringThe Git installation ID.
dockerPresetStringThe Docker preset.
contextDirStringThe context directory.
customDockerfileContentInUseBooleanWhether to use custom Dockerfile content.
dockerfilePathStringThe path to the Dockerfile.
useSSLBooleanWhether to use SSL.
useTCPBooleanWhether to use TCP.
useImageBooleanWhether to use a Docker image.
portNumberThe port number the app listens on.
builderStringThe builder to use.
isCliDeploymentBooleanWhether this is a CLI deployment.

Delete App

To delete an app, send a DELETE request to the /api/public/v1/app endpoint. You need to provide the appId as a query parameter.

Example:

curl -X DELETE \
-H 'Authorization: YOUR_TOKEN' \
https://api.zcloud.ws/api/public/v1/app?appId=5f7b1b7b7b7b7b7b7b7b7b7b

Example Response:

{
"message": "App deleted successfully"
}

Note: Deleting an app requires admin permissions.