Project configuration #
Project configuration items are stored in the configuration collection of the project tenant.
Controller: project/config
Base HTTP route:
/projects/:projectId/configCreate a configuration item #
const document = await kuzzle.query({
controller: 'project/config',
action: 'create',
projectId: 'paas-project-my-project',
name: 'slack',
body: {
webhookUrl: 'https://hooks.slack.com/services/...'
}
});HTTP route:
POST /projects/:projectId/config/:nameList configuration items #
Returns configuration document identifiers.
const names = await kuzzle.query({
controller: 'project/config',
action: 'list',
projectId: 'paas-project-my-project'
});HTTP route:
GET /projects/:projectId/configGet a configuration item #
const document = await kuzzle.query({
controller: 'project/config',
action: 'get',
projectId: 'paas-project-my-project',
name: 'slack'
});HTTP route:
GET /projects/:projectId/config/:nameCheck if a configuration item exists #
const exists = await kuzzle.query({
controller: 'project/config',
action: 'exists',
projectId: 'paas-project-my-project',
name: 'slack'
});HTTP route:
GET /projects/:projectId/config/:name/_existsUpdate a configuration item #
const document = await kuzzle.query({
controller: 'project/config',
action: 'update',
projectId: 'paas-project-my-project',
name: 'slack',
body: {
webhookUrl: 'https://hooks.slack.com/services/new-value'
}
});HTTP route:
PUT /projects/:projectId/config/:nameDelete a configuration item #
await kuzzle.query({
controller: 'project/config',
action: 'delete',
projectId: 'paas-project-my-project',
name: 'slack'
});HTTP route:
DELETE /projects/:projectId/config/:nameCreate a Scaleway SMTP API key #
Creates a Scaleway SMTP API key for the project.
const apiKey = await kuzzle.query({
controller: 'project/config',
action: 'createScalewaySmtpApiKey',
projectId: 'paas-project-my-project'
});HTTP route:
POST /projects/:projectId/config/scaleway/smtp-api-keyThe response is the JSON object returned by Scaleway through the backend integration.