Create Rule with REST API

Hi,
I’m trying to create a Rule using REST (api-browser).
Looking the POST example (/plugins/org.graylog.plugins.pipelineprocessor/system/pipelines/rule)
I compose this simple rule:

 {
    "title": "test_has_field",
    "description": "",
    "source": "rule \"test_has_field\"\r\n\r\nwhen \r\n   true\r\n    \r\nthen\r\n  \r\n  end\r\n",
    "errors": null
  }

But when I try to post it I have the follow error:

{
  "type": "ApiError",
  "message": "Can not construct instance of org.graylog.plugins.pipelineprocessor.rest.RuleSource, problem: Should never call 'set' on setterless property\n at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@18a041d3; line: 7, column: 3]"
}

This seems to be a bug. Can somebody help me to understand this situation?
Thanks
Gianluca

Please create a bug report for this on GitHub:

Hi @jochen

I opened the issue (201)

Thanks
Gianluca

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