I try to add attachment file to opened issue through POSTMAN or curl to Jira. However, it returns me 404 error. I do not have any problem with permissions, since, I checked all of them with other REST API from Jira, also, the file I send has only 4 kb of data and it is '.txt' file. I did my request according to following url: https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-api-3-issue-issueIdOrKey-attachments-post
curl -D- -u n***a:1*****a -X POST -H "X-Atlassian-Token: no-check" -F "file=@notefromfin.txt" http://tracker.*******.com/rest/api/3/issue/QS*R-596/attachment
Hello,
You use Jira Cloud rest api. Are you on Cloud?
No, I am on server. Is it the problem?
curl -D- -u {username}:{password} -X POST -H "X-Atlassian-Token: nocheck" -F "file=@{path/to/file}" http://{base-url}/rest/api/2/issue/{issue-key}/attachments
I have to use this one, right?
Yes, That is the problem.
You should use /rest/api/2/issue/{issueIdOrKey}/attachments:
https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issue/{issueIdOrKey}/attachments
It looks like you're new here. Sign in or register to get started.