Alteryx Designer Desktop Discussions

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

API request, do I need to make a request using multiple parts?

Roche
8 - Asteroid

Hi everyone, 

 

I am new to making API requests and have tried to make a few requests for new endusers, i.e. using adress information etc,  but it was unsuccessful.  The request returned an output with no data. 

Roche_0-1652078914294.pngRoche_1-1652078945695.png

The current headers are subcategories of a different categories, e.g.  customer_data, address_data, organization_data.  I did not add these categories as an extra header, and understand thus far that the extra header can not be naturally created in Alteryx, since it will display properly only in for example a pdf output.  

What I would like to know is, in the download tool, if I should make the API request in different parts, i.e. part 1 the customer data, part 2 the organization data, part 3 the address data etc?

 

Thank you for helping!  

 

Rouche

7 REPLIES 7
FrederikE
13 - Pulsar

If you are not sure, add the URL into the Browser. What you can see there is what Alteryx will get as well. This should be depended on the API itself. 

Roche
8 - Asteroid

Hi Frederik, thank you.  Looks like the addresses do not work.

Roche
8 - Asteroid

Still have the same question about the 3 parts.  I attach an example of what the headers look like in xlsx format.  Here you will see that my data is in 3 parts.  I also find information on the APIs on this site and the data is entered differently here. 

https://community.alteryx.com/t5/Alteryx-Promote-Knowledge-Base/Promote-Rest-API-Call/ta-p/343890

 

Roche_0-1652087067551.png

After the download tool I use a json parse tool.

Roche_1-1652087224118.png

Thank you, 

 

Rouche

 

 

apathetichell
18 - Pollux

Your download tool will pull your payload in whatever format your API produces (json/xml/csv/etc) - but it it will be ONE field for your entire pull. You then have to pivot/extract your values in Alteryx. So the short is - your values will come in - but they won't automatically fit the schema that you want.

 

If you want to see what Alteryx is pulling use a CURL command with the same configuration.

Roche
8 - Asteroid

Thank you, this is very helpful.  I have one other question - have done a few  searches to determine how I will enter the data in the data field and want to verify if the format of the string field is correct.  The format in which I entered the data is currently

 

{"Cust_Data_In": {"UserId": "", "ActionCode": "CREATE", "Partner_ID": "", "Partner_Type": "0002", "Industry": "COMM"}, "Org_Data_In": {"SalesOrg": "5500", "INCOTerm": "FOB", "Ship_Cond": "01"}, "Address_In": {"Firm": "Incredible Connection", "Address1": "15 Main Road", "House_Num": "15", "Address2": "Walmer", "Address3": "", "Address4": "", "Locality": "", "City": "Gqeberha", "PostCode": "6065", "Region": "Eastern Cape", "Country": "SA", "ZWG_VAL":"", "Langu": "E", "Tel_Number": "", "Fax_Number": ""}, "Contact_In": {"Name": "", "Tel_Num": "", "Tel_Country": "", "EMail": ""}}

 

I did enter a userid and ZWG_VAL  as well.  Currently the API flow returns the following after the download tool and JSON parse tools respectively:

Roche_0-1652270227523.png

 

After the JSON parse the fields are all null.

Roche_1-1652269604796.png

And thus the reason why I think that the data in the data field is not in the correct format.  I used this link to do configurations: https://community.alteryx.com/t5/Alteryx-Promote-Knowledge-Base/Promote-Rest-API-Call/ta-p/343890

 

Thank you for helping! 

 

apathetichell
18 - Pollux

No - that is saying you are not authorized to make a successful API call - ie your username/password are wrong.

Roche
8 - Asteroid

Hi, thank you!  Will ask again if I do not get a success.

Labels