Hello, I've been wrestling with this and can't figure out the cause. I'm trying to upload an attachment to Confluence using the REST API with the details below. I'm getting 500 errors every time. Unfortunately I don't have access to the Confluence log. Is there anything obvious I'm missing here, using the example below? I've confirmed that the file referenced does exist in the /tmp directory on the server.
Endpoint:
https://myServer/confluence/rest/api/content/209128247/child/attachment
Request body:
fileName=@/tmp/f3a6349b1b0ebc94228a11b39b4bcbb5.png
Added header:
{X-Atlassian-Token=no-check}
Response:
[ERROR CODE: 500 ] Method failed: (/confluence/rest/api/content/209128247/child/attachment) with code: 500
Hi @David Clarkson ,
The error 500 is a generic HTTP error that indicates that something has gone wrong on the server side. I'd check with the server admin person, as those logs may provide more specific information.
I was wondering if you could try a different way to test it. This page describes a method to upload attachments and shows a shell script that uses the REST API (also user/password authentication).
Other articles that may help troubleshoot:
https://www.lifewire.com/500-internal-server-error-explained-2622938
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.