Getting Data In

How can I access the results of a saved search independently of the job's SID?

BenjaminWyatt
Communicator

Hi everyone,
Here's my situation. I have a saved search that runs every 15 minutes or so. We have an external application that needs to access the results of that saved search after it runs. Now, I know this can be done by making a call to the REST API, getting the SID for the search job, and then using the SID to make another API call to make the results.

However, this seems inefficient. Because the saved search runs again every 15 minutes, the SID changes every 15 minutes, and the external application has to poll Splunk again to find out the new SID. Is there a way to allow my application to access the last results of this particular saved search, regardless of what the SID of the last job was?

0 Karma

Neeraj_Luthra
Splunk Employee
Splunk Employee

You can access the history on the saved search which will give you a collection of jobs for it. The first element in the collection, if size>0, is the most recent job.

Are you using any of the Splunk SDKs (Java, JavaScript, Python)? It might be easier to go through an SDK if you are developing in any of these languages. More documentation available at http://dev.splunk.com/view/sdks/SP-CAAADP7.

Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...