<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Listing all saved searches using Python SDK in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Listing-all-saved-searches-using-Python-SDK/m-p/45235#M560</link>
    <description>&lt;P&gt;That's what I was thinking as well.&lt;BR /&gt;
But I was hoping that there was an other way to get all the searches without having to make a connection for every app.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Mar 2013 08:37:23 GMT</pubDate>
    <dc:creator>pietervi</dc:creator>
    <dc:date>2013-03-05T08:37:23Z</dc:date>
    <item>
      <title>Listing all saved searches using Python SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Listing-all-saved-searches-using-Python-SDK/m-p/45233#M558</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;When doing changes to our splunk infrastructure I want to temporarily disabled all summary indexing searches from certain apps.&lt;BR /&gt;
I'm trying to do that using the python sdk.&lt;/P&gt;

&lt;P&gt;To get started I'm trying to fetch a list of all searches that exist in my Splunk setup.&lt;/P&gt;

&lt;P&gt;But somehow when logging in using the sdk I only have access to the searches that the user owns.&lt;BR /&gt;
See:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE&gt;service=client.connect(host="localhost",port=8089,username="admin",password="xxx",autologin=True)&lt;BR /&gt;
for savedsearch in service.saved_searches:&lt;BR /&gt;
    print savedsearch.name&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;This results in a total of about 6 searches being printed:&lt;BR /&gt;
&lt;PRE&gt;Errors in the last 24 hours&lt;BR /&gt;
Errors in the last hour&lt;BR /&gt;
Indexing workload&lt;BR /&gt;
Messages by minute last 3 hours&lt;BR /&gt;
Splunk errors last 24 hours&lt;BR /&gt;
Top five sourcetypes&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;But this list should contain all searches that exist in Splunk.&lt;BR /&gt;
I assume that it has something to do with the way I'm connecting but I'm not sure.&lt;/P&gt;

&lt;P&gt;Thanks in advance,&lt;/P&gt;

&lt;P&gt;Pieter&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2013 10:40:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Listing-all-saved-searches-using-Python-SDK/m-p/45233#M558</guid>
      <dc:creator>pietervi</dc:creator>
      <dc:date>2013-02-27T10:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: Listing all saved searches using Python SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Listing-all-saved-searches-using-Python-SDK/m-p/45234#M559</link>
      <description>&lt;P&gt;The saved searches you are seeing are scoped to the default app for the user (admin in your case). You can list searches from other apps by specifying the "app" parameter in the connect method. The call would look something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;service=client.connect(host="localhost",port=8089,username="admin",password="xxx",app="xxx")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Mar 2013 23:39:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Listing-all-saved-searches-using-Python-SDK/m-p/45234#M559</guid>
      <dc:creator>Neeraj_Luthra</dc:creator>
      <dc:date>2013-03-04T23:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: Listing all saved searches using Python SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Listing-all-saved-searches-using-Python-SDK/m-p/45235#M560</link>
      <description>&lt;P&gt;That's what I was thinking as well.&lt;BR /&gt;
But I was hoping that there was an other way to get all the searches without having to make a connection for every app.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2013 08:37:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Listing-all-saved-searches-using-Python-SDK/m-p/45235#M560</guid>
      <dc:creator>pietervi</dc:creator>
      <dc:date>2013-03-05T08:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Listing all saved searches using Python SDK</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Listing-all-saved-searches-using-Python-SDK/m-p/45236#M561</link>
      <description>&lt;P&gt;In the connect method, you can pass app="-" and it will list all saved searches that your user has access to across all apps. Hope this helps.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2013 10:49:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Listing-all-saved-searches-using-Python-SDK/m-p/45236#M561</guid>
      <dc:creator>Neeraj_Luthra</dc:creator>
      <dc:date>2013-03-06T10:49:59Z</dc:date>
    </item>
  </channel>
</rss>

