Free Trial

Alteryx Designer Desktop Discussions

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

One by one API Call

CanadaKing
6 - Meteoroid

Hi All,

Not sure if Alteryx could do that.

I have a data sheet as in below  where data has it’s own ID [Source_ID],

Source_ID COL_1 COL_2 COL_3 COL_4
S_ID_1 Bla Bla Bla Bla
S_ID_2 Bla Bla Bla Bla
S_ID_3 Bla Bla Bla Bla
S_ID_4 Bla Bla Bla Bla
S_ID_5 Bla Bla Bla Bla


I want to insert this data in a destination table where destination has a different id [Destination_ID]

Destination_ID COL_1 COL_2 COL_3 COL_4
D_ID_1 Bla Bla Bla Bla
D_ID_2 Bla Bla Bla Bla
D_ID_3 Bla Bla Bla Bla
D_ID_4 Bla Bla Bla Bla
D_ID_5 Bla Bla Bla Bla


To get the correct [Destination_ID] for the [Source_ID] I need to pass [Source_ID] to an API call one by one for each row to get the equivalent [Destination_ID], add it to the column below:

Source_ID Destination_ID COL_1 COL_2 COL_3 COL_4
S_ID_1 D_ID_1 Bla Bla Bla Bla
S_ID_2 D_ID_2 Bla Bla Bla Bla
S_ID_3 D_ID_3 Bla Bla Bla Bla
S_ID_4 D_ID_4 Bla Bla Bla Bla
S_ID_5 D_ID_5 Bla Bla Bla Bla

 

And insert it in below table (destination table):

Destination_ID COL_1 COL_2 COL_3 COL_4
D_ID_1 Bla Bla Bla Bla
D_ID_2 Bla Bla Bla Bla
D_ID_3 Bla Bla Bla Bla
D_ID_4 Bla Bla Bla Bla
D_ID_5 Bla Bla Bla Bla


Could I use a column value (Line by line) to pass to an API call and get the result into a new column using Alteryx?

6 REPLIES 6
PhilipMannering
16 - Nebula
16 - Nebula

Yes, you could.

1. Create the API request with the Formula Tool. It sounds like the Source_ID will be part of the URL or a parameter.

2. Use the Download Tool set up as per the documentation of the API you are using.

2a. The Download Toll will make a GET request for each record of your data.

3. Parse the result (most commonly JSON Parse).

 

I'm guessing how this API works though. Is it a custom, bespoke, inhouse API that you're using?

CanadaKing
6 - Meteoroid

Thanks Philip,

 

No, it is a third part app.

 

 

CanadaKing
6 - Meteoroid

Hi Philip,

 

Would you please be generous and provide detail steps of above solution?

 

I'm Sorry, I'm new in Alteryx.

 

Thanks

PhilipMannering
16 - Nebula
16 - Nebula

Hi @CanadaKing . Can you share the name of the API you want to use?

CanadaKing
6 - Meteoroid

@PhilipMannering Thanks for your response, Not sure if it will help you, this is an internal site that you must get access to see.

PhilipMannering
16 - Nebula
16 - Nebula

@CanadaKing Ah, I see. Then it's difficult to say exactly the steps as it depends a lot on the specifics of the API. However most APIs follow a similar pattern. See an example attached that might give you some clues to how your API should work....

PhilipMannering_0-1654199531345.png

 

Labels
Top Solution Authors