DEV Community

Nithin Raj
Nithin Raj

Posted on

How to add an attachment to a JIRA issue using REST API?

Following is the process of uploading an attachment to an issue via the
REST API using the curl command.

curl -D- -u {username}:{apikey} -X POST -H "X-Atlassian-Token: nocheck" 
-F "file=@{path/to/file}" 
http://{base-url}/rest/api/3/issue/{issue-key}/attachments

Hope this helps some of you who struggled like me.
Happy Coding!

Top comments (0)