Power BI – Connect to your secure API

 

Power BI’s web portal and desktop application are slightly different, but this tutorial will work for both.
Getting API Data
1. Open up Power BI and select “Edit Queries”.
Image

2. Click “New Source” and select “Blank Query”.

Image

3. Next, select “Advanced Editor”.
4. In the editor, enter the API’s address and any header information needed for that api.
let
apiUrl = “
https://xxxxxxx/api/info“,
options = [Headers =[#”Subscription-Key”=”xxxxxxxxxxxxxxxxxxxxx”]],
result = Web.Contents(apiUrl , options)
in
result

5. After you add the Query, you will then need to “Connect”. In Power BI Desktop, a warning message pops up letting you know this. Click “Edit Credentials”

Image

6. The Access Web content pop-up will show a few different ways to set up you API credentials. For this example, we just needed to include a “Key” in the header. Since we already did that, all we have to do is press “Connect”.

Leave a Reply

Your email address will not be published. Required fields are marked *