Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Post request in Alteryx download tool

fiddycodes
7 - Meteor

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 thissnip.PNG

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" }
]
}
7 REPLIES 7
geraldo
13 - Pulsar

@fiddycodes 

 


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

fiddycodes
7 - Meteor

Can you please clarify? I don't understand.

fiddycodes
7 - Meteor
geraldo
13 - Pulsar

@fiddycodes 

 


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

 

geraldo_0-1686602866693.png

 

fiddycodes
7 - Meteor

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. 

geraldo
13 - Pulsar

@fiddycodes 

 


What message you will be receiving in DownloadHeaders

fiddycodes
7 - Meteor

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. 

Labels