Hi
I am able to add comment to issue in Jira through API but i am struggling to mention/tag user in that comment i am using below API
curl -D- -u admin:adminxyz-X POST --data '{"body": {"type": "mention","attrs": { "id": "xyz","text": "hi @XYZ "}}}' -H "Content-type: application/json" https://myjira-prod.com/rest/api/2/issue/Test-123/comment
{"errorMessages":["Can not deserialize instance of java.lang.String out of START_OBJECT token\n at [Source: org.apache.catalina.connector.CoyoteInputStream@6851c17a; line: 1, column: 2] (through reference chain: com.atlassian.jira.issue.fields.rest.json.beans.CommentJsonBean[\"body\"])"]}+
Hi @Pravin
I believe in v2 for servers you can use this format
curl -D- -u admin:adminxyz -X POST
--data '{"body": "Hi [~XYZ]"}'
-H "Content-type: application/json" https://myjira-prod.com/rest/api/2/issue/Test-123/comment
Hi @Pravin
I think you're using the API v3 version of mentioning users while calling the v2 endpoint!
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.
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.