Hi Data Folks,
Am using an api for uploading a file and it is working fine in postman not sure how can we achieve same in Alteryx using download tool. Could someone helps here. Below are the details
In the body i have 2 parameters form_data which is a json object for payload and attachment which is the file to be uploaded.
Headers contains: Content-Type :multipart/form-data
Cookie: Cookie
Is this an Atlassian API- if so which one? Atlassian API specs are all public. Are you sure that you are sending the file properly in the payload.
Yes, Atlassian API, you are right, this is the one I am using
Your curl is off i think specifically on the file naming/location ->
you:
curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: no-check" -F "file=@myfile.txt" http://myhost/rest/api/2/issue/TEST-123/attachments
working in postman:
--form 'file=@"olTeoj81W/REFramework Documentation-EN.pdf"'
so try file=@"myfile.txt" assuming myfile.txt is in the working directory.
The curl works in postman with:
are you uploading or downloading? can you share your error message? can you share your download tool config? your initial post had the @myfile part incorrect. if you have corrected that and it's not working -> what are you seeing?
"file" -not "File" -> and you need to set it up as a form in the payload/body.
file gives a 500 response with both the file path and the Blob base 64 as file
so if I pass file = file @/"C:/Temp/Desert.jpg"
or file = Blob base64
HTTP/1.1 500
content-length: 0
content-type: application/json;charset=UTF-8
date: Tue, 14 Jan 2025 21:37:04 GMT
p3p: CP="NON CUR OTPi OUR NOR UNI"
x-content-type-options: nosniff
x-asessionid: 11xpoo4
cache-control: no-cache, no-store, no-transform
x-xss-protection: 1; mode=block
x-ausername: xxxxx
x-seraph-loginreason: OK
content-security-policy: sandbox
strict-transport-security: max-age=31536000; includeSubDomains
referrer-policy: strict-origin-when-cross-origin
x-anodeid: Node-tr-p19-b
x-arequestid: 1357x3570579x1
Set-Cookie: JSESSIONID=BA6965AFA50A6C2ABA8D3E12E4B2B71E; Path=/tracker19; Secure; HttpOnly
Set-Cookie: atlassian.xsrf.token=BTGP-PE51-YAKD-HC0Q_25b2a7092b4bfd8a3f3d0bc1f75ff88a77a94a31_lin; Path=/tracker19; SameSite=None; Secure
Set-Cookie: BIGipServer~PART2492~RB-TRACKER-P19_21443=rd2492o00000000000000000000ffff0a3ae30co21443; Path=/; Secure; HttpOnly
Don't have Alteryx on the current machine I'm using ---> but if this still isn't working for you - i'll download it and set it up locally.
make sure you add:
Content-Type multipart/form-data to your headers.
and your file syntax is still off -> it should be file: file @"C:/Temp/Desert.jpg"
I made the updates but still stuck without the attachment and getting a 500 error when using "file" as the name
when using "File" I get a 200 resposnse but still no attachment, even with your corrections.