<?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: REST API Paging Power Query in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Paging-Power-Query/m-p/1418700#M26026</link>
    <description>&lt;P&gt;Based on the information you provided here is one possible implementation.&amp;nbsp; It is not optimized (page 1 is fetched twice) but it works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need two parameters - APIKey&amp;nbsp; and Limit .&amp;nbsp; The Limit parameter allows you to control how many items you want to retrieve in each web call.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;let
    Source = Json.Document(Web.Contents("https://api.weasy.io/v1/catalog?X-API-KEY=" &amp;amp; APIKey &amp;amp; "&amp;amp;limit=" &amp;amp; Limit)),
    pages = {1..Source[paging][totalpages]},
    #"Converted to Table" = Table.FromList(pages, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Changed Type" = Table.TransformColumnTypes(#"Converted to Table",{{"Column1", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Data", each Json.Document(Web.Contents("https://api.weasy.io/v1/catalog?X-API-KEY=" &amp;amp; APIKey &amp;amp; "&amp;amp;limit=" &amp;amp; Limit &amp;amp; "&amp;amp;page=" &amp;amp; [Column1]))),
    #"Expanded Data" = Table.ExpandRecordColumn(#"Added Custom", "Data", {"items"}, {"items"}),
    #"Expanded items" = Table.ExpandListColumn(#"Expanded Data", "items")
in
    #"Expanded items"&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 07 Oct 2020 14:58:35 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2020-10-07T14:58:35Z</dc:date>
    <item>
      <title>REST API Paging Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Paging-Power-Query/m-p/1415124#M25993</link>
      <description>&lt;P&gt;Good afternoon. I need help to list all the data on my website and that they have several pages.&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/1522" target="_blank" rel="noopener"&gt;@ImkeF&lt;/A&gt;&amp;nbsp;can you help me again?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = Json.Document(Web.Contents("https://api.weasy.io/v1/catalog?X-API-KEY=&amp;lt;key&amp;gt;")),
    ToTable = Record.ToTable(Source), //
    Result = Table.RemoveLastN(ToTable,1),
    NextPage = Source[paging][next],
    Custom1 = List.Generate( () =&amp;gt;
        [ResultRecord = Source, NextPage = NextPage],
        each [NextPage] &amp;lt;&amp;gt; null,
        each [
            NextPage = [ResultRecord][paging][next],
            ResultRecord = Json.Document(Web.Contents(NextPage)),
            Result = Table.RemoveLastN(Record.ToTable(ResultRecord),1)
 
        ]
   //    ,each [Result]
    ),
    #"Converted to Table" = Table.FromList(Custom1, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"Result"}, {"Result"}),
    #"Expanded Result" = Table.ExpandTableColumn(#"Expanded Column1", "Result", {"Name", "Value"}, {"Name", "Value"}),
    Append = Result &amp;amp; #"Expanded Result",
    #"Filtered Rows" = Table.SelectRows(Append, each ([Name] &amp;lt;&amp;gt; null))
in
    #"Filtered Rows"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="lia-note-subject lia-component-subject"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/370202iB9046F2B6EC1E7E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;1&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/370203iD8F0A96809E15D4B/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;2&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/370204iE941D6F54C489847/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.png" alt="3" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;3&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="4" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/370205i066127DF4A4C3F3A/image-size/large?v=v2&amp;amp;px=999" role="button" title="4.png" alt="4" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;4&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="5" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/370206iB980381805CC74C2/image-size/large?v=v2&amp;amp;px=999" role="button" title="5.png" alt="5" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;5&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="6" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/370207iF95E4D84ED51FBF2/image-size/large?v=v2&amp;amp;px=999" role="button" title="6.png" alt="6" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;6&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="7" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/370208i85A7D403A59C964B/image-size/large?v=v2&amp;amp;px=999" role="button" title="7.png" alt="7" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;7&lt;/span&gt;&lt;/span&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 06 Oct 2020 10:58:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Paging-Power-Query/m-p/1415124#M25993</guid>
      <dc:creator>HugoAPereira</dc:creator>
      <dc:date>2020-10-06T10:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Paging Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Paging-Power-Query/m-p/1416512#M26006</link>
      <description>&lt;P&gt;This line&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;   Result = Table.RemoveLastN(ToTable,1),&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is not used subsequently. Is that intentional?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without details on how your API's pagination works it is hard to give you advice.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2020 21:58:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Paging-Power-Query/m-p/1416512#M26006</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-10-06T21:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Paging Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Paging-Power-Query/m-p/1417431#M26014</link>
      <description>Hi, What data do you need to help me?</description>
      <pubDate>Wed, 07 Oct 2020 08:20:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Paging-Power-Query/m-p/1417431#M26014</guid>
      <dc:creator>HugoAPereira</dc:creator>
      <dc:date>2020-10-07T08:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Paging Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Paging-Power-Query/m-p/1417971#M26021</link>
      <description>&lt;P&gt;One (or all) of these:&lt;/P&gt;
