cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
SimonJBrown
New Member

Pull data from a REST API which has Authentication

Hi

New to PowerBI so please forgive me if query does not make complete sense!

I have PowerBI Desktop and want to get date from a REST web service.

 

The issue I have is the web service requires an authentication first, before I can call the methods for data I want.

The product is Traverse.

 

So, to logon I first have to issue command like;

http://hostname/api/rest/command/login?myusername/MyPassword

 

This authenticates me and returns success if logged on, I see in POSTMAN that a cookie is created for session.

 

Once I have done that I can call upon its many methods to pull data out, these are the methods I need access to for PowerBI

e.g.

http://hostname/api/rest/command/sla.status?slaSerial=2022436&calculationPeriod=Day&startTime=201803...

to get me json back with report data I want to pull into PowerBI to then produce charts and such

 

What I cannot see is a method to call the second URL without the authentication. The Get Data from Web source does not seem to accomodate this type.

Is there a way to do this with the Advanced Editor?

 

Thanks in advance

 

2 REPLIES 2
Moderator v-yuezhe-msft
Moderator

Re: Pull data from a REST API which has Authentication

@SimonJBrown,

Please verify that if your web service supports "Basic" authentication or some headers such as subscription key, it is possible to use these authentication types in Advanced Editor.

There is a blog for your reference.
https://jessedotnet.com/2016/06/24/power-bi-connect-to-your-secure-api/

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
SimonJBrown
New Member

Re: Pull data from a REST API which has Authentication

I have posted query on Traverse community site but not had a response. From their developer guide it looks like the only option I have is the URL to logon as a pre step to the data URL request as described in opening post.

 

I may have to write a wrapper web service so I can send request through, do the URL authentication and request before returning data. Didnt want to do that as time consuming and additional overhead.

 

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors