Forum Discussion
gbros
1 year agoNew Member
Power BI - Need data from a POST Api
I am trying to get data forma an API with <post method from Power query but I cannot do it, and I don't find the error...here is my code: There is some parts commented because I think the p...
- 1 year ago
Please follow the documentation. Use a body payload. https://learn.microsoft.com/en-us/powerquery-m/web-contents#example-2
- 1 year ago
Yes. You should try running the following two examples (check the "json" fields in the result to see if your program is correct). I believe you will truly understand how to post data.
let resp = Web.Contents( "https://httpbin.org", [ RelativePath = "post", Content = Json.FromValue([A = 1, B = "2025/01/02"]) ] ), data = Json.Document(resp) in datalet resp = Web.Contents( "https://httpbin.org", [ RelativePath = "post", Content = Text.ToBinary("{""A"": 1, ""B"": ""2025/01/02""}", TextEncoding.Utf8) ] ), data = Json.Document(resp) in data
lbendlin
1 year agoSuper User
Please follow the documentation. Use a body payload. https://learn.microsoft.com/en-us/powerquery-m/web-contents#example-2