Forum Discussion

powerbi1's avatar
powerbi1
New Member
8 years ago

Multiple Calls When Consuming Rest APIs

I have a Web Data Source that is using REST calls to pull data and everytime the datasource is refreshed (both from power bi desktop and scheduled refresh on a worksapce) it makes multiple GET API calls on the web server even though i only doing the resfhesh once.

 

The source that i am usign on the query looks like the below:

Source = Xml.Tables(Web.Contents("https://api_url"))

The above although executed only once it creates at least 2 calls, have seen some rare instances that is 3 calls.

 

I alslo tried consuming the API using JSON and it seems that using the below produces only one call to the API

Source = Json.Document(Web.Contents("https://api_url"))

 

I am inclined to switch all my API calls to use JSON.

 

Does anyone know what the problem may be? Is there a bug with the Xml.Tables() call? Am i missing something?

 

Thank you!

4 Replies