Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I have tried a number of scenarios for posting data, but I have come up with nothing. I am trying to write a power query that posts data to a REST API (https://ausreman.tidywork.com/api/materials), it posts data for materials. The current query I have is:
= Json.Document(Web.Contents("https://ausreman.tidywork.com/api/materials",[Headers=
[#"Authorization"="Basic ZZZZZZZZZZZZZZZZZ",#"Content-Type"="application/json"],
Content=Json.FromValue({[projectId="65b6d1fe-ec2e-47c3-9c92-2aad8fdd1d26",userId="67220adb-d5cb-4667-a3ce-ebe3d6248334",materialDateUtc="2015-09-14T07:11:00",materialDate="2015-09-14T17:11:00",materialId="00000000-0000-0000-0000-000000000000",materialLocationId="1aeb9552-a3e9-4804-a7b2-641b290dac8d",materialItemCode="1H3338",materialItemId="f9be8264-81f0-4ae2-a12b-569b3e05d034",costCurrencyId="17709522-6b2e-4b01-9cdf-bb7eb0a43c52",chargeCurrencyId="17709522-6b2e-4b01-9cdf-bb7eb0a43c52",taskId="b2ffc2cf-326a-fc91-eb40-c4ddb4147a35",state="Approved",usageQuantity=1,quantity=1,cost=0.21,charge=0.25]})]), 1252)The only thoughts I had was that it had something along the lines of the size of the data being post. Please help me remove this frustration.
this site wants authorization with username and password. seems like basic authorization is not applicable in this site.
Also see if old solution works:
Solved: DataSource.Error: Web.Contents failed to get conte... - Microsoft Fabric Community
Solved: [DataSource.Error] Web.Contents failed to get cont... - Microsoft Fabric Community
Solved: DataSource.Error: Web.Contents failed to get conte... - Microsoft Fabric Community
Solved: DataSource.Error : Web.Contents failed to get cont... - Microsoft Fabric Community
Solved: Web.Contents failed to get contents from (405): - Microsoft Fabric Community
Proud to be a Super User!
I tried applying basic authentication through power query, but I get the error:
DataSource.Error: Web.Contents with the Content option is only supported when connecting anonymously.
See this article:
https://community.fabric.microsoft.com/t5/Desktop/Web-Contents-with-the-Content-option-is-only-suppo...
Hi @drmdodd ,
You need to set up the privacy level of your source under data source setting as anonymous. And also make sure update your token because tokens come with a time limit.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 5 | |
| 5 | |
| 4 |