Gallery API: Inputfiles Endpoint

Version:
Current
Last modified: September 01, 2020

Do not delete this has styles that are applied to the article.

To run workflows that use the File Browse tool via the API, use the /user/v2/inputfiles endpoint to upload the file.

  1. Start by making a multipart/form-data POST request to the /user/v2/inputfiles endpoint to publish a temporary file. The name of the required form-data section is inputFile.
     
    curl --location --request POST 'http:{yourhostname}/api/user/v2/inputfiles/' \
    --form 'inputFile=@/file/path/filename.csv' 
  2. Next, make a POST to the /user/v2/workflows/{appId}/jobs/ endpoint.
    1. Then include the name of the File Browse tool in the question object. If you are unsure of the File Browse tool's name, use the /v1/workflows/{appId}/questions endpoint to get your File Browse tool's name.
    2. The value is the reference ID that your input file's call returned in the response.
    
    curl --location --request POST 'http:{yourhostname}/api/user/v2/workflows/{appId}/jobs' \
    --header 'Content-Type: text/plain' \
    --data-raw '{
        "questions": [
            {
                "name": "File Browse",
                "value": "{Reference ID}"
            }
        ]
        "priority": "Low"
    }'
    
Was This Helpful?

Running into problems or issues with your Alteryx product? Visit the Alteryx Community or contact support.