Free Trial

Alteryx Server Discussions

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

Alteryx Gallery API: Posting a job using an input file.

Adriankp
8 - Asteroid

I'm trying to figure out how to use the Gallery API to post a new job to our gallery while using an input file, but I'm struggling to understand how to actually configure the app to facilitate it.

 

Uploading the file through the /user/v2/inputfiles endpoint works well, and returns the Id of the uploaded temp file. Posting a new job while passing the Id in the question parameter of the file browse tool also works as intended. What I'm struggling with is how to configure the app to actually use the file id to read the uploaded file.

 

Using an action tool with the default configuration between File Browse > Input Data in the app returns an error message saying the file could not be found in the staging folder. Understandable since it just seems to look for the Id in the folder. No file name or extension is included. Adding an extension through a formula also just results in the same error.

 

So how do you actually use the Id to access the uploaded file in your app? Can't seem to find any documentation that explains this in detail. Is some other call required to find the actual path of the uploaded file, or am I just missing something simple in the configuration of the app?

 

Thanks in advance!

 

 

 

 

1 REPLY 1
matthew554
5 - Atom

@Adriankp wrote:

I'm trying to figure out how to use the Gallery API to post a new job to our gallery while using an input file, but I'm struggling to understand how to actually configure the app to facilitate it.

 Next Stuff Your Kindle Day

Uploading the file through the /user/v2/inputfiles endpoint works well, and returns the Id of the uploaded temp file. Posting a new job while passing the Id in the question parameter of the file browse tool also works as intended. What I'm struggling with is how to configure the app to actually use the file id to read the uploaded file.

 

Using an action tool with the default configuration between File Browse > Input Data in the app returns an error message saying the file could not be found in the staging folder. Understandable since it just seems to look for the Id in the folder. No file name or extension is included. Adding an extension through a formula also just results in the same error.

 

So how do you actually use the Id to access the uploaded file in your app? Can't seem to find any documentation that explains this in detail. Is some other call required to find the actual path of the uploaded file, or am I just missing something simple in the configuration of the app?

 

Thanks in advance!

 


To access a file uploaded via the Gallery API's `/user/v2/inputfiles` endpoint within an Alteryx Gallery App, don't directly use the returned temporary ID in an "Input Data" tool. Instead, configure your "File Browse" tool with an **Alias**, and then in the "Input Data" tool's "Data Source", use the environment variable `%tempfilename:YourFileBrowseAlias%` (replacing `YourFileBrowseAlias` with the actual alias). Ensure the "Input Data" tool's "File Format" is correctly set. This allows Alteryx to access the uploaded file's content without needing a separate API call for the file path.