Alteryx Server Discussions

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

Pass input file path in Alteryx Gallery API

snigdha25
7 - Meteor

I am using Alteryx Gallery API (POST /v1/workflows/{appId}/jobs) to execute a workflow.
I am passing the file path as value but I keep getting the error -  "The Action \"ToolId:3\" has an error: The file name is empty."

 

How should the file path be passed so that it is read by API.

 
 
 

Attached image of value that I am passing.

 

 

2 REPLIES 2
TimN
13 - Pulsar

Hi,

I think you need to first use this endpoint (POST) -  /user/v2/inputfiles/- to publish a temporary file to be used as an input to an Analytic App.

 

Regards.

 

API Documentation:

Implementation Notes
Use a MultiPart/Form-Data request to publish a temporary file to be used as an input to an Analytic App. The name of the required form-data section is inputFile.

--FORM-BOUNDARY
Content-Disposition: form-data; name="inputFile"; filename={fileName}
Content-Type: {contentType}
{fileContents}
--FORM-BOUNDARY

Use the fileId returned as an input parameter in an Analytic App.

Response Class

Gilberto92
5 - Atom

HI,

I'm joining this thread to ask you: what exactly should I enter in this form?

 

--FORM-BOUNDARY
Content-Disposition: form-data; name="inputFile"; filename={fileName}
Content-Type: {contentType}
{fileContents}
--FORM-BOUNDARY

 

fileName is the path of the file I want to upload?

what are "contentType" and "fileContents" fields?

 

Thank you very much for your help!

 

Gilberto 

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!