As per the link, I have created a postman request for adding attachment in existing issue.
https://confluence.atlassian.com/jirakb/how-to-add-an-attachment-to-a-jira-issue-using-rest-api-699957734.html
I am getting a 200 response but the Response body only shows: []
There is no attachment in the issue in JIRA.
The body header and authorization of Post requests are same as mentioned in screenshot in above link.
I have tried with both issue id as well as Issue key
https://172.25.210.203:8443/rest/api/2/issue/67189/attachments
https://172.25.210.203:8443/rest/api/2/issue/DOWN-9/attachments
I had the same issue with status code 200 and only received an empty array.
I had to add the --form 'file=@"/home/user/myfile.txt"'
curl --location --request POST 'https://your-org.atlassian.net/rest/api/3/issue/${ISSUE-KEY}/attachments' \
--header 'X-Atlassian-Token: no-check' \
--header 'Accept: application/json' \
--header 'Content-Type: multipart/form-data' \
--header 'Authorization: Basic blabla' \
--form 'file=@"/home/user/myfile.txt"'
this is my postman:
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.