<?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: Help with API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Help-with-API/m-p/3311183#M43315</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Could you please test this query:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;let&lt;BR /&gt;// Set the initial page number and page size&lt;BR /&gt;pageNumber = 1,&lt;BR /&gt;pageSize = 10,&lt;/P&gt;&lt;P&gt;// Define a helper function to fetch invoices for a specific page&lt;BR /&gt;fetchInvoices = (page) =&amp;gt;&lt;BR /&gt;let&lt;BR /&gt;// Generate the URL for the current page&lt;BR /&gt;url = baseUrl &amp;amp; "/api/" &amp;amp; accountKey &amp;amp; "/" &amp;amp; subscriptionKey &amp;amp; "/billing/invoices?page=" &amp;amp; Text.From(page) &amp;amp; "&amp;amp;pageSize=" &amp;amp; Text.From(pageSize),&lt;/P&gt;&lt;P&gt;// Fetch the invoices for the current page&lt;BR /&gt;invoices = Json.Document(Web.Contents(url, [&lt;BR /&gt;Headers = [&lt;BR /&gt;#"Content-Type"="application/x-www-form-urlencoded",&lt;BR /&gt;#"Authorization"="Bearer " &amp;amp; token&lt;BR /&gt;]&lt;BR /&gt;])),&lt;/P&gt;&lt;P&gt;// Extract the 'data' field from the fetched invoices&lt;BR /&gt;invoiceData = invoices[data]&lt;BR /&gt;in&lt;BR /&gt;invoiceData,&lt;/P&gt;&lt;P&gt;// Initialize an empty list to store all invoices&lt;BR /&gt;allInvoices = List.Combine(List.Generate(() =&amp;gt;&lt;BR /&gt;[page = pageNumber, invoices = fetchInvoices(pageNumber)],&lt;BR /&gt;each List.Count([invoices]) &amp;gt; 0,&lt;BR /&gt;each [&lt;BR /&gt;page = [page] + 1,&lt;BR /&gt;invoices = fetchInvoices([page])&lt;BR /&gt;],&lt;BR /&gt;each [invoices]&lt;BR /&gt;))&lt;BR /&gt;in&lt;BR /&gt;allInvoices&lt;/P&gt;</description>
    <pubDate>Sat, 01 Jul 2023 18:41:32 GMT</pubDate>
    <dc:creator>SisterRay</dc:creator>
    <dc:date>2023-07-01T18:41:32Z</dc:date>
    <item>
      <title>Help with API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Help-with-API/m-p/3305074#M43266</link>
      <description>&lt;P&gt;Hi!!&lt;/P&gt;&lt;P&gt;I'm actually working ina projecto to develop reports using data from an API. However, I can create a connection but the information have pagination.&lt;/P&gt;&lt;P&gt;I want to import all the information, but I can't develop all the code to do it automatically.&lt;/P&gt;&lt;P&gt;Can you help me please!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is all the things I have.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jc_16_1-1687896261932.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/934307i78A0B096FC331A2A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jc_16_1-1687896261932.png" alt="Jc_16_1-1687896261932.png" /&gt;&lt;/span&gt;&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;code used to acces the invoices&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; invoices = Json.Document(Web.Contents(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; baseUrl &amp;amp; "/api/" &amp;amp; accountKey &amp;amp; "/" &amp;amp; subscriptionKey &amp;amp; "/billing/invoices?page=1&amp;amp;pageSize=10",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Headers = [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #"Content-Type"="application/x-www-form-urlencoded",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#"Authorization"="Bearer " &amp;amp; token&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ))&lt;/P&gt;&lt;P&gt;in&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; invoices[data]&lt;/P&gt;&lt;P&gt;@Anonymous&lt;/a&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 20:06:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Help-with-API/m-p/3305074#M43266</guid>
      <dc:creator>Jc_16</dc:creator>
      <dc:date>2023-06-27T20:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Help with API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Help-with-API/m-p/3310240#M43309</link>
      <description>&lt;P&gt;Hi! Could you please add link to API Documentation?&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2023 13:05:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Help-with-API/m-p/3310240#M43309</guid>
      <dc:creator>SisterRay</dc:creator>
      <dc:date>2023-06-30T13:05:32Z</dc:date>
    </item>
    <item>
      <title>Re: Help with API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Help-with-API/m-p/3310521#M43312</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;The link I'm actually using is&amp;nbsp;&lt;A href="https://app.rose.primaverabss.com" target="_blank"&gt;https://app.rose.primaverabss.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2023 15:50:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Help-with-API/m-p/3310521#M43312</guid>
      <dc:creator>Jc_16</dc:creator>
      <dc:date>2023-06-30T15:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help with API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Help-with-API/m-p/3311183#M43315</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Could you please test this query:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;let&lt;BR /&gt;// Set the initial page number and page size&lt;BR /&gt;pageNumber = 1,&lt;BR /&gt;pageSize = 10,&lt;/P&gt;&lt;P&gt;// Define a helper function to fetch invoices for a specific page&lt;BR /&gt;fetchInvoices = (page) =&amp;gt;&lt;BR /&gt;let&lt;BR /&gt;// Generate the URL for the current page&lt;BR /&gt;url = baseUrl &amp;amp; "/api/" &amp;amp; accountKey &amp;amp; "/" &amp;amp; subscriptionKey &amp;amp; "/billing/invoices?page=" &amp;amp; Text.From(page) &amp;amp; "&amp;amp;pageSize=" &amp;amp; Text.From(pageSize),&lt;/P&gt;&lt;P&gt;// Fetch the invoices for the current page&lt;BR /&gt;invoices = Json.Document(Web.Contents(url, [&lt;BR /&gt;Headers = [&lt;BR /&gt;#"Content-Type"="application/x-www-form-urlencoded",&lt;BR /&gt;#"Authorization"="Bearer " &amp;amp; token&lt;BR /&gt;]&lt;BR /&gt;])),&lt;/P&gt;&lt;P&gt;// Extract the 'data' field from the fetched invoices&lt;BR /&gt;invoiceData = invoices[data]&lt;BR /&gt;in&lt;BR /&gt;invoiceData,&lt;/P&gt;&lt;P&gt;// Initialize an empty list to store all invoices&lt;BR /&gt;allInvoices = List.Combine(List.Generate(() =&amp;gt;&lt;BR /&gt;[page = pageNumber, invoices = fetchInvoices(pageNumber)],&lt;BR /&gt;each List.Count([invoices]) &amp;gt; 0,&lt;BR /&gt;each [&lt;BR /&gt;page = [page] + 1,&lt;BR /&gt;invoices = fetchInvoices([page])&lt;BR /&gt;],&lt;BR /&gt;each [invoices]&lt;BR /&gt;))&lt;BR /&gt;in&lt;BR /&gt;allInvoices&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jul 2023 18:41:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Help-with-API/m-p/3311183#M43315</guid>
      <dc:creator>SisterRay</dc:creator>
      <dc:date>2023-07-01T18:41:32Z</dc:date>
    </item>
  </channel>
</rss>

