Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.
SOLVED

How to pass file path to input tool from API

sumanthkr
6 - Meteoroid

Hi Team,

 

I am new to Alteryx. We are using API calls to run the workflows. We have input tools for which input file is given in the workflow however we want to change it while calling from the API. Is it possible?

 

Basically we want to pass the input file path to the input tool from the API. Please let me know how to do it.

 

API used: POST /v1/workflows/{appId}/jobs/

6 REPLIES 6
MichalM
Alteryx
Alteryx

@sumanthkr 

 

You can turn your workflow into an Analytical App and make the Input configurable through the Text Box module (Interface category). This will then become available as a "Question" (or parameter) you can define when submitting the job for execution using the Gallery API - see more about that here.

 

MichalM_0-1607443173065.png

REQUEST

GET /v1/workflows/{appId}/questions/

 

RESPONSE

[
  {
    "name": "Input Path",
    "type": "QuestionTextBox",
    "description": "Input Path",
    "value": ""
  }
]

MichalM_0-1607443657283.png

 

There's a great module on building Analytical Apps in our Academy

https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Creating%2...

 

 

sumanthkr
6 - Meteoroid

@MichalM Great, Thank you so much for the quick reply. Seems like that is exactly what I wanted. Could you please give me the workflow for me download and try?

MichalM
Alteryx
Alteryx

Of course. See the attached.

sumanthkr
6 - Meteoroid

It worked 👍....Thank you very much for the quick response.

sumanthkr
6 - Meteoroid

Hi Michal, I have been using the "Action" tool from your example and it works as expected. However If I use the "Action" tool from my Alteryx Designer->Interface it doesn't work. The workflow accepts the input from input tool and output is written to a cache folder meaning it doesn't accept the paths entered in textboxes. My designer version is 2020.2.3.27789.

 

Is there a specific version of the tool? Please do let me know.

 

Thanks and Regards,

Sumanth K R

sumanthkr
6 - Meteoroid

We found that we need to select "File - value" in the Action tool to make it work. So we are good.

sumanthkr_0-1612946012057.jpeg