<?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 Splunk Enterprise 7.03 Python SDK Pagination Help in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Splunk-Enterprise-7-03-Python-SDK-Pagination-Help/m-p/343911#M6073</link>
    <description>&lt;P&gt;Good Morning,&lt;/P&gt;

&lt;P&gt;I am working with:&lt;/P&gt;

&lt;P&gt;Splunk Version&lt;BR /&gt;
7.0.3&lt;BR /&gt;
Splunk Build&lt;BR /&gt;
fa31da744b51&lt;/P&gt;

&lt;P&gt;I have built my search and when I run it in the dashboard, I see all 360 results that I am expecting; however, when I execute my saved search via the Python SDK I only get 100 results back. I believe it is related to pagination, but cannot figure out the correct parameters to solve the problem.  Here is what I am running:&lt;/P&gt;

&lt;P&gt;import splunklib.client as client&lt;BR /&gt;
service = client.connect(&lt;BR /&gt;
    host=HOST,&lt;BR /&gt;
    port=PORT,&lt;BR /&gt;
    username=USERNAME,&lt;BR /&gt;
    password=PASSWORD)&lt;BR /&gt;
...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;            mysavedsearch = service.saved_searches[splunk_report]

            # Run the saved search
            job = mysavedsearch.dispatch()
     for result in results.ResultsReader(job.results()):
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;. .........process the response.&lt;/P&gt;

&lt;P&gt;I see reference to count in other posts but mostly when executing a search not a saved_search. Any advice on what parameter to use would be appreciated.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Fri, 20 Apr 2018 12:30:38 GMT</pubDate>
    <dc:creator>pdibenedetto</dc:creator>
    <dc:date>2018-04-20T12:30:38Z</dc:date>
    <item>
      <title>Splunk Enterprise 7.03 Python SDK Pagination Help</title>
      <link>https://community.splunk.com/t5/Reporting/Splunk-Enterprise-7-03-Python-SDK-Pagination-Help/m-p/343911#M6073</link>
      <description>&lt;P&gt;Good Morning,&lt;/P&gt;

&lt;P&gt;I am working with:&lt;/P&gt;

&lt;P&gt;Splunk Version&lt;BR /&gt;
7.0.3&lt;BR /&gt;
Splunk Build&lt;BR /&gt;
fa31da744b51&lt;/P&gt;

&lt;P&gt;I have built my search and when I run it in the dashboard, I see all 360 results that I am expecting; however, when I execute my saved search via the Python SDK I only get 100 results back. I believe it is related to pagination, but cannot figure out the correct parameters to solve the problem.  Here is what I am running:&lt;/P&gt;

&lt;P&gt;import splunklib.client as client&lt;BR /&gt;
service = client.connect(&lt;BR /&gt;
    host=HOST,&lt;BR /&gt;
    port=PORT,&lt;BR /&gt;
    username=USERNAME,&lt;BR /&gt;
    password=PASSWORD)&lt;BR /&gt;
...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;            mysavedsearch = service.saved_searches[splunk_report]

            # Run the saved search
            job = mysavedsearch.dispatch()
     for result in results.ResultsReader(job.results()):
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;. .........process the response.&lt;/P&gt;

&lt;P&gt;I see reference to count in other posts but mostly when executing a search not a saved_search. Any advice on what parameter to use would be appreciated.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 12:30:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Splunk-Enterprise-7-03-Python-SDK-Pagination-Help/m-p/343911#M6073</guid>
      <dc:creator>pdibenedetto</dc:creator>
      <dc:date>2018-04-20T12:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Enterprise 7.03 Python SDK Pagination Help</title>
      <link>https://community.splunk.com/t5/Reporting/Splunk-Enterprise-7-03-Python-SDK-Pagination-Help/m-p/343912#M6074</link>
      <description>&lt;P&gt;Hey, &lt;/P&gt;

&lt;P&gt;Good news, the fix is very easy!&lt;BR /&gt;
By default ResultsReader is limited to 100 raws, just add &lt;CODE&gt;count=0&lt;/CODE&gt; in job.results() arguments and you should get the whole thing!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;for result in results.ResultsReader(job.results(count=0)):
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Apr 2018 14:17:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Splunk-Enterprise-7-03-Python-SDK-Pagination-Help/m-p/343912#M6074</guid>
      <dc:creator>damien_chillet</dc:creator>
      <dc:date>2018-04-20T14:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Enterprise 7.03 Python SDK Pagination Help</title>
      <link>https://community.splunk.com/t5/Reporting/Splunk-Enterprise-7-03-Python-SDK-Pagination-Help/m-p/343913#M6075</link>
      <description>&lt;P&gt;Thank you very much! That did the trick.&lt;/P&gt;

&lt;P&gt;Pete&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 14:19:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Splunk-Enterprise-7-03-Python-SDK-Pagination-Help/m-p/343913#M6075</guid>
      <dc:creator>pdibenedetto</dc:creator>
      <dc:date>2018-04-20T14:19:42Z</dc:date>
    </item>
  </channel>
</rss>

