Forum Discussion
Multiple API calls going to the Service
Hello,
I have Power BI Query which has M Code to make a single API call. But when the query is monitored in Fiddler I see there are 2 API calls made.
I saw a similar thing in Power Query and Power Pivot too. Is it done once for ETL and once for loading into the data model? How can I limit it to make only one call as the API to which the call is made not only gets but posts data on the server.
Any pointers appreciated.
Thank You,
Harisha
4 Replies
- v-micsh-msftMicrosoft Employee
Hi hmokkapati,
Which API call that you have in the M code, would it be available to share some information about the API, and the Fiddler trace here?
I suspect this should be more specific with the API side. Some API would need verification first before getting the data.
In addition, I will perform some tests and see if I could find any helpful inforamtion.
Regards
- hmokkapatiHelper II
Hello Michael,
Thanks for your reply.
Unfortuantely cannot share the API details. Its internal.
But what I observed is when I choose to "Load it to data model" thats when it makes 2 calls, otherwise when its loaded to sheet/connection without loading to data model its called only once.
Thank You,
Harisha
- v-micsh-msftMicrosoft Employee
Hi hmokkapati,
If the second call is made after clicking "load" or "edit" in the Get Data Wizard, then I don't think currently there is a way available to avoid it.
We may consider to make the API query into a function, so the next time when a new query needed, we could just enter the Parameter instead of re-writing the Query again.
Check the blog below and see if this would be helpful:
Querying the VSTS Work Items API directly from Power BI
Regards