Hi,
I am trying to use the Download Tool to POST a json payload to a REST endpoint.
The tool works unless there is a double quote or & in the json payload in which case the endpoint returns "Unable to parse the JSON" response. I have tried escaping the double quote but it still does not work.
example of the payload is :
{ "note": { "description": "this is a test with chars & \" present", "show_to_requester": false, "mark_first_response": false, "add_to_linked_requests": false }}
I have used Postman to perform the POST with exactly the same payload and the call works as expected without an error.
If i completely remove the characters then the POST works.
Has anyone else experienced this or found a way to make it work.
thanks in advance
hey @DY1
No worries - sorry it hasn't resolved your issue so far - i was just wanting to try the json build as a double check for the escape characters.
This is a bit of an awkward one, especially with not having access to the API. What is the error message exactly? If the request is being made - but you are receiving the error from the site - you could try using fiddler to see the request (and compare against postman request)
Hope this helps,
TheOC
@TheOC the response message is "Unable to parse the JSON". As you say, very hard to be able to diagnose/test theories without access. I have tried fiddler and cannot really see whats going wrong to be honest.
thanks for taking the time.
Just came across this topic as I was facing the same issues that the REST API endpoint could not parse the JSON format. What solved it for me was changing the payload type. In the payload tab, I chose the option "Take Query String/Body from Field" and then selected the field containing my the compact formatted JSON string
I am having a related issue. Works in Postman but not Alteryx. I pass (date range) filter parameters on the payload tab but they are ignored and returns the default latest 15 mins of records.
For what it worth, I had the exact same problem, that's why I came here.
In postman, my json body is posted as "raw",
So to do the same in the Download Tool, well - then this worked for me ;)
EDIT:
Forgot to mention, that I also set the headers to this:
Thanks @Verakso Mine worked after adding "Accept" to Header.