I am trying to programmatically create Collector Sidecar configurations with inputs and outputs using the REST API, but I am having some trouble:
- When trying to use POST /plugins/org.graylog.plugins.collector/configurations, I get an error about “Null inputs” which I do not know how to resolve. I have an existing input which I retrieved using GET /plugins/org.graylog.plugins.collector/configurations/{id}, but using that one’s same format in the POST command results in the same error.
- There seems to be a circular reference problem with the above POST command. If the command needs an Input object, and that Input object needs an Output ID to forward to, but that Output hasn’t been created yet, how is this supposed to work?
- Once point of confusion: The GET /plugins/org.graylog.plugins.collector/configurations shows just names and tags of existing configurations; why does the POST command apparently need an Input object? My original thought was to follow the same pattern as with the admin interface: create an empty configuration first with just a name, and then add tags, inputs, and outputs in a separate command. The POST command above seems to want to all at once, which is fine, but I am at a loss as to what it’s specifically looking for.
If anyone can help out I’d appreciate it. Thanks.