In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

API Calls : How to make POST call to upload a file via API using Alteryx

Newstart2020
7 - Meteor

Hi All,

 

I am getting a success response when i upload a file using postman.

But when i try the same with alteryx designer it saying "A file was not included in the request.","success":false

 

My worklfow is quite siple..I am just trying to upload .txt file via api call but i guess i am getting configuration of the payload section in the download tool incorrect. 

very much new to this API upload space.

My curl code from Postaman is as below...have edited some of the details here...My query is how can i achieve the last lineie in higigted RED below in Alteryx API call...

 

curl --location --request POST 'https://linkhasbeendeletedhere' \
--header 'CompassApiKey: 550911*****f264a5***9' \
--header 'Content-Type: application/json' \
--header 'Cookie: cpssid_TYUUUU; ASP.NET_SessionId=49311e1f-dc8b-4ab4-8f04-341c8b2b5465' \
--form '=@"/C:/FileLoad/TestSundry.txt"'
 
Thanks
 
11 REPLIES 11
cgoodman
ACE Emeritus
ACE Emeritus

I’ve also had issues before with uploading files using a POST api request. I’ve had success converting to blob when uploading data to Azure file storage, but also failed. I’ve found this post on community which suggests data and files cannot be uploaded using the download tool, so instead they take the python script generated by postman. Maybe that would work for you? - https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Not-able-to-Upload-both-File-and-Data-...

Chris
Check out my collaboration with fellow ACE Joshua Burkhow at AlterTricks.com
vaughangary
8 - Asteroid

What if the type is "file"?  The conversion to base64 is a string.

 

      - in: "formData"
        name: "upload"
        description: "File Upload"
        required: true
        type: "file"

 

Labels
Top Solution Authors