Forum Discussion

smpa01's avatar
smpa01
Community Champion
4 years ago
Solved

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 someth...
  • d_gosbell's avatar
    4 years ago

    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.