Getting Data In

Saved Search REST End Point

lpolo
Motivator

The following URI returns the metadata information related to a saved search named "test" found in application "search":

https://myhost:8089/servicesNS/userid/search/saved/searches/test

I would like to know what will be the URI to run the saved search "test" found in application "search" where the returned data format is in json.

Thanks,
Lp

Tags (1)
0 Karma

lpolo
Motivator

I had to simplify the saved search to make it work. why? I do not know. the original saved search works when I dispatch the saved search and grab the results with the sid.

This is an example:
https://myhost.com:8089/services/search/jobs -d search=" savedsearch test" -d exec_mode=oneshot -d output_mode=json . It worked.

0 Karma

lpolo
Motivator

I am aware of it. I just wanted know if it is possible to get the results of a saved search with a single REST call.

0 Karma

gkanapathy
Splunk Employee
Splunk Employee

That is what you would normally do with any search, even just a hardcoded search string, though I suppose you could run those with exec_mode of blocking or oneshot. If that's what you want to do, you can just get the search string for the saved search and dispatch a job using that string in the desired exec_mode.

0 Karma

gkanapathy
Splunk Employee
Splunk Employee

If you want to run a search, you must also specify the view in which it is run, assuming you want to link to it and run it in the UI. ( If you want to just schedule and run in the background without UI, you can use the REST call http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI/RESTsearch#saved.2Fsearches.2F.7Bname.7D.... )

Generally, this URL looks like http://splunkweb:8000/en-US/app/search/flashtimeline?s=test

lpolo
Motivator

It looks like the only way is to dispatch the saved search and then grab the results.
It seems that there is not a way to call the saved search directly, unless; you call the end point to be part of a view like you mentioned.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Observability Simplified: Combining User Experience, Application Performance & ...

Tech Talk Observability Simplified: Combining User Experience, Application Performance & Network ...

Event Series May & June: From Network Visibility to Service Intelligence

Unifying the Network: Moving from Alert Noise to Service Intelligence with Splunk ITSI In today’s hybrid ...

Global Splunk User Group Events: May + June 2026

Your Splunk Community Awaits: Discover Upcoming User Group Events Worldwide    Staying ahead in the fast-paced ...