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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
olimilo
Responsive Resident
Responsive Resident

Trying to pull data from a web service to our dashboards but I only have the API details

I was given the following items (details redacted) but I'm not quite sure where to start with this. Can Power BI use an external API to pull data from a web service? If so, how can I use the details given to me below? Is it supposed to be some sort of connection string? I don't have any experience with Azure and only have very basic knowledge of SQL so I'm not quite sure where to start.

 

Is there anything else I have to ask our service partner when trying to connect to their servers for this?

 

PUT {sitename}

User-Agent: {application name goes here}

Accept: application/{xxxx}+json

Content-Type: application/json

Authorization: Bearer {token goes here}

1 ACCEPTED SOLUTION

Hi @olimilo ,

I thought you had that already (according to your first post)

This is sth that your API provider has to tell you. 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

I recommend that you converse with @ImkeF 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Hi @olimilo ,

you put the necessary parameters into the header like so: 

 

Web.Contents("YourURL", [Headers=[Authorization="Bearer xxxxxxxx", Accept="application/json".....]])

 

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

olimilo
Responsive Resident
Responsive Resident

Hi @Greg_Deckler 

Thank you!

 

Hi  @ImkeF ,

It's asking me for a UserAgent. I'm not sure what to enter in this field. It should be Power BI right?

 

Hi @olimilo ,

I thought you had that already (according to your first post)

This is sth that your API provider has to tell you. 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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