Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.