Splunk Search

Splunk REST API: How to filter saved searches by author/name?

splunkuserCA1
Path Finder

Using the Splunk REST API, one can use GET against the "saved/searches" endpoint and get a list of all Saved Searches.

We can use filters on the key names in the dictionary element to reduce the number of entries returned. However, I want to filter based on the <author><name> element: is that possible with the REST API?

Ultimately, I'm trying to answer this question with the REST API: what are all the saved searches that are created by a specific user / what are all the saved searches in a specific user's namespace?

 

References:

1) Example XML output is given in the documentation for "saved/searches": https://docs.splunk.com/Documentation/Splunk/8.0.5/RESTREF/RESTsearch#saved.2Fsearches

 

 

0 Karma

splunkuserCA1
Path Finder

I found the answer, unfortunately not through any documentation. By using Chrome's DevTools, I captured the Query String Parameters as I conducted a search in the Web UI. I see the "search" parameter uses "eai:acl.owner=USERNAME" .

 

So the curl command would be something like: curl -s 'https://splunk.com:8089/../search/saved/searches?search=(eai:acl.owner="USERNAME")'

Get Updates on the Splunk Community!

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...