<?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: API LIMITATION : how to get all the results ? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/API-LIMITATION-how-to-get-all-the-results/m-p/1641801#M27652</link>
    <description>&lt;P&gt;You can use&amp;nbsp;&lt;SPAN&gt;List.Generate() function to create a loop.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Feb 2021 12:21:08 GMT</pubDate>
    <dc:creator>avatorl</dc:creator>
    <dc:date>2021-02-03T12:21:08Z</dc:date>
    <item>
      <title>API LIMITATION : how to get all the results ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/API-LIMITATION-how-to-get-all-the-results/m-p/1641328#M27645</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are new to powerbi. We managed to query an API and we got the data back.&lt;/P&gt;&lt;P&gt;On the other hand, there is a limitation on the data in response: we are limited to 100 lines.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I think this is a common issue, however we haven't found on the forum how to create a function that would retrieve ALL data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have seen that the API returns us a hasnext set to TRUE when other results are present but not returned. In addition, the API offers the possibility to skip the n first line. How to exploit this please? Is it about making a loop?&lt;/P&gt;&lt;P&gt;But do you have an example for powerbi? thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here our request:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;let&lt;BR /&gt;auth_key ="Token XXX",&lt;BR /&gt;base_url = "https://url_of_our_api/",&lt;BR /&gt;extension = "api/v1/alerts/",&lt;BR /&gt;url = base_url &amp;amp;extension,&lt;BR /&gt;header= [#"Authorization" = auth_key,&lt;BR /&gt;#"Content-Type" = "application/json"],&lt;BR /&gt;content1= "{&lt;BR /&gt;""filters"": {&lt;BR /&gt;&lt;BR /&gt;""alertOpen"":{&lt;BR /&gt;""eq"": true&lt;BR /&gt;},&lt;BR /&gt;&lt;BR /&gt;""severity"": {&lt;BR /&gt;""eq"": [0,1]&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;""skip"": 100, // skip n first lines&lt;BR /&gt;""limit"": 100 //by default&lt;BR /&gt;&lt;BR /&gt;}",&lt;BR /&gt;webdata1 = Web.Contents(url, [Headers=[#"Authorization" = auth_key,&lt;BR /&gt;#"Content-Type" = "application/json"],Content = Text.ToBinary(content1)]),&lt;BR /&gt;response1 = Json.Document(webdata1),&lt;BR /&gt;data = response1[data]&lt;BR /&gt;in&lt;BR /&gt;data&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here our result :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/446562i25A97B445F92FBF6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank a lot !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 09:51:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/API-LIMITATION-how-to-get-all-the-results/m-p/1641328#M27645</guid>
      <dc:creator>ghostrock37</dc:creator>
      <dc:date>2021-02-03T09:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: API LIMITATION : how to get all the results ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/API-LIMITATION-how-to-get-all-the-results/m-p/1641801#M27652</link>
      <description>&lt;P&gt;You can use&amp;nbsp;&lt;SPAN&gt;List.Generate() function to create a loop.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 12:21:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/API-LIMITATION-how-to-get-all-the-results/m-p/1641801#M27652</guid>
      <dc:creator>avatorl</dc:creator>
      <dc:date>2021-02-03T12:21:08Z</dc:date>
    </item>
  </channel>
</rss>

