How do I get the comments ID through the API?

Klo August 14, 2012

I am getting this error {"errorMessages":[],"errors":{"comment":"no comment id specified."}} when I try to update a comment.

This is the code:

'{"update":{

"comment": [{"edit": {"body": "Adding comment through API"}}]
}}'

My questio is how do I get a the comment's id and how do I put the comment id in the code to update the comment?

1 answer

1 accepted

0 votes
Answer accepted
Azwandi Mohd Aris
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 14, 2012

You might want to grab a list of comments of an issue by using the GET method for /rest/api/2/issue/{issueIdOrKey}/comment. See this. This will return the IDs of the comment.

Klo August 14, 2012

I was looking into that but it failed. I think the syntax was wrong. Now, after reading carefully it works. Thx!

Suggest an answer

Log in or Sign up to answer