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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
preetisb15
Frequent Visitor

Mquery error: 404

Hi all,

 

This is what I need to be able to do

I am trying to achive the below with an Mquery:

1. First I need to run to call a REST endpoint to start the export

   (modified link)

   https://xx.yy.io/report/export?filterType=jqlfilter&jqlFilterID=19216&columnsby=statusduration&calen...

 

 

2. running the above REST endpoint, the output will look something like the below 

   (modified link)

   https://tis.obss.io/rest/export/3kjhrqoi-asd-3rrd34-3rerwr34-94c797e9f590 

 

I need to run the post command output to get to the data table

 

 

I managed to get to the point of writing an Mquery (screen shot) that runs successfully the first time executed (weblinks provided are modified)

 

Screenshot 2020-06-19 at 09.32.30.png

 

However when refreshing the query, I get a 404 error: Web.Contents failed to get contents pointing to the sourcelink given in 'webdata.2'.

 

possible reasons that I could expect for this error is that I am missing some sort of loop that would require for checking the status of the export link..

 

Request generate data => status link

Loop

Request status (status link) => status, export link

exit loop when status == Succesful

Request download data (export link)

 

Any ideas how to include this in the query? 

 

 

 

 

5 REPLIES 5
camargos88
Community Champion
Community Champion

@preetisb15 ,

 

I would guess the url is wrong, try printing the returned url for the statusLink and check is it works without load, using the browser.



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Hi @camargos88 ,

 

I dont have any issues with the url, it works well

 

 

@preetisb15 ,

Are you able to query this new url:

 

statusLink1 & "/download" & "/?ApiKey

 

on the browser ?

 

Also, check this link: https://blog.crossjoin.co.uk/2016/08/09/handling-404-not-found-errors-with-web-contents-in-power-que...

 

You can handle the 404 error manually and get some responses from the header.

 



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Yes ! @camargos88 

 

I am able to use the link in the browser and download the csv output!  this is not the issue in my case

@preetisb15 ,

 

So you can try a recursive function to check if you have a return different from 404,

This link may help you: https://www.thebiccountant.com/2017/09/26/recursion-m-beginners/

 

Be aware you have 120 minutes to refresh it on the service, if it's more than that, you get an error.



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors