logstash-filter-rest
logstash-filter-rest copied to clipboard
Not able to set right JSON payload in body
Hi Here how my conf file looks like
rest {
request => {
url =>"https://abc.com"
method => "post"
headers => {
"Authorization" => "%{access}"
"Content-Type" => "application/json"
}
params => '{
"reportRequests" :
[{
"checkid" : "2345678",
"dateRanges" : [{
"endDate" : "2018-11-12",
"startDate" : "2018-11-01"
}
]
}
]
}'
}
json => true
target => "my_key"
}
This is the error i am getting
fieldViolations\": [\n {\n \"description\": \"Invalid JSON payload received. Unknown name \\\"\\\": Root element must be a message.\"
The exact body works perfectly in POSTMAN, but here it does not work. Looks like something is missing params/body. Please suggest the right syntax or such feature is not supported?
Hi @lucashenning and @gandalfb , please let me know if this can be achieved with params ?
Thanks!