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.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:

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.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:

FieldTypeDescription
appIdStringThe app ID.
nameStringThe app name.
slugStringThe app slug.
gitProviderStringThe Git provider (e.g., "GITHUB").
gitNamespaceStringThe Git namespace/organization.
gitRepoStringThe Git repository name.
dockerPresetStringThe Docker preset used (e.g., "METEOR", "NODE", "PYTHON").
templateStringThe template used (optional).
createdAtDateWhen the app was created.
updatedAtDateWhen the app was last updated.
isCurrentBooleanWhether this app belongs to the user's currently selected account.

Query Parameters:

ParameterTypeDescriptionRequired
accountIdStringFilter 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:

FieldTypeDescription
appEnvIdStringThe app environment ID.
appIdStringThe app ID this environment belongs to.
nameStringThe environment name.
slugStringThe environment slug.
regionStringThe deployment region (e.g., "us-east-1").
gitBranchStringThe Git branch used for this environment.
deploymentNameStringThe Kubernetes deployment name.
cliEnvNameStringThe CLI environment name.
hostsArray<String>List of hostnames/domains for this environment.
statusStringThe current status (e.g., "running", "stopped").
resourcesObjectResource allocation for this environment.
resources.containersNumberNumber of container replicas.
resources.zCloudsNumberzCloud allocation per container.
resources.cpuNumberCPU allocation in zCPU units.
resources.memoryNumberMemory allocation in MBs.
createdAtDateWhen the environment was created.
updatedAtDateWhen 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 the GET /app-env endpoint with the decrypt=true query parameter (requires admin permission). See the App Envs API documentation for details.

Query Parameters:

ParameterTypeDescriptionRequired
accountIdStringFilter environments by account ID. If not provided, uses current account.No
appIdStringFilter 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.