Core
PaaS v2.x
2

Projects #

A project is the main Kuzzle PaaS tenant. It groups environments, container images, monitoring resources and project configuration.

Controller: project

Create a project #

Creates a project and starts provisioning external resources.

await kuzzle.query({
  controller: 'project',
  action: 'create',
  body: {
    initGithubRepository: true,
    project: {
      name: 'my-project',
      description: 'Customer production project',
      environments: []
    },
    user: {
      _id: 'john.doe',
      email: 'john.doe@example.com',
      password: '<initial-password>'
    }
  }
});

HTTP route:

POST /projects

Response:

"creating"

The operation continues asynchronously after the acknowledgement.

Delete a project #

await kuzzle.query({
  controller: 'project',
  action: 'delete',
  projectId: 'paas-project-my-project'
});

HTTP route:

DELETE /projects/:projectId

Response:

"deleting"

The operation continues asynchronously after the acknowledgement.

List my projects #

Lists projects attached to the authenticated user.

const projects = await kuzzle.query({
  controller: 'project',
  action: 'list'
});

HTTP route:

GET /projects

List projects for a user #

Lists projects attached to another user. This is intended for administrative integrations.

const projects = await kuzzle.query({
  controller: 'project',
  action: 'listAs',
  userId: 'john.doe'
});

HTTP route:

GET /projects/:userId

List project images #

Lists container images available for the authenticated user in a project.

const images = await kuzzle.query({
  controller: 'project',
  action: 'images',
  projectId: 'paas-project-my-project'
});

HTTP route:

GET /projects/:projectId/images

List project images for a user #

Lists container images available to another user in a project. This is intended for administrative integrations.

const images = await kuzzle.query({
  controller: 'project',
  action: 'imagesAs',
  projectId: 'paas-project-my-project',
  userId: 'john.doe'
});

HTTP route:

GET /projects/:projectId/:userId/images

Project history #

The project history endpoint is exposed by the history controller.

const history = await kuzzle.query({
  controller: 'history',
  action: 'get',
  projectId: 'paas-project-my-project'
});

HTTP route:

GET /projects/:projectId/history

The response contains project creation/deletion dates and environment lifecycle entries.