Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Download Tool Errors (appreciate all help!)

elizabethmichaels91
8 - Asteroid

Hello community,

 

I am trying to push data in the form of a column to an API and download its data to a column.

 

I was told that there needs to be a convention in feeding the API the information but due to the nature of the tool, I'm not sure how to edit the tool to match what the API requires.

 

This is the code that is run natively on the API which returns the correct column:

curl -i "https://xXXXXXXXXXXXXx/xX/API" -X post -H "Content-type: application/json" -d'{"COLUMN NAME":"DATA"}'

 

here is the configuration that i set up for:

 

Text Input: APIURL ----> Download Tool

 

It runs into the following errors:

 

Downloaded Data Column:

<!DOCTYPE·HTML·PUBLIC·"-//W3C//DTD·HTML·3.2·Final//EN">¶
<title>500·Internal·Server·Error</title>¶
<h1>Internal·Server·Error</h1>¶
<p>The·server·encountered·an·internal·error·and·was·unable·to·complete·your·request.··Either·the·server·is·overloaded

 

 

Downloaded Headers Column: 

HTTP/1.0·500·INTERNAL·SERVER·ERROR¶
Content-Type:·text/html¶
Content-Length:·291¶
Server:·Werkzeug/0.11.10·Python/2.7.5¶
Date:·XXXXXX

 

Take a look at the attachment files for the configuration of the download:

 

It would also help if someone could explain how Alteryx outputs a certain command based on the selections made in the download tool as well!

 

Thanks again!

 

 

3 REPLIES 3
danielbrun2
ACE Emeritus
ACE Emeritus

Hi Elizabeth,

 

Great to see that you use the download tool. I think there is a couple of problems.

 

  1. "-H" in cURL corresponds to the header. This means that you will need "Content-type: application/json" in the header field. You can also deselect title for the header.
  2. Alteryx is creating one call for each row. From the description it seems that you would like to perform a Bulk action (1 single call). Is that right?
  3. The API expects the data to be JSON. You will therefore have to format it in that way before sending it.

Could you provide a bit more info about the API, documentation for example? Is it a public API?

 

Best,

Daniel

 

elizabethmichaels91
8 - Asteroid

Hi Daniel, thanks again for helping.

 

It's a private API.

 

No, I need to send it in one by one, i will be uploading a single batch with many many rows in said column.

 

Is tehre a fast way to change the format to Json using Alteryx quickly?

danielbrun2
ACE Emeritus
ACE Emeritus

Hi Elizabeth,

 

You are welcome. You could do something like in the attached example:

 

Best,

Daniel

Labels