Forum Discussion
gilbertendaya
5 years agoHelper IV
Get data using API post
Hello Guys, Please advise on how to implement this in Power BI desktop? Thank you.
PhilipTreacy
5 years agoSuper User
To make a POST request in PBI/PQ you include Content in the request. A typical POST request would look something like this
let
URL = "https://API.com/XXXX",
TheContent = "xxx",
Options =
[
Headers = [ #"Content-Type"="application/json" ], #"Accept-Encoding"="gzip, deflate", Content = Text.ToBinary(TheContent)
],
Result = Web.Contents(URL, Options)
in
Result
You've said the connection requires no auth so when PQ/PBI asks you how to connect, you need to choose Anonymous connection.
That said, the Postman screenshot shows an X-Auth-Token so it looks like there is some kind of authorization going on.
Without more info from you on the API and what exactly you are trying to do,I can't bemore specific with my answer.
Regards
Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.