<?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: Call a REST API multiple times using Power Query in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Call-a-REST-API-multiple-times-using-Power-Query/m-p/516124#M15936</link>
    <description>&lt;P&gt;Hi 2 all and sorry for my English!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have a question that has been torturing for 2 days already. I have a table MYTABLE with 2 columns (URL and Index)of the form:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;URL&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; &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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Index&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;jira.test.com/rest/api/2/issue/MYPROJECTKEYNAME-10/worklog&amp;nbsp; &amp;nbsp; 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;jira.test.com/rest/api/2/issue/MYPROJECTKEYNAME-11/worklog&amp;nbsp; &amp;nbsp; 1&lt;/SPAN&gt;&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1999&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this table I have 2000 records. My goal is to get the data stored in these URLs.&lt;/P&gt;&lt;P&gt;For this I use the following command:&lt;/P&gt;&lt;PRE&gt;#"MyNewTable"= Table.AddColumn(#"MYTABLE", "DataFromURLsColumn", each Json.Document(Web.Contents(#"MYTABLE"{[Index]}[URL])))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;, but this request is very difficult and takes a very long time. So I must wait approximately 20-30 minutes or more.&lt;/P&gt;&lt;P&gt;My questions is next:&lt;/P&gt;&lt;P&gt;1. Is there a faster way to get this data stored in the URL?&lt;BR /&gt;2. Perhaps there are some global or other settings in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Power BI?&lt;BR /&gt;3. Does this command work so slowly&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;due to&amp;nbsp;the number of queries&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to jira rest&amp;nbsp;api, or maybe because I'm adding a new calculated column to the table?&lt;BR /&gt;I will be very grateful for any help, thank you in advance!&lt;/P&gt;</description>
    <pubDate>Fri, 14 Sep 2018 12:36:33 GMT</pubDate>
    <dc:creator>Vitaliy</dc:creator>
    <dc:date>2018-09-14T12:36:33Z</dc:date>
    <item>
      <title>Call a REST API multiple times using Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Call-a-REST-API-multiple-times-using-Power-Query/m-p/17168#M220</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am loading a Data Model using Power Query via a RESTful API call returning JSON data so when you look at the code generated it's something like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let&lt;/P&gt;&lt;P&gt;&amp;nbsp;Source = Json.Document(Web.Contents("https:// MY API CALL").&lt;/P&gt;&lt;P&gt;in&lt;/P&gt;&lt;P&gt;&amp;nbsp;Source&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This dataset will then be imported into Power BI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However in order to get my complete dataset I need to call the API a number of times by changing values in the name/value pairs of the Querystring of the API's UR so the source should behave like this,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let&lt;/P&gt;&lt;P&gt;&amp;nbsp;Source = Json.Document(Web.Contents("https:// MY API CALL 1").&lt;/P&gt;&lt;P&gt;&amp;nbsp;Source = Json.Document(Web.Contents("https:// MY API CALL 2").&lt;/P&gt;&lt;P&gt;&amp;nbsp;Source = Json.Document(Web.Contents("https:// MY API CALL 3").&lt;/P&gt;&lt;P&gt;in&lt;/P&gt;&lt;P&gt;&amp;nbsp;Source&lt;/P&gt;&lt;P&gt;Has anybody been able to get this working please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The vendor has explained it's not possible to import all the data in one API request so I'm having to call it multiple times!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help or advice would be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2016 15:55:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Call-a-REST-API-multiple-times-using-Power-Query/m-p/17168#M220</guid>
      <dc:creator>berta2b</dc:creator>
      <dc:date>2016-02-02T15:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Call a REST API multiple times using Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Call-a-REST-API-multiple-times-using-Power-Query/m-p/17175#M221</link>
      <description>&lt;P&gt;You can create a function from your query using this syntax:&lt;/P&gt;&lt;P&gt;let functionName = (param1 as datatype) =&amp;gt;&lt;/P&gt;&lt;P&gt;let&lt;/P&gt;&lt;P&gt;&amp;nbsp;Source = Json.Document(Web.Contents("https:// MY API CALL" &amp;amp; param1).&lt;/P&gt;&lt;P&gt;in&lt;/P&gt;&lt;P&gt;&amp;nbsp;Source&lt;/P&gt;&lt;P&gt;in functionName&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can then create a table with your parameters and then add a custom column to your table that calls/invokes your function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can see an example here&amp;nbsp;&lt;A href="http://datachix.com/2014/05/22/power-query-functions-some-scenarios/" target="_blank"&gt;http://datachix.com/2014/05/22/power-query-functions-some-scenarios/&lt;/A&gt; and here&amp;nbsp;&lt;A href="http://satalyst.com/power-query-creating-a-parameterized-function-in-m/" target="_blank"&gt;http://satalyst.com/power-query-creating-a-parameterized-function-in-m/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2016 16:20:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Call-a-REST-API-multiple-times-using-Power-Query/m-p/17175#M221</guid>
      <dc:creator>bidgeir</dc:creator>
      <dc:date>2016-02-02T16:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Call a REST API multiple times using Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Call-a-REST-API-multiple-times-using-Power-Query/m-p/516124#M15936</link>
      <description>&lt;P&gt;Hi 2 all and sorry for my English!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have a question that has been torturing for 2 days already. I have a table MYTABLE with 2 columns (URL and Index)of the form:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;URL&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; &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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Index&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;jira.test.com/rest/api/2/issue/MYPROJECTKEYNAME-10/worklog&amp;nbsp; &amp;nbsp; 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;jira.test.com/rest/api/2/issue/MYPROJECTKEYNAME-11/worklog&amp;nbsp; &amp;nbsp; 1&lt;/SPAN&gt;&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; &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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1999&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this table I have 2000 records. My goal is to get the data stored in these URLs.&lt;/P&gt;&lt;P&gt;For this I use the following command:&lt;/P&gt;&lt;PRE&gt;#"MyNewTable"= Table.AddColumn(#"MYTABLE", "DataFromURLsColumn", each Json.Document(Web.Contents(#"MYTABLE"{[Index]}[URL])))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;, but this request is very difficult and takes a very long time. So I must wait approximately 20-30 minutes or more.&lt;/P&gt;&lt;P&gt;My questions is next:&lt;/P&gt;&lt;P&gt;1. Is there a faster way to get this data stored in the URL?&lt;BR /&gt;2. Perhaps there are some global or other settings in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Power BI?&lt;BR /&gt;3. Does this command work so slowly&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;due to&amp;nbsp;the number of queries&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to jira rest&amp;nbsp;api, or maybe because I'm adding a new calculated column to the table?&lt;BR /&gt;I will be very grateful for any help, thank you in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 12:36:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Call-a-REST-API-multiple-times-using-Power-Query/m-p/516124#M15936</guid>
      <dc:creator>Vitaliy</dc:creator>
      <dc:date>2018-09-14T12:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Call a REST API multiple times using Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Call-a-REST-API-multiple-times-using-Power-Query/m-p/760344#M20265</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1654"&gt;@bidgeir&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/4990"&gt;@berta2b&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for this solution.&lt;/P&gt;&lt;P&gt;I got it working feeding off a REST API service. Then I wanted it to be scheduled on Power BI Service. But got this error:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Query contains unsupported function. Function name:&lt;/EM&gt; Web.Contents&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used 2 parameters:&amp;nbsp; &lt;EM&gt;(start as text, count as text) =&amp;gt;&lt;/EM&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I applied this against a list:&amp;nbsp; &lt;EM&gt;= List.Generate(()=&amp;gt;0, each _ &amp;lt; 67000, each _ + 1000)&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;In a new query i start a custom function with Column1 = the List function and Column2 = 1000. After that I add the web-query which has the start and count params.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result should be it gets 1000 records at a time, otherwise it fails/time-out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me with the web-query refresh on PBI Service? (I am using basic auth with user and pass)&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 11:59:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Call-a-REST-API-multiple-times-using-Power-Query/m-p/760344#M20265</guid>
      <dc:creator>jan_k123</dc:creator>
      <dc:date>2019-08-07T11:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: Call a REST API multiple times using Power Query</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Call-a-REST-API-multiple-times-using-Power-Query/m-p/761270#M20285</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/160140"&gt;@jan_k123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure this help. I've faced the similar issue, and got worked using &lt;STRONG&gt;Gateway and Skip connection&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I published the entier blog, you can read it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Power-BI-Gateway-Monitoring-amp-Administrating-Part-1/ba-p/750509" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Power-BI-Gateway-Monitoring-amp-Administrating-Part-1/ba-p/750509&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Power-BI-Gateway-Monitoring-amp-Administrating-Part-2/ba-p/750765" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Power-BI-Gateway-Monitoring-amp-Administrating-Part-2/ba-p/750765&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2019 05:56:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Call-a-REST-API-multiple-times-using-Power-Query/m-p/761270#M20285</guid>
      <dc:creator>Jayendran</dc:creator>
      <dc:date>2019-08-08T05:56:55Z</dc:date>
    </item>
  </channel>
</rss>

