cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
smpa01
Super User
Super User

Power BI REST API to return response in browser

@bcdobbs @d_gosbell 

If I host my data model in a premium capacity workspace, is it possible for me to run any endpoint/REST API to return the result of a DAX query in a browser, for example

something like

 

https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/EVALUATE VALUES(Org[Mgr])

 

I went through Announcing the public preview of Power BI REST API support for DAX Queries  and Datasets - Execute Queries and did not find anything.

I am simply trying to understand if there is a way for me to fetch the data (of the multidimensional data model) from the SSAS server outside of Power BI environment. If I can access the dataset externally (outside of Power BI), I can further process the data to my req (for example, developing visualization using other languages to display the viz in a browser and let my audience consume it through the browser).

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






New Animated Dashboard: Sales Calendar


1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User

So you cannot do a GET request like the example you posted, but the first link you posted shows how you can do a POST request to get back a JSON response. The only "extra" bit to be aware of is that you have authenticate against PowerBI to make sure that the user has access to the dataset. There is some example c# code for a console app linked in that article, but that should not be too hard to convert to an Azure function or something that you could run on heroku that would then either prompt the user to login or use their existing credentials if they are already logged in.

View solution in original post

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @smpa01 ,

 

Whether the advice given by @d_gosbell  has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.


Looking forward to your feedback.


Best Regards,
Henry

d_gosbell
Super User
Super User

So you cannot do a GET request like the example you posted, but the first link you posted shows how you can do a POST request to get back a JSON response. The only "extra" bit to be aware of is that you have authenticate against PowerBI to make sure that the user has access to the dataset. There is some example c# code for a console app linked in that article, but that should not be too hard to convert to an Azure function or something that you could run on heroku that would then either prompt the user to login or use their existing credentials if they are already logged in.

Helpful resources

Announcements
June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Kudoed Authors