Hello,
I'm looking to build a post request in Alteryx download tool. The input data should be in JSON format.
This is the API I'm using: https://developer.tomtom.com/batch-search-api/documentation/synchronous-batch
I'd like to send a json as the body for the post request, but I'm not doing it correctly. Please guide me and let me know where I can learn more about how to create post requests in Alteryx.
Currently, I have this as my json. It's just a string inside of a the column "field like this:
field |
{ "batchItems": [ { "query": "/search/lodz.json?limit=10&idxSet=POI,PAD,Str,Xstr,Geo,Addr" }, { "query": "/search/wroclaw.json?limit=10&idxSet=POI,PAD,Str,Xstr,Geo,Addr" }, { "query": "/search/berlin.json?limit=10&idxSet=POI,PAD,Str,Xstr,Geo,Addr" } ] } |
Solved! Go to Solution.
you filled this item in the header
Required headers
Description
Content-Type
Specifies the MIME type of the body of the request.
Values: application/xml and application/json
in your case it's just json
Can you please clarify? I don't understand.
Did you complete this item?
In the documentation it asks as required.
If the body is json fill it with json if it is xml fill it with xml
and i believe you have the api key
I see my issue was that I didn't fill out the headers section with Name: Content-type Value: application/json. I finally understand, thank you.
Before I was getting a 400 error and the error description said Content-Type application/x-www-form-urlencoded; charset=UTF-8 is not supported.
Now after setting the content type to application/json I get a 200 status.