Reporting

Using Splunk REST to list "saved searches" only returns a limited set of results

dibblel
Engager

The Splunk API appears to be limiting the number of "saved searches" returned. I am running the query with our admin account so I do not believe it is a permissions issue. However, I did notice if I adjust a query to GLOBAL it appears to show up in the list.

Is there not a way to show ALL saved searches?

Example query:

curl -k -u admin:$PASS "splunk:8089/servicesNS/admin/search/saved/searches?count=100"

curl -k -u admin:$PASS "splunk:8089/services/saved/searches?count=100"

Thanks!

Tags (3)

dibblel
Engager

I found the answer to my question:

"splunk:8089/servicesNS/-/-/saved/searches?count=100"

I do not know why this is not included in the documentation as it clearly states, "List all saved searched on this Splunk instance" for the below command.

curl -k -u admin:pass "localhost:8089/services/saved/searches"

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!

Agent Mode Engaged! Enchaining Agentic Operations with Splunk AI Assistant 2.0

    Are you ready to transform how your team handles complex data requests? We invite you to our upcoming ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...