Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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/ |
User | Count |
---|---|
24 | |
21 | |
11 | |
11 | |
10 |
User | Count |
---|---|
50 | |
31 | |
20 | |
18 | |
15 |