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
Daveed1973
Advocate II
Advocate II

How to connect to a service API to Power BI

I have been given API documentation to connect to one of the services we use with an API. I have managed to do this using the command prompt on Windows and CURL commands and can see the data that I need to.

 

To connect though I have to authenticate first and then use a token that lasts only an hour to query the data.

 

Ideally I need to be able to bring this data into Power BI so that we can present it, but have no idea how I could connect Power BI to the service using the same sort of CURL commands.

 

For example, this is the CURL command I am using to request the token,..

 

curl --request POST --url https://xxxxxxxx.xxxxxxxx --header "Content-Type: application/json" --header "Accept: */*" --data "{\"username\":\"xxxxxxxxxxxxxxx\",\"password\":\"xxxxxxxxxxxxxx\"}"

This then returns the token which I then add to the other CURL commands to interogate the data.

 

Are there any resources out there which will help me turn what I have above into something that allows Power BI to interogate the data?

 

Haven't a clue where to start, so any help would be greatly appreciated.

1 REPLY 1
BrianMiller
Regular Visitor

This may not be the most elegant solution but have you considered using the API to load the data into an intermediate source like a database table or spreadsheet and reading it into power bI from there?

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.