<?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: In search results, why is API ignoring the count parameter? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/In-search-results-why-is-API-ignoring-the-count-parameter/m-p/406319#M72107</link>
    <description>&lt;P&gt;Hi @kleszczynski, Can you try adding count and output_mode=json into data option in curl?&lt;/P&gt;</description>
    <pubDate>Wed, 03 Oct 2018 18:24:57 GMT</pubDate>
    <dc:creator>VatsalJagani</dc:creator>
    <dc:date>2018-10-03T18:24:57Z</dc:date>
    <item>
      <title>In search results, why is API ignoring the count parameter?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/In-search-results-why-is-API-ignoring-the-count-parameter/m-p/406318#M72106</link>
      <description>&lt;P&gt;I'm using API call to retrieve results of the job &lt;CODE&gt;search/jobs/{search_id}/results&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;I'm running the following command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -u admin:password -k "https://&amp;lt;HOST&amp;gt;/rest/services/search/jobs/&amp;lt;JOB_NUMBER&amp;gt;/results?count=1&amp;amp;output_mode=json"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But, no matter what, when I put for &lt;CODE&gt;count&lt;/CODE&gt; param (0, 1, "asadafa", etc.) I get 100 events (which is default value). &lt;/P&gt;

&lt;P&gt;Can there be some Splunk server configuration which makes the &lt;CODE&gt;count&lt;/CODE&gt; parameter ignored? When I run the query on other Splunk instance it works as expected.&lt;/P&gt;

&lt;P&gt;Splunk version: 6.6.6&lt;BR /&gt;
The server which I'm trying connect to has an endpoint &lt;CODE&gt;&lt;A href="https://&amp;lt;HOST&amp;gt;/rest" target="test_blank"&gt;https://&amp;lt;HOST&amp;gt;/rest&lt;/A&gt;&lt;/CODE&gt;, which probably redirects to Splunk management API port.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 15:18:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/In-search-results-why-is-API-ignoring-the-count-parameter/m-p/406318#M72106</guid>
      <dc:creator>kleszczynski</dc:creator>
      <dc:date>2018-10-03T15:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: In search results, why is API ignoring the count parameter?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/In-search-results-why-is-API-ignoring-the-count-parameter/m-p/406319#M72107</link>
      <description>&lt;P&gt;Hi @kleszczynski, Can you try adding count and output_mode=json into data option in curl?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 18:24:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/In-search-results-why-is-API-ignoring-the-count-parameter/m-p/406319#M72107</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2018-10-03T18:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: In search results, why is API ignoring the count parameter?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/In-search-results-why-is-API-ignoring-the-count-parameter/m-p/406320#M72108</link>
      <description>&lt;P&gt;Do you mean &lt;CODE&gt;-d count=1 -d output_mode=json&lt;/CODE&gt;? I've already tried it - the issue remains the same.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Oct 2018 19:44:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/In-search-results-why-is-API-ignoring-the-count-parameter/m-p/406320#M72108</guid>
      <dc:creator>kleszczynski</dc:creator>
      <dc:date>2018-10-03T19:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: In search results, why is API ignoring the count parameter?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/In-search-results-why-is-API-ignoring-the-count-parameter/m-p/406321#M72109</link>
      <description>&lt;P&gt;Hi @kleszczynski,&lt;BR /&gt;
Can you try &lt;STRONG&gt;max_count&lt;/STRONG&gt; option while creating search (not while getting the result)?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 05:51:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/In-search-results-why-is-API-ignoring-the-count-parameter/m-p/406321#M72109</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2018-10-04T05:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: In search results, why is API ignoring the count parameter?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/In-search-results-why-is-API-ignoring-the-count-parameter/m-p/406322#M72110</link>
      <description>&lt;P&gt;Can't you connect directly on splunk management port instead of redirecting from &lt;CODE&gt;&lt;A href="https://&amp;lt;HOST&amp;gt;/rest" target="test_blank"&gt;https://&amp;lt;HOST&amp;gt;/rest&lt;/A&gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I am using below command on SPlunk 7.1.2 and it is returning all values (I have more than 3K events in results and all returning in JSON)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -u admin:password "https://&amp;lt;SPLUNK_SERVER&amp;gt;:8089/services/search/jobs/&amp;lt;JOB_ID&amp;gt;/results?count=0&amp;amp;output_mode=json"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Oct 2018 08:58:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/In-search-results-why-is-API-ignoring-the-count-parameter/m-p/406322#M72110</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-10-04T08:58:12Z</dc:date>
    </item>
  </channel>
</rss>

