Splunk Dev

Python SDK not returned all saved searches

askjoe
Engager

I'm running into an issue where I'm trying to pull a list of saved searches via the SDK. I've followed the directions via the documentation and I'm certain that my owner/app/shared settings are correct. I'm only getting saved searches where the owner is set to nobody (basically the default saved searches).

kwargs_splunk.update({'owner': 'myowner', 'app':'search', 'sharing':'global'.....})

service = client.connect(**kwargs_splunk)

for savedsearch in service.saved_searches:
print savedsearch.name

What am I doing wrong? Even if I use the credentials of the users who creating the new searches, I still get the default ones and nothing else.

Tags (3)

paramagurukarth
Builder

Try clisent.connect without 'sharing' in kwargs
ie, just **host,port,username,password and app

0 Karma
Get Updates on the Splunk Community!

Unlock Database Monitoring with Splunk Observability Cloud

  In today’s fast-paced digital landscape, even minor database slowdowns can disrupt user experiences and ...

Purpose in Action: How Splunk Is Helping Power an Inclusive Future for All

At Cisco, purpose isn’t a tagline—it’s a commitment. Cisco’s FY25 Purpose Report outlines how the company is ...

[Upcoming Webinar] Demo Day: Transforming IT Operations with Splunk

Join us for a live Demo Day at the Cisco Store on January 21st 10:00am - 11:00am PST In the fast-paced world ...