You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi and thank you for taking the time to read my question!
V3 endpoint:
rest/api/3/issue/{issueKeyID}/comment
V3 request body:
{
"body":{
"type":"doc",
"version":1,
"content":[
{
"type":"paragraph",
"content":[
{
"type":"text",
"text":"Paragraph Text"
}
]
},
{
"type":"mediaSingle",
"attrs":{
"layout":"align-start"
},
"content":[
{
"type":"media",
"attrs":{
"id":"9458e39e-ed47-4598-9a42-81a039283wda",
"type":"file",
"collection":"",
"width":595,
"height":595
}
}
]
}
]
}
}
Making a POST request to the above endpoint results in this,
{"errorMessages":[],"errors":{"comment":"Comment body is not valid!"}}
Hi,
I am also facing the same problem. Is there a solution fr this?
In order to add the attachment in the comment, I need to supply the attachment's UUID in the mediaGroup, but that UUID is not available in any API output.
I tried with the attachment ID, but then I get an error saying that attachment validation failed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @mohanraj_kandhasamy did you try to use something simple on the beginning? I can see quite nice example in the docs: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-rest-api-3-issue-issueidorkey-comment-post
To be honest, I think you can't post attachments as part of the comment. You need to post attachment to Jira first and create link to it in the comment...
Check if the endpoint is working with simple body and we can work on it after that...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.