&lt;P&gt;- the API's documentation&lt;/P&gt;
&lt;P&gt;- the output of the first call&lt;/P&gt;
&lt;P&gt;- a sample API key&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 11:07:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Paging-Power-Query/m-p/1417971#M26021</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-10-07T11:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Paging Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Paging-Power-Query/m-p/1418700#M26026</link>
      <description>&lt;P&gt;Based on the information you provided here is one possible implementation.&amp;nbsp; It is not optimized (page 1 is fetched twice) but it works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need two parameters - APIKey&amp;nbsp; and Limit .&amp;nbsp; The Limit parameter allows you to control how many items you want to retrieve in each web call.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;let
    Source = Json.Document(Web.Contents("https://api.weasy.io/v1/catalog?X-API-KEY=" &amp;amp; APIKey &amp;amp; "&amp;amp;limit=" &amp;amp; Limit)),
    pages = {1..Source[paging][totalpages]},
    #"Converted to Table" = Table.FromList(pages, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Changed Type" = Table.TransformColumnTypes(#"Converted to Table",{{"Column1", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Data", each Json.Document(Web.Contents("https://api.weasy.io/v1/catalog?X-API-KEY=" &amp;amp; APIKey &amp;amp; "&amp;amp;limit=" &amp;amp; Limit &amp;amp; "&amp;amp;page=" &amp;amp; [Column1]))),
    #"Expanded Data" = Table.ExpandRecordColumn(#"Added Custom", "Data", {"items"}, {"items"}),
    #"Expanded items" = Table.ExpandListColumn(#"Expanded Data", "items")
in
    #"Expanded items"&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 07 Oct 2020 14:58:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Paging-Power-Query/m-p/1418700#M26026</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-10-07T14:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Paging Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Paging-Power-Query/m-p/1418849#M26028</link>
      <description>&lt;P&gt;Is perfect! It worked the first time, it has no errors and it was extraordinary support. Thank you very much.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 15:51:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Paging-Power-Query/m-p/1418849#M26028</guid>
      <dc:creator>HugoAPereira</dc:creator>
      <dc:date>2020-10-07T15:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Paging Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Paging-Power-Query/m-p/1445704#M26204</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100342"&gt;@lbendlin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need your help again.&lt;BR /&gt;I already have more than 5000 products on the site. The problem is that when obtaining the data, the error message "(429): Too Many Requests" is returned. The site only allows 100 requests per minute. How do I get around this problem?&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 23:57:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Paging-Power-Query/m-p/1445704#M26204</guid>
      <dc:creator>HugoAPereira</dc:creator>
      <dc:date>2020-10-20T23:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: REST API Paging Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/REST-API-Paging-Power-Query/m-p/1446971#M26209</link>
      <description>&lt;P&gt;As always Chris Webb has the answer:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blog.crossjoin.co.uk/2015/04/30/using-function-invokeafter-in-power-query/" target="_blank"&gt;https://blog.crossjoin.co.uk/2015/04/30/using-function-invokeafter-in-power-query/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2020 11:24:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/REST-API-Paging-Power-Query/m-p/1446971#M26209</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-10-21T11:24:47Z</dc:date>
    </item>
  </channel>
</rss>

