Error while trying to upload an attachment to a ticket

11 views
Skip to first unread message

Rakesh Sharma

unread,
Oct 6, 2021, 4:21:16 AM10/6/21
to Assembla API Development
Hi,

I am trying to upload a file to a ticket but always getting 500 internal server error, below is the curl and its response. Can you please help me identify what's going wrong here?

curl -i -X POST -H "X-Api-Key: xxxxxx" -H "X-Api-Secret: xxxxxxx" -H "Content-Type: multipart/form-data" "https://api.assembla.com/v1/spaces/xxxxx/documents.json" -F "document[file]=@testAssemblaUpload.txt" -F "document[name]=testAssemblaUpload.txt" -F "document[ticket_id]=232288887" -F "document[attachable_id]= 232288887  " -F "document[attachable_type]=Ticket"

Response:

HTTP/2 500
date: Wed, 06 Oct 2021 08:17:55 GMT
content-type: application/json; charset=utf-8
content-length: 46
x-request-id: ed14e268-ae47-447e-8c4c-9b151634a5ec
x-runtime: 0.366641
status: 500 Internal Server Error
cf-cache-status: DYNAMIC
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
server: cloudflare
cf-ray: 699d74c0d932057b-IAD
Reply all
Reply to author
Forward
0 new messages