cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
powerbi1
New Member

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 4
ImkeF
Super User II
Super User II

Using Table.View can supress multiple calls: Chris Webb's BI Blog: Speed Up Data Refresh Performance In Power BI Desktop Using Table.View Chris W...

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

v-yuezhe-msft
Microsoft
Microsoft

@powerbi1,

I have consulted this issue internally, and I will post back once I get updates.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks Lydia, i will be waiting your response.

 

Any updates on this?

Thanks,

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Kudoed Authors