I want to know if it is feasible to get data from several Rest APIs within one JSon Path input using variables in the url called. Because I would be getting data from like 50 apis all identically formatted, including the url.
Why not use REST API to change token on expiration updating Input’s header field?
Get all Inputs: GET /api/system/inputs curl -u user_token:token -H 'Content-Type: application/json' -H 'X-Requested-By: cli' 'http://graylog.domain.com:9000/api/system/inputs'
Get json Input parameters: GET /api/system/inputs/INPUT_ID curl -u user_token:token -H 'Content-Type: application/json' -H 'X-Requested-By: cli' 'http://graylog.domain.com:9000/api/system/inputs'
Update token parameters (for example field headers) PUT /api/system/inputs/INPUT_ID curl -i -X POST -u user_token:token -H 'Content-Type: application/json' -H 'X-Requested-By: cli' 'http://graylog.domain.com:9000/api/system/inputs/INPUT_ID' -d @update-headers.json
update-headers.json file should contains original Input parameters with updated field headers:
Thanks for your very interesting answer.
It looks like you’re requesting Graylog API when I am not. I will be requesting another rest API from a different solution.
Nonetheless, I think I can find some inspiration in your message.
Maybe this JSON input is dedicated to request Graylog and nothing else ?