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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
celestineneo
Frequent Visitor

Unable to connect to web API

Hi All,

 

I'm relatively new to this, and have tried searching high and low for answers but i'm not able to find one. Would appreciate any form of help.

 

I've been trying to connect Power BI to this web API through pagination, and have not been able to do so. I've successfully tested on Postman, and have been able to get the appropriate results. 

 

I've attached some screenshots of the issue, and hope to hear from some experts if I am doing something incorrectly, or need to do any steps prior to this. 

 

Testing on Postman (Info written in the URL, and Authorization using Bearer):

 

2022-09-20_23h55_12.png

 

Results of the query on Postman:

 

2022-09-20_23h56_15.png

 

Testing on Power BI (Same URL, Authorization is the same bearer code):

 

2022-09-20_23h58_15.png

 

Results on Power BI indicating the there are incorrect credentials. I used Anonymous as I am using bearer authorization. Please correct me here if my understanding is incorrect: 

 

2022-09-20_23h58_58.png

 

Trying again WITHOUT page number:

 

2022-09-21_00h00_18.png

 

Successful results on Power BI (Receiving 5 records from page 1):

 

2022-09-21_00h01_43.png

 

Please help me out on how one can retrieve the other pages! Also, I have watched the available videos on YouTube.. does not work for me. 

 

Thanks in advance!

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @celestineneo 

 

I usually use the solution introduced in this blog (Scrape Data from Multiple Web Pages with Power Query) to get data from multiple web pages. You can transform the successful query into a custom function with a page number parameter. Before that I recommend that you edit the URL in Advanced Editor to do a test to check whether you can get data from other pages by only modifying the URL in the successful query. 

 

In below screen, select the base url without page number param in "Select which level to apply these settings to" dropdown box. Keep using Anonymous type. 

vjingzhang_0-1663730260722.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Hi @v-jingzhang,

 

Thanks for your reply. Unfortunately, the video does not help as I am stuck at the step before that. 

 

 I think before I am able to extract all content, I must be able to query at least one page (other than page 1)..

 

I just find it strange that I am able to run the URL (with page number) on Postman, but not able to run it on Power BI (It keeps saying they cant authenticate with the credentials provided)...

 

Please let me know if you have any other insight! Greatly appreciate it. 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors