<?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 Python SDK Oneshot in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-Oneshot/m-p/516948#M9223</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Working with the Python SDK, and my end goal is to fetch logs over a given time.&lt;BR /&gt;&lt;BR /&gt;For now I'm trying to output saved searches and then later will move on to the logs.&lt;BR /&gt;Referencing the docs, this is close to what I want to do, minus the delete portion&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://docs.splunk.com/DocumentationStatic/PythonSDK/1.6.5/client.html?highlight=saved%20searches#splunklib.client.SavedSearches" target="_blank" rel="noopener noreferrer"&gt;https://docs.splunk.com/DocumentationStatic/PythonSDK/1.6.5/client.html?highlight=saved%20searches#splunklib.client.SavedSearches&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Something like&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;for saved_search in saved_searches.iter(pagesize=10):
    print(saved_search)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but not getting any output, any ideas on where to go?&lt;BR /&gt;&lt;BR /&gt;For clarity using the&amp;nbsp;oneshot method, and want to output saved search results.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 31 Aug 2020 02:26:11 GMT</pubDate>
    <dc:creator>dannyze</dc:creator>
    <dc:date>2020-08-31T02:26:11Z</dc:date>
    <item>
      <title>Python SDK Oneshot</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-Oneshot/m-p/516948#M9223</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Working with the Python SDK, and my end goal is to fetch logs over a given time.&lt;BR /&gt;&lt;BR /&gt;For now I'm trying to output saved searches and then later will move on to the logs.&lt;BR /&gt;Referencing the docs, this is close to what I want to do, minus the delete portion&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://docs.splunk.com/DocumentationStatic/PythonSDK/1.6.5/client.html?highlight=saved%20searches#splunklib.client.SavedSearches" target="_blank" rel="noopener noreferrer"&gt;https://docs.splunk.com/DocumentationStatic/PythonSDK/1.6.5/client.html?highlight=saved%20searches#splunklib.client.SavedSearches&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Something like&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;for saved_search in saved_searches.iter(pagesize=10):
    print(saved_search)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but not getting any output, any ideas on where to go?&lt;BR /&gt;&lt;BR /&gt;For clarity using the&amp;nbsp;oneshot method, and want to output saved search results.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 02:26:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-Oneshot/m-p/516948#M9223</guid>
      <dc:creator>dannyze</dc:creator>
      <dc:date>2020-08-31T02:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: Python SDK Oneshot</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-Oneshot/m-p/516979#M9224</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please check the below documentation. I guess it will help with executing saved searches and displaying results.&lt;/P&gt;&lt;P&gt;Let me know if you need more details or help.&lt;/P&gt;&lt;P&gt;&lt;A href="https://dev.splunk.com/enterprise/docs/devtools/python/sdk-python/howtousesplunkpython/howtowork/#To-run-a-saved-search-and-display-search-results" target="_blank"&gt;https://dev.splunk.com/enterprise/docs/devtools/python/sdk-python/howtousesplunkpython/howtowork/#To-run-a-saved-search-and-display-search-results&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 09:07:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-Oneshot/m-p/516979#M9224</guid>
      <dc:creator>gaurav_maniar</dc:creator>
      <dc:date>2020-08-31T09:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: Python SDK Oneshot</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-Oneshot/m-p/517134#M9225</link>
      <description>&lt;P&gt;Thank you going through the documentation it seems like this would be it. However I am not getting any output. Are there more details about this API that can help here?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The following is the snippet that would perform listing of the saved search&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  password = knox_auth(SPLUNK_PASSWORD)
    service = client.connect(host=HOST, port=PORT, username=USERNAME,
            password=password, basic=True, app=APP)
    # return service

    # Retrieve a search
    savedsearch = service.saved_searches["Saved Search"]
    job = savedsearch.dispatch()
    print(job.results())&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Thank You&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 22:50:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-Oneshot/m-p/517134#M9225</guid>
      <dc:creator>dannyze</dc:creator>
      <dc:date>2020-08-31T22:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: Python SDK Oneshot</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-Oneshot/m-p/518973#M9226</link>
      <description>&lt;P&gt;Thank you going through the documentation it seems like this would be it. However I am not getting any output. Are there more details about this API that can help&amp;nbsp; int his use case?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2020 23:42:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-Oneshot/m-p/518973#M9226</guid>
      <dc:creator>dannyze</dc:creator>
      <dc:date>2020-09-10T23:42:19Z</dc:date>
    </item>
  </channel>
</rss>

