Applications #
An application is a deployable component inside an environment. Applications are deployed through ArgoCD.
Any project member can read applications (list, get, observability, snapshotStatus). Every other action of this controller — including listArtifacts — requires an owner or admin role.
Controller: org-application
Base HTTP route:
/_/organizations/:organizationId/projects/:projectId/environments/:environmentId/applicationsSupported application types #
kuzzlekuzzleES8webappcustom
Create an application #
The application definition is passed in the request body. The platform completes missing deployment values from the application templates stored by the backend. See Data models for the full shape.
const application = await kuzzle.query({
controller: 'org-application',
action: 'create',
organizationId: 'paas-org-my-company',
projectId: 'my-project',
environmentId: 'production',
body: {
_id: 'api',
name: 'kuzzleES8',
metadata: {},
spec: {},
settings: {},
status: 'Progressing'
}
});HTTP route:
POST /_/organizations/:organizationId/projects/:projectId/environments/:environmentId/applicationsList applications #
const applications = await kuzzle.query({
controller: 'org-application',
action: 'list',
organizationId: 'paas-org-my-company',
projectId: 'my-project',
environmentId: 'production'
});HTTP route:
GET /_/organizations/:organizationId/projects/:projectId/environments/:environmentId/applicationsGet an application #
Returns the application with its ArgoCD health status refreshed.
const application = await kuzzle.query({
controller: 'org-application',
action: 'get',
organizationId: 'paas-org-my-company',
projectId: 'my-project',
environmentId: 'production',
applicationId: 'api'
});HTTP route:
GET /_/organizations/:organizationId/projects/:projectId/environments/:environmentId/applications/:applicationIdUpdate an application #
const application = await kuzzle.query({
controller: 'org-application',
action: 'update',
organizationId: 'paas-org-my-company',
projectId: 'my-project',
environmentId: 'production',
applicationId: 'api',
body: {
_id: 'api',
name: 'kuzzleES8',
metadata: {},
spec: {},
settings: {
customDomain: 'api.example.com'
},
status: 'Healthy'
}
});HTTP route:
PUT /_/organizations/:organizationId/projects/:projectId/environments/:environmentId/applications/:applicationIdDeploy an image #
Applies a Docker image to an existing application: the tag is checked in the project registry (Harbor), written into the application's ArgoCD values, and ArgoCD rolls it out. A tag missing from the registry is refused before anything is applied. The image is passed in the request body. Requires an owner or admin role.
This is the low-level, per-application apply. To ship a version of a project, deploy a release instead: it builds the images of the release for the target environment, applies them to every deployable application in order, follows the rollout and records the deployment.
await kuzzle.query({
controller: 'org-application',
action: 'deploy',
organizationId: 'paas-org-my-company',
projectId: 'my-project',
environmentId: 'production',
applicationId: 'api',
body: {
image: {
name: 'harbor.paas.kuzzle.io/my-company-my-project/api',
tag: '1.2.3'
}
}
});HTTP route:
POST /_/organizations/:organizationId/projects/:projectId/environments/:environmentId/applications/:applicationId/_deployList deployable versions #
Lists the deployable image versions (Harbor artifacts) of an application — the source of the deploy version picker.
const artifacts = await kuzzle.query({
controller: 'org-application',
action: 'listArtifacts',
organizationId: 'paas-org-my-company',
projectId: 'my-project',
environmentId: 'production',
applicationId: 'api'
});HTTP route:
GET /_/organizations/:organizationId/projects/:projectId/environments/:environmentId/applications/:applicationId/_artifactsDisable an application #
await kuzzle.query({
controller: 'org-application',
action: 'disable',
organizationId: 'paas-org-my-company',
projectId: 'my-project',
environmentId: 'production',
applicationId: 'api'
});HTTP route:
POST /_/organizations/:organizationId/projects/:projectId/environments/:environmentId/applications/:applicationId/_disableEnable an application #
await kuzzle.query({
controller: 'org-application',
action: 'enable',
organizationId: 'paas-org-my-company',
projectId: 'my-project',
environmentId: 'production',
applicationId: 'api'
});HTTP route:
POST /_/organizations/:organizationId/projects/:projectId/environments/:environmentId/applications/:applicationId/_enableDelete an application #
await kuzzle.query({
controller: 'org-application',
action: 'delete',
organizationId: 'paas-org-my-company',
projectId: 'my-project',
environmentId: 'production',
applicationId: 'api'
});HTTP route:
DELETE /_/organizations/:organizationId/projects/:projectId/environments/:environmentId/applications/:applicationIdObservability #
Read-only actions, typically polled by the environment view. Available to any project member.
Runtime status #
Returns the ArgoCD sync and health status of an application and its resource tree, down to its pods.
const status = await kuzzle.query({
controller: 'org-application',
action: 'observability',
organizationId: 'paas-org-my-company',
projectId: 'my-project',
environmentId: 'production',
applicationId: 'api'
});HTTP route:
GET /_/organizations/:organizationId/projects/:projectId/environments/:environmentId/applications/:applicationId/_observabilityBackup status #
Reports whether the Elasticsearch snapshot repository and snapshot policy are active for a Kuzzle application.
const backup = await kuzzle.query({
controller: 'org-application',
action: 'snapshotStatus',
organizationId: 'paas-org-my-company',
projectId: 'my-project',
environmentId: 'production',
applicationId: 'api'
});HTTP route:
GET /_/organizations/:organizationId/projects/:projectId/environments/:environmentId/applications/:applicationId/_snapshot_statusElasticsearch snapshots #
Registers an Elasticsearch snapshot repository for a Kuzzle application (mostly useful for Kuzzle applications backed by Elasticsearch).
await kuzzle.query({
controller: 'org-application',
action: 'registerSnapshot',
organizationId: 'paas-org-my-company',
projectId: 'my-project',
environmentId: 'production',
applicationId: 'api'
});HTTP route:
POST /_/organizations/:organizationId/projects/:projectId/environments/:environmentId/applications/:applicationId/_register_snapshotApplication statuses #
Known statuses:
HealthyProgressingDegradedSuspended