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.quave.cloud/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.quave.cloud/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.quave.cloud/api/public/v1/app?appId=5f7b1b7b7b7b7b7b7b7b7b7b
Example Response:
{
"message": "App deleted successfully"
}
Note: Deleting an app requires admin permissions.
List Apps
To list all apps for the authenticated user, send a GET request to the /api/public/v1/apps endpoint.
By default, this endpoint returns apps for the user's current account. You can optionally provide an accountId query parameter to list apps for a specific account.
Example:
# List apps for current account
curl -X GET \
-H 'Authorization: YOUR_TOKEN' \
https://api.quave.cloud/api/public/v1/apps
# List apps for a specific account
curl -X GET \
-H 'Authorization: YOUR_TOKEN' \
https://api.quave.cloud/api/public/v1/apps?accountId=5f7b1b7b7b7b7b7b7b7b7b7b
Example Response:
{
"apps": [
{
"appId": "6a8c2d3e4f5a6b7c8d9e0f1a",
"name": "My Meteor App",
"slug": "my-meteor-app",
"gitProvider": "GITHUB",
"gitNamespace": "quavedev",
"gitRepo": "my-meteor-app",
"dockerPreset": "METEOR",
"template": "METEOR_3",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-20T14:45:00.000Z",
"isCurrent": true
},
{
"appId": "7b9d3e4f5a6b7c8d9e0f1a2b",
"name": "Node API",
"slug": "node-api",
"gitProvider": "GITHUB",
"gitNamespace": "quavedev",
"gitRepo": "node-api",
"dockerPreset": "NODE",
"createdAt": "2024-01-10T09:15:00.000Z",
"updatedAt": "2024-01-18T11:20:00.000Z",
"isCurrent": true
}
]
}
The response contains an array of apps, where each app has the following fields:
| Field | Type | Description |
|---|---|---|
appId | String | The app ID. |
name | String | The app name. |
slug | String | The app slug. |
gitProvider | String | The Git provider (e.g., "GITHUB"). |
gitNamespace | String | The Git namespace/organization. |
gitRepo | String | The Git repository name. |
dockerPreset | String | The Docker preset used (e.g., "METEOR", "NODE", "PYTHON"). |
template | String | The template used (optional). |
createdAt | Date | When the app was created. |
updatedAt | Date | When the app was last updated. |
isCurrent | Boolean | Whether this app belongs to the user's currently selected account. |
Query Parameters:
| Parameter | Type | Description | Required |
|---|---|---|---|
accountId | String | Filter apps by account ID. If not provided, uses current account. | No |
Error Responses:
404- No current account set (when accountId not provided and user has no current account)401- User not authenticated
List App Environments
To list all app environments for the authenticated user, send a GET request to the /api/public/v1/app-envs endpoint.
By default, this endpoint returns app environments for the user's current account. You can optionally filter by accountId or appId.
Example:
# List all app environments for current account
curl -X GET \
-H 'Authorization: YOUR_TOKEN' \
https://api.quave.cloud/api/public/v1/app-envs
# List app environments for a specific account
curl -X GET \
-H 'Authorization: YOUR_TOKEN' \
https://api.quave.cloud/api/public/v1/app-envs?accountId=5f7b1b7b7b7b7b7b7b7b7b7b
# List app environments for a specific app
curl -X GET \
-H 'Authorization: YOUR_TOKEN' \
https://api.quave.cloud/api/public/v1/app-envs?appId=6a8c2d3e4f5a6b7c8d9e0f1a
Example Response:
{
"appEnvs": [
{
"appEnvId": "8c0e4f5a6b7c8d9e0f1a2b3c",
"appId": "6a8c2d3e4f5a6b7c8d9e0f1a",
"name": "Production",
"slug": "production",
"region": "us-east-1",
"gitBranch": "main",
"deploymentName": "my-meteor-app-production",
"cliEnvName": "prod",
"hosts": [
"myapp.example.com",
"www.myapp.example.com"
],
"status": "running",
"resources": {
"containers": 2,
"zClouds": 4,
"cpu": 1000,
"memory": 2048
},
"createdAt": "2024-01-15T10:35:00.000Z",
"updatedAt": "2024-01-20T15:00:00.000Z"
},
{
"appEnvId": "9d1f5a6b7c8d9e0f1a2b3c4d",
"appId": "6a8c2d3e4f5a6b7c8d9e0f1a",
"name": "Staging",
"slug": "staging",
"region": "us-east-1",
"gitBranch": "develop",
"deploymentName": "my-meteor-app-staging",
"cliEnvName": "staging",
"hosts": [
"staging.myapp.example.com"
],
"status": "running",
"resources": {
"containers": 1,
"zClouds": 2,
"cpu": 500,
"memory": 1024
},
"createdAt": "2024-01-15T10:40:00.000Z",
"updatedAt": "2024-01-19T09:30:00.000Z"
}
]
}
The response contains an array of app environments, where each environment has the following fields:
| Field | Type | Description |
|---|---|---|
appEnvId | String | The app environment ID. |
appId | String | The app ID this environment belongs to. |
name | String | The environment name. |
slug | String | The environment slug. |
region | String | The deployment region (e.g., "us-east-1"). |
gitBranch | String | The Git branch used for this environment. |
deploymentName | String | The Kubernetes deployment name. |
cliEnvName | String | The CLI environment name. |
hosts | Array<String> | List of hostnames/domains for this environment. |
status | String | The current status (e.g., "running", "stopped"). |
resources | Object | Resource allocation for this environment. |
resources.containers | Number | Number of container replicas. |
resources.zClouds | Number | zCloud allocation per container. |
resources.cpu | Number | CPU allocation in zCPU units. |
resources.memory | Number | Memory allocation in MBs. |
createdAt | Date | When the environment was created. |
updatedAt | Date | When the environment was last updated. |
Security Note: Environment variables (
envVars) are not included in this list response for security reasons. To retrieve environment variables for a specific environment, use theGET /app-envendpoint with thedecrypt=truequery parameter (requires admin permission). See the App Envs API documentation for details.
Query Parameters:
| Parameter | Type | Description | Required |
|---|---|---|---|
accountId | String | Filter environments by account ID. If not provided, uses current account. | No |
appId | String | Filter environments by app ID. | No |
Error Responses:
404- No current account set (when accountId not provided and user has no current account)401- User not authenticated
Resource Allocation
The resources object in app environments contains information about the allocated computing resources:
- containers: The number of container instances (replicas) running for high availability
- zClouds: Quave Cloud's resource unit, representing a standardized allocation of CPU and memory per container
- cpu: CPU allocation measured in zCPU (Quave Cloud CPU units)
- memory: Memory allocation in megabytes (MBs)
These resources determine the performance and scalability of your application environment.