How to send attachments to a comment through the REST API?

Hello, I am trying to send a comment through the REST API but I don't see in the documentation a valid endpoint to send an attachment to a comment, thanks

2 answers

1 accepted

1 vote

In JIRA, attachments are not bound to comments, but rather to specific issues in JIRA.  There is way add attachments in JIRA via REST, the endpoint in JIRA is /api/2/issue/{issueIdOrKey}/attachments{issueIdOrKey}/attachments-addAttachment

1 vote

There are some examples of using the API here:

but maybe you can explain better what you are trying to do?

If you want an attachment to be diplayed inside a comment, you will probably have to first attach the attachment to the page (I don't think you can attach an attachment to a comment, only to its parent page), and then submit a comment with the necessary storage format (you can look at the storage format of an attachment displayed in a page to see what you need).

Suggest an answer

Log in or Join to answer
Community showcase
Jason Wong
Published yesterday in Agility Beta

Welcome to agility

Every team in the world is unique, and so   Atlassian believes   that each and every team's best way of working  needs to  be molded to their unique circumstances  – ...

324 views 6 15
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot