<?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 maxResults in Rest Api connection in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/maxResults-in-Rest-Api-connection/m-p/1660022#M49492</link>
    <description>&lt;P&gt;My REST API query only returns 1,000 results although it is configured to return maxResults=5000, and the total number of stories in my project is around 3000. Is there any way to increase the maxResult value?&lt;/P&gt;</description>
    <pubDate>Mon, 23 Dec 2019 06:42:05 GMT</pubDate>
    <dc:creator>Anjana</dc:creator>
    <dc:date>2019-12-23T06:42:05Z</dc:date>
    <item>
      <title>maxResults in Rest Api connection</title>
      <link>https://community.qlik.com/t5/App-Development/maxResults-in-Rest-Api-connection/m-p/1660022#M49492</link>
      <description>&lt;P&gt;My REST API query only returns 1,000 results although it is configured to return maxResults=5000, and the total number of stories in my project is around 3000. Is there any way to increase the maxResult value?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2019 06:42:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/maxResults-in-Rest-Api-connection/m-p/1660022#M49492</guid>
      <dc:creator>Anjana</dc:creator>
      <dc:date>2019-12-23T06:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: maxResults in Rest Api connection</title>
      <link>https://community.qlik.com/t5/App-Development/maxResults-in-Rest-Api-connection/m-p/1662702#M49808</link>
      <description>&lt;P&gt;It is very common that an API request returns a maximum of 1000 results. To get around this you need to do multiple API requests by using pagination.&lt;/P&gt;&lt;P&gt;Qlik Pagination:&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/connectors/Subsystems/REST_connector_help/Content/Connectors_REST/Create-REST-connection/Pagination-scenarios.htm" target="_blank"&gt;https://help.qlik.com/en-US/connectors/Subsystems/REST_connector_help/Content/Connectors_REST/Create-REST-connection/Pagination-scenarios.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I often use the statement 'with connection' in a loop to configure the offset and count request parameters of the API. Of course, this depents on the request parameters of your API.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//=== Initialize&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Let&amp;nbsp;&lt;FONT color="#008000"&gt;voffset &lt;FONT color="#000000"&gt;= 0;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#000000"&gt;Let &lt;FONT color="#008000"&gt;vcount&lt;/FONT&gt;= 1000; //Max results per API request&lt;/FONT&gt;&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;For i = 1 To 3&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;RestConnectorMasterTable: &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SQL SELECT &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"__KEY_root",&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(SELECT &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"__FK_items", &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"__KEY_items", &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(SELECT &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"email", &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"displayName", &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"self", &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"__FK_creator" &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM "creator" FK "__FK_creator") &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM "items" PK "__KEY_items" FK "__FK_items")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM JSON (wrap on) "root" PK "__KEY_root" &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;WITH CONNECTION(Url "&lt;A href="https://content.googleapis.com/calendar/v3/calendars/primary/events" target="_blank"&gt;https://content.googleapis.com/calendar/v3/calendars/primary/events&lt;/A&gt;&lt;FONT color="#008000"&gt;?&lt;FONT color="#000000"&gt;key=YourKey&amp;amp;&lt;/FONT&gt;offset&lt;FONT color="#000000"&gt;=&lt;/FONT&gt;$(voffset)&lt;FONT color="#000000"&gt;&amp;amp;&lt;/FONT&gt;count&lt;FONT color="#000000"&gt;=&lt;/FONT&gt;$(vcount)&lt;/FONT&gt;;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;RestTableName:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[Your Fields]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident&amp;nbsp;RestConnectorMasterTable;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Drop table RestConnectorMasterTable;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If i = 1&amp;nbsp; Then&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;//=== Create the table&amp;nbsp;FinalTableName&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Rename table RestTableName&amp;nbsp;to FinalTableName;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Else&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;//=== Add new results to the table FinalTableName&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Concatenate(FinalTableName) Load * Resident RestTableName&amp;nbsp;;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Drop table RestTableName&amp;nbsp;; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Endif;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;//=== Update pagination offset counter&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Let &lt;FONT color="#008000"&gt;voffset &lt;/FONT&gt;= '$(&lt;FONT color="#008000"&gt;voffset &lt;/FONT&gt;)' + 1000;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Next i; //Next Pagination&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jan 2020 19:40:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/maxResults-in-Rest-Api-connection/m-p/1662702#M49808</guid>
      <dc:creator>TimvB</dc:creator>
      <dc:date>2020-01-05T19:40:10Z</dc:date>
    </item>
  </channel>
</rss>

