Config validate v2

Validate configuration on the v2 endpoint of the service

Validates that an already parsed fluentbit config is semantically valid under the V2 error specification 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_v2
Authorization
Body
config*array of object
Response

OK

Body
errors*object
Request
const response = await fetch('https://cloud-api.calyptia.com/v1/config_validate_v2', {
    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": [
      {
        "errors": [
          "text"
        ],
        "id": "text"
      }
    ]
  }
}