Monitoring Splunk

Call External REST URL from search

premraj_vs
Path Finder

I know that we can use REST Modular Input to call REST API and get the results in JSON format in Splunk. But, my requirement is different.
I want to make a rest call directly in Splunk search. is this possible ? If yes, can someone give any pointers ?

Tags (1)
0 Karma

dwaddle
SplunkTrust
SplunkTrust

Do you want the REST API call to originate from the user's browser? Remember dashboards can have javascript and that javascript can do anything that the cross-origin policy allows. Sometimes cross-origin policy makes it just too difficult to call 3rd party APIs directly from the browser though.

You can always build your own custom search command. The user (or the dashboard they are viewing) makes a call to | callmyrestapi which runs a python script on the search head that does the needful.

There is already an app, https://splunkbase.splunk.com/app/4172/, that provides a very generic |curl custom search command. This may be enough to do what you need.

premraj_vs
Path Finder

Thank you. Will check this

0 Karma
Get Updates on the Splunk Community!

Uncovering Multi-Account Fraud with Splunk Banking Analytics

Last month, I met with a Senior Fraud Analyst at a nationally recognized bank to discuss their recent success ...

Secure Your Future: A Deep Dive into the Compliance and Security Enhancements for the ...

What has been announced?  In the blog, “Preparing your Splunk Environment for OpensSSL3,”we announced the ...

New This Month in Splunk Observability Cloud - Synthetic Monitoring updates, UI ...

This month, we’re delivering several platform, infrastructure, application and digital experience monitoring ...