The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
SOLUTION
Separate base URL from relative path when using Web.Contents
---------------------------------------------------------------------------
I have a dataflow that fetches data from a REST POST API using an access token for authentication. I can fetch data when I'm editing the dataflow, but when I save and close it and try to update it I get this error message, which honestly doesn't give me much:
Error: Request ID: b23d1f30-8b26-7f28-6431-d5d33ec7178b Activity ID: 39a5fc42-209f-48e5-adb6-cbf842c7e988
Here is the relevant part of the M:
Source = Json.Document(
Web.Contents("https://api.simplesat.io/api/v1/responses/search",
[
Headers=[
#"X-Simplesat-Token"=#"Simplesat Token",
#"Content-Type"="application/json",
#"Accept-Encoding"="gzip,deflate"
],
Content=Text.ToBinary("")
]
)
)
Solved! Go to Solution.
Hi @Anonymous ,
Based on the information you have provided, the data stream appears to be able to successfully fetch data from the REST POST API while in edit mode, but encounters an error when attempting to refresh after saving and closing. There are several steps you can take to troubleshoot and possibly resolve this issue:
If you are still experiencing problems after trying these steps, please provide more detailed information about the following:
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Based on the information you have provided, the data stream appears to be able to successfully fetch data from the REST POST API while in edit mode, but encounters an error when attempting to refresh after saving and closing. There are several steps you can take to troubleshoot and possibly resolve this issue:
If you are still experiencing problems after trying these steps, please provide more detailed information about the following:
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I tested creating a report with the same query, published it to a workspace and updated the dataset. That worked fine.
The datasets have the parameter option in the settings, which isn't an available setting in a dataflow. I guess that's where the issue lies.. Any workaround?
Hi Ada
Thank you for chipping in on this.
If you look at the link above Simplesat says you should add the token as a parameter (in the dataset), but that is not possible to do in a dataflow.
I was able to fetch some more info about the update:
The credentials provided for the Web source are invalid. (Source at https://api.simplesat.io/api/v1/responses/search.)
Aktivitets-ID: | 70954bee-4d5c-4b6d-93df-3585a17ca060 |
Forespørsels-ID: | 089d5b6e-227a-c02d-e08b-28f72bd66378 |
Statuskode: | 400 |
Klokkeslett: | Thu Mar 14 2024 10:17:14 GMT+0100 (sentraleuropeisk normaltid) |
Tjenesteversjon: | 13.0.22826.64 |
Klientversjon: | 2403.1.18388-train |
Klynge-URI: | https://wabi-north-europe-i-primary-redirect.analysis.windows.net/ |
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
49 | |
21 | |
12 | |
11 | |
10 |
User | Count |
---|---|
118 | |
32 | |
28 | |
21 | |
20 |