how to connect my web api wtih Power BI Reports? - powerbi

I have a web API to deliver required data sources for my reports. How can I connect my web API with Power BI. I gone through Rest API. But I am missing the complete flow.

Go to Home > Edit Queries > Advance Editor. Here is some Power Query code to query issue a GET request to an API endpoint.
let
Source = Json.Document(Web.Contents("http://mywebapi"))
in
Source
More information here: https://msdn.microsoft.com/en-us/library/mt260892.aspx
and here: https://blog.crossjoin.co.uk/2014/03/26/working-with-web-services-in-power-query/

Related

Can PowerBI service API return paginated reports similar to SSRS Report Server with a single license on an Azure App registration?

I haven't worked with Power BI's paginated reports but I'm trying to migrate from SQL Server to Azure SQL. Getting Power BI per-user licenses just for users to be able to generate a report PDF is prohibitively expensive for us.
Is it possible to use Power BI service API in a similar way to SSRS Report Server where you just make a request to generate the report and return the result?
We don't need to embed the paginated reports... just call the service API with the specified params and return the generated report (like SSRS Report Server).
Really hoping to use a single Premium license for the Azure Active Directory App Service registration to avoid needing to have a per-user license for every user that just needs to click a button and generate an invoice.
Essentially this, but with Power BI Paginated Reports: https://learn.microsoft.com/en-us/sql/reporting-services/export-a-report-using-url-access?view=sql-server-ver16
I'm asking just to see if I'm wasting my time by digging further into this. Thanks in advance!

Connect Web API as a data source to power bi using authentication

I have azure web api app with number of web apis of type post/get to get data. these apis are having basic authentication (bearer token)
I want to use 2-3 APIs as a data source in power bi, so that I can use these APIs JSON response as a table.
In Power BI Desttop > Get Data > Web > add API URL with sample GET API method name, will work but then it is asking for authentication.
If I tried to put API Key, then it is saying: A web API key can only be specified when a web API key name is provided.
How to connect web api using authentication in power bi as a data source.
PowerBI web seems to currently have little or no support for connecting to data via webapi, or web queries generally.
PowerBI Desktop allows you to get data from the web. I have been able to access data from webapis managed by Azure API Management in two different ways:
Use Advanced rather than Basic in the From Web dialog box. Put the webapi query in the url, but add a header with name Ocp-Apim-Subscription-Key and put in as value the value of the api key.
Alternatively, instead of putting the api key in the header, with APIs managed by Azure API management, it seems you can add them to as a parameter to the apiquery, subscription-key=PutYourApiKey here.
However, I have found that although you can publish your data source or report to an online workspace, PowerBI online will give an error ("credentials not recognized" or similar) when you try and refresh the data! So as mentioned above, PowerBI online seems currently (Nov 2020) useless for connecting to WebApi data.

PowerBI Secure Embed on webpage and connect powerbi from backend

Hi I'm Using PowerBI Pro version. I have 10 clients and created all their dashboards on my single PowerBI account. I have custom login page where each client can login to their private space and see their dashboard and here I have pasted the secure embed code generated from PowerBI.
It is secure coz it asks to login to powerbi but I cant give my PowerBI account credentials to the client, If I do they is a possibility they can go to PowerBI login page and login using my credentials and see the other 9 clients dashboards and reports.
Is there any way to connect powerbi from code so i can login from my code itself and they can only see the dashboard of their own?
Yes, you need to embed these dashboards and reports into your application, using app owns data scenario.
How to do this is asked many times. See for example Is there any way to embed power bi reports and dashboards in vb.net or C# desktop application with sql server 2008 database?

Can i generate dashboards through Power BI and publish it directly to clients website?

I am newbie to web technology ,so i am not able to get the steps for doing this.
I will have data fetched from data base and do some report generation and dashboarding in power BI.
I need to integrate the dashboards and reports on weekly basis to clients website.
Do i need to generate apis or some other alternatives?
There is the Publish to web option. You can copy either a url to your report or the html code you can then embed wherever you want. You can find Publish to web in the report menu. If it is not there, ask your global admin to activate it in settings.

Power BI embedded - Publishing to Azure Workspace - Issue

As said in many reference link, in case of embedding the power bi to a application where we are going to build a secure website, we need to embed the Power BI report by publishing the power bi report to Azure Workspace right.
In that case , for registering the power bi report in Azure AD we followed the steps specified in the below link
https://azure.microsoft.com/en-in/documentation/articles/power-bi-embedded-iframe/
While trying to import the .pbix file using REST API by using the POST request to api.powerbi.com, we were receiving 403 error. Hence we were not able to proceed further with the registeration/upload of PBIX file using Import API.
Also, for standalone or anonymous public embedding website we can go with Power BI Publish to Web option, using this we can get the embed code for the power bi report, which can be embedded into the web page. In case of standalone reports we can use this option to embed the power bi report on to our application, but since in our requirement we need to filter the data based on the user selection on the custom web page, we have to go with option 1 i.e. with publishing the report to AAD (Azure AD). Since we are facing authentication issue, we are unable to proceed with the process further.
Once the report is being publish we havethought of using either Power BI JavaScript or Angular JS API to pass the filter data from custom filter pane to the power BI as shown in the demo site.