Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

405 error on Attachments REST API?

Derek Fields _RightStar_
Community Champion
June 11, 2020

I am submitting the following curl command to a Jira Cloud environment:

curl --location --request POST 'https://xxx.atlassian.net/rest/api/3/issue/MACBIS-6969/attachments' \--header 'X-Atlassian-Token: no-check' \--header 'Content-Type: multipart/form-data; boundary=f7fc6d5c1ffcea457fef7eea21c973cd' \--header 'Authorization: Basic <TOKEN>' \--data-raw '--f7fc6d5c1ffcea457fef7eea21c973cd\r\nContent-Disposition: form-data; name="file"; filename="file.csv"\r\n\r\nThis is a test file\r\n--f7fc6d5c1ffcea457fef7eea21c973cd--\r\n'

This works as expected in my test environment. When I submit it to my production environment, it returns a 405 error without any additional information as to what went wrong.

Any idea what this 405 error would refer to? I have checked permissions on the issue and project. Create Attachment and Edit Issue are both confirmed. The Issue exists in the target system. 

The REST API documentation doesn't define the 405 error. I am at a loss as to what is going wrong.

1 answer

Suggest an answer

Log in or Sign up to answer