Forum Discussion
Duftnich06
3 years agoRegular Visitor
REST API POST Request works in Postman, Fails in Power Query
I have an REST API that when I send a POST request via Postman, it works successfully, but refuses to work when sending via Power Query, M Code below (sensitive details omitted): let
u...
- 3 years ago
Hi Duftnich06
without the curly bracket like so:
Json.FromValue([searchID="customsearch_active_customers"])
ImkeF
3 years agoCommunity Champion
Not sure, but what you pass to the Json.FromValue-function here:
Json.FromValue({[searchID="customsearch_active_customers"]})
is a record within a list.
While in your sample from postman:
--data '{
"searchID": "customsearch_active_customers"
}'
you seem to be passing a simple record into the "data" parameter (if that's json). So definitely different.
Duftnich06
3 years agoRegular Visitor
Ahhh ImkeF
Thanks for the observation. So, what would the syntax be to pass it as a record?