Config sections

Config sections

GEThttps://cloud-api.calyptia.com/v1/projects/{projectID}/config_sections
Authorization
Path parameters
projectID*string (uuid)
Query parameters
Response

OK

Headers
Body
id*string (uuid)
projectID*string (uuid)
processingRuleID*nullable string (uuid)
kind*ConfigSectionKind (enum)
inputfilteroutputservice
properties*Pairs (array of Pair (object))
createdAt*string (date-time)
updatedAt*string (date-time)
Request
const response = await fetch('https://cloud-api.calyptia.com/v1/projects/{projectID}/config_sections', {
    method: 'GET',
    headers: {
      "Authorization": "Bearer <token>"
    },
});
const data = await response.json();
Response
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "projectID": "123e4567-e89b-12d3-a456-426614174000",
    "processingRuleID": "123e4567-e89b-12d3-a456-426614174000",
    "kind": "input",
    "properties": [
      {
        "key": "name",
        "value": "dummy"
      }
    ],
    "createdAt": "2024-10-16T08:46:49.214Z",
    "updatedAt": "2024-10-16T08:46:49.214Z"
  }
]

Create config section

POSThttps://cloud-api.calyptia.com/v1/projects/{projectID}/config_sections
Authorization
Path parameters
projectID*string (uuid)
Body
kind*ConfigSectionKind (enum)
inputfilteroutputservice
properties*Pairs (array of Pair (object))
skipConfigValidation*boolean
Response

Created

Body
id*string (uuid)
createdAt*string (date-time)
Request
const response = await fetch('https://cloud-api.calyptia.com/v1/projects/{projectID}/config_sections', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "kind": "input",
      "properties": [
        {
          "key": "name",
          "value": "dummy"
        }
      ],
      "skipConfigValidation": false
    }),
});
const data = await response.json();
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2024-10-16T08:46:49.214Z"
}