I am trying to read data from a REST API then i will put it in elastic search. So the problem i am having is how to call 2 seperate APIs in input component of logStash. below is explanation of the problem i am facing. I need help in 'Input' portion of sudo code i have written below. Thanks
Input{
#call first api(which is authenticate), filter it's response and save TOKEN from it
#call second api to read records and send above received TOKEN in header
}
filter{
#Filter second APIs response (which will bring data in json format). I can write this portion
}
output{
#send this data to elastic (I am clear about this portion that how to do it)
}
I cannot think of a way to do this in a single logstash process. I would think about calling the REST APIs outside of logstash. Just wrap a shell script around some curl calls, or implement it with Powershell if you are on Windows. Then feed the data to a stdin input.
Awesome. Thank you. I used X-Auth-Token for the application im pulling data from and worked.
headers => {
Accept => "application/json"
"X-Auth-Token" =>
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.