API /sidecar/configurations error

Before you post: Your responses to these questions will help the community help you. Please complete this template if you’re asking a support question.
Don’t forget to select tags to help index your topic!

1. Describe your incident:

Not able to create sidecar configuration using PUT API

I use below JSON to put to /sidecar/configurations

{

    "id": "example-id",

    "name": "Example Sidecar Configuration",

    "description": "Configuration for the Example Sidecar",

    "collector_id": "63d79cc713bf3b69db7f8a65",

    "node_id": "b6c90b87-3604-446b-8f0b-8365b769daef",

    "configuration": "filebeat.input:\n- type: log\n enabled: true\n paths:\n   - /var/log/*.log",

    "tags": [

        "windows"

    ]

}

The Error I get everytime is below

{

"type": "ApiError",

"message": "Cannot construct instance of `org.graylog.plugins.sidecar.rest.models.Configuration`, problem: Null color\n at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 11, column: 1]"

}

What is the solution to fix this problem?
also can anyone give me a sample snippet of json to create the sidecard configuration using API

I took a quick look at the payload that the Graylog Web Interface PUTs and my guess is that your payload is missing a required parameter: color

Here is the sample payload:

{
    "id": "65a195fa9d83184af40cc0d3",
    "collector_id": "62556f575c21cf1c6ec96046",
    "name": "<nane>",
    "color": "#FFFFFF",
    "template": "<redacted>",
    "tags": []
}

I also just checked the API Browser and unfortunately, there is an issue where required parameters are not properly noted as required and instead say optional:
image

Hope that helps.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.