<?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: Splunk API paging in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-API-paging/m-p/35171#M6376</link>
    <description>&lt;P&gt;So I used the web console and the splunkd_access.log file to figure out that the requests to these objects uses the opensearch REST parameters.  &lt;/P&gt;

&lt;P&gt;I changed my url to include a trailing ?count=-1 to return all records.&lt;/P&gt;

&lt;P&gt;EX:&lt;BR /&gt;
&lt;A href="https://%basesplunkurl%:8089/services/data/inputs/monitor?count=-1" target="test_blank"&gt;https://%basesplunkurl%:8089/services/data/inputs/monitor?count=-1&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jun 2011 20:40:07 GMT</pubDate>
    <dc:creator>Zambonilli</dc:creator>
    <dc:date>2011-06-27T20:40:07Z</dc:date>
    <item>
      <title>Splunk API paging</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-API-paging/m-p/35170#M6375</link>
      <description>&lt;P&gt;I'm running into an issue with using the Splunk API and it only returning 30 records.  I've searched the Splunk API, ATOM and opensearch documentation and I am still unable to determine how to page the records.&lt;/P&gt;

&lt;P&gt;For example I am querying to get the current data inputs by calling &lt;A href="https://%basesplunkurl%:8089/services/data/inputs/monitor" target="test_blank"&gt;https://%basesplunkurl%:8089/services/data/inputs/monitor&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;This returns a document with 30 records and the opensearch fields indicating that there is 34 records total.&lt;/P&gt;

&lt;P&gt;&lt;A href="opensearch:totalResults"&gt;opensearch:totalResults&lt;/A&gt;34&lt;A href="https://answers.splunk.comopensearch:totalResults"&gt;/opensearch:totalResults&lt;/A&gt;&lt;BR /&gt;
  &lt;A href="opensearch:itemsPerPage"&gt;opensearch:itemsPerPage&lt;/A&gt;30&lt;A href="https://answers.splunk.comopensearch:itemsPerPage"&gt;/opensearch:itemsPerPage&lt;/A&gt;&lt;BR /&gt;
  &lt;A href="opensearch:startIndex"&gt;opensearch:startIndex&lt;/A&gt;0&lt;A href="https://answers.splunk.comopensearch:startIndex"&gt;/opensearch:startIndex&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;What do I have to do to get the next page of results?  In this example the last 4 data input records?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2011 20:01:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-API-paging/m-p/35170#M6375</guid>
      <dc:creator>Zambonilli</dc:creator>
      <dc:date>2011-06-27T20:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk API paging</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-API-paging/m-p/35171#M6376</link>
      <description>&lt;P&gt;So I used the web console and the splunkd_access.log file to figure out that the requests to these objects uses the opensearch REST parameters.  &lt;/P&gt;

&lt;P&gt;I changed my url to include a trailing ?count=-1 to return all records.&lt;/P&gt;

&lt;P&gt;EX:&lt;BR /&gt;
&lt;A href="https://%basesplunkurl%:8089/services/data/inputs/monitor?count=-1" target="test_blank"&gt;https://%basesplunkurl%:8089/services/data/inputs/monitor?count=-1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2011 20:40:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-API-paging/m-p/35171#M6376</guid>
      <dc:creator>Zambonilli</dc:creator>
      <dc:date>2011-06-27T20:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk API paging</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-API-paging/m-p/35172#M6377</link>
      <description>&lt;P&gt;In general, you can use the offset parameter to get the next offset of results. So in your case, you'd pass in &lt;CODE&gt;offset=30&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2011 23:54:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-API-paging/m-p/35172#M6377</guid>
      <dc:creator>itay</dc:creator>
      <dc:date>2011-07-26T23:54:25Z</dc:date>
    </item>
  </channel>
</rss>

