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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
wkolcz
Frequent Visitor

Failed to update data source credentials: Web.Contents failed to get contents from... (Custom API)

I know this topic has a thousand of variations on the forum but I can't seem to find any that address my issue. I created an API online to pull data for my reports. In the desktop I am able to connect to the data and perform a refresh without issue but when I publish it to my online account (currently Permium) I get the Failed to update data source credentials: Web.Contents failed to get contents from 'https://mycoolapi.com/v1/getdata' (404): Not Found

 

When setting up my API I used:

 

Get Data > Web > Advanced

For URL parts I entered https://mycoolapi.com/v1/getdata

For HTTP request headers parameters I entered 'Auth' and a key

Then I set the access to Anonymous

 

All worked fine and I was able to pull in my data from my api but when I published it and went to Datasets > My Dataset > Settings I see Your data source can't be refreshed because the credentials are invalid. Please update your credentials and try again. So I clicked on Edit Credentials and left it as anonymous and tried all 4 privacy levels and it keeps giving me an error. AND the refresh still works on my desktop version.

 

What am I missing? Why does it work on the desktop and not on the 'cloud' service. I do not want to have to continously upload new data to update my reports. I have installed a gateway for my personal account, which allowed my to access the data directly from the database but I cannot on my business machine due to IT restrictions so I switched it to an API approach but still having issues.

1 ACCEPTED SOLUTION
ibarrau
Super User
Super User

Hi. Before I continue I want to say that the best practice will always be getting data direct from source. Try explaining your company that it's importante to get data from there and not from API.

Now, it looks like you have built the API. That might mean the API can only be requested from your local network. That's why you can get data from desktop but you can't get it from Service. Even though Web.Content doesn't need gateway, you might need you in case your API only responds in local network.

Just to recap. 404 means the address can't be reach. It can be because it's wrong like you have typed it wrong or because you can't get there.

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

View solution in original post

4 REPLIES 4
Mmahachi
Advocate I
Advocate I

Did the gateway work to resolve this i have the same issue using the zenqms api

ibarrau
Super User
Super User

Hi. Before I continue I want to say that the best practice will always be getting data direct from source. Try explaining your company that it's importante to get data from there and not from API.

Now, it looks like you have built the API. That might mean the API can only be requested from your local network. That's why you can get data from desktop but you can't get it from Service. Even though Web.Content doesn't need gateway, you might need you in case your API only responds in local network.

Just to recap. 404 means the address can't be reach. It can be because it's wrong like you have typed it wrong or because you can't get there.

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

B_F
Regular Visitor

Hi @ibarrau,

I am facing similar issue. In your experience what do you think is a possible solution for this issue? Is to create a Gateway for the API? How do I do that?

Thanks!

Hi,

 

I am facing similar issue, how can I set gateway in order to fix this ? 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors