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:
Field | Type | Description |
---|---|---|
name | String | The name of the app. |
accountId | String | The ID of the account to create the app in. |
port | Number | The port number the app listens on. |
Optional fields:
Field | Type | Description |
---|---|---|
dockerPreset | String | The 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. |
useImage | Boolean | Whether to use a Docker image. |
gitNamespace | String | The Git namespace (required for GitHub deployments). |
gitRepo | String | The Git repository name (required for GitHub deployments). |
gitInstallationId | String | The Git installation ID (required for GitHub deployments). |
image | String | The Docker image to use (if useImage is true). |
builder | String | The builder to use. Possible values are DOCKER (default) and BUILDPACK. |
buildArgs | String | Build arguments for the Buildpack build. Only used when builder is set to BUILDPACK. |
contextDir | String | The context directory for the Docker build (default is "./"). |
dockerfilePath | String | The path to the Dockerfile. |
customDockerfileContent | String | The custom Dockerfile content. |
isCliDeployment | Boolean | Whether 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:
Field | Type | Description |
---|---|---|
appId | String | The app ID. |
name | String | The name of the app. |
slug | String | The slug of the app. |
gitProvider | String | The Git provider. |
gitNamespace | String | The Git namespace. |
gitRepo | String | The Git repository name. |
gitInstallationId | String | The Git installation ID. |
dockerPreset | String | The Docker preset. |
contextDir | String | The context directory. |
customDockerfileContentInUse | Boolean | Whether to use custom Dockerfile content. |
dockerfilePath | String | The path to the Dockerfile. |
useSSL | Boolean | Whether to use SSL. |
useTCP | Boolean | Whether to use TCP. |
useImage | Boolean | Whether to use a Docker image. |
port | Number | The port number the app listens on. |
builder | String | The builder to use. |
isCliDeployment | Boolean | Whether 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.