How can I send the body of an http request in logstash

I need to retrieve the response of a POST REST API, for which I have to send the body of this service in json format, for example:

{
"customerID": "123456",
"context": "001"
}

I have seen that the documentation uses the http and http_poller plugin for APIS invocation. For example:

input {
http_poller {
urls => {
search => {
method => get
url => "https://api.instagram.com/v1/media/search?lat=48.858844&lng=2.294351&access_token=ACCESS-TOKEN"
}
}
request_timeout => 60
interval => 60
codec => "json"
}
}
output {
stdout {
codec => rubydebug
}
}

But my question is some way to send the body of the API to get a response from the service (http 200)?

Thanks for your comments.

1 Like

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