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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...