Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am currently trying to achieve the below with M query - is this doable? any suggestions are welcome.. Thanks in advance
This is what I need to be able to do
1. First I need to run to call a REST endpoint to start the export
2. running the above REST endpoint, the output will look something like the below
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
Hi again
A bit of progress with the Mquerying. this is how my Mquery looks like
When executing the first time, I get the expected results.
However when refreshing the query, I get a 404 error:
Web.Contents failed to get contents pointing to the sourcelink given in 'webdata.2' - any suggestions how to deal with this?
Many thanks in advance
Assuming that your REST service answers with JSON, you would do something like
let
Source = Json.Document(Web.Contents("https://api.powerbi.com/v1.0/myorg/gateways/" & GatewayId & "/datasources", [Headers=[Authorization=Authorization]])),
It becomes tricky when your request fails or when it succeeds with a malformed response (looking at YOU, MICROSOFT!)
let
JsonData = try Json.Document(Web.Contents("https://api.powerbi.com/v1.0/myorg/gateways/" & GatewayId & "/datasources/" & ConnectionId & "/status", [Headers=[Authorization=Authorization]])),
value = if JsonData[Error][Message]="We reached the end of the buffer." then "True" else "False"
in
value
In this example "We reached the end of the buffer" is caused by a blank 200 return, and is actually the desired outcome.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.