Config validate

Validate configuration

Validates that an already parsed fluentbit or fluentd config is semantically valid. To parse the raw agent config take a look at https://github.com/calyptia/fluent-bit-config-parser.

POSThttps://cloud-api.calyptia.com/v1/config_validate/{agentType}
Authorization
Path parameters
agentType*enum
fluentbitfluentd
Body
config*array of object
Response

OK

Body
errors*object
Request
const response = await fetch('https://cloud-api.calyptia.com/v1/config_validate/{agentType}', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "config": [
        {
          "command": "text",
          "name": "text",
          "id": "text"
        }
      ]
    }),
});
const data = await response.json();
Response
{
  "errors": {
    "runtime": [
      "text"
    ]
  }
}