Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Calling Workflow via API with data input from the API request

Thomas Sullivan
5 - Atom

Interested in firing off a workflow via API call, to the server, but using the API call that fires off the WF to provide input data to the workflow.

 

Think:

 

  1. PUT request to server API with Field 1="abc", Field 2="def" encoded into the request.
  2. Workflow runs with input for Field 1 and Field 2.  
  3. Workflow returns data from its execution with an output that is returned to the calling API request in the form of response with its own encoded data. (or appropriate http error code, etc).

 

Is this possible?  I understand the use of the API to kick off jobs, or to use the developer tool to "scrape" data from an external API, but that's not really what I am looking for.

 

 

3 REPLIES 3
apathetichell
20 - Arcturus

Check on the server thread - this should be POST though not PUT.

 

See - https://help.alteryx.com/current/en/server/api-overview/alteryx-server-api-v3/server-api-v3-objects/...

Thomas Sullivan
5 - Atom

Thanks! I will check that out.  And you are correct, in the verb.  Typo on my end :)

 

When calling that, how do I map, in designer, the expected API data into my workflow?  Should that be a download tool?  Assuming the payload "questions" is what will be mapped as input to the WF.

KGT
13 - Pulsar

When you call the API via the download tool, it will return a response. That response then needs to be parsed (may be as simple as just using the JSON Parse tool). Once parsing that, you can construct another call with that info in it.

 

This is pretty common when dealing with pagination on API calls, however in that case, the "follow-up" is usually an iterative macro, whereas in yours, it is just a continuation of the flow.

 

https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Iterative-macro-for-API-pagina...

 

Labels
Top Solution Authors