Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

add comment in issue with curl

vivek
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 17, 2020

i am using below commands:

curl -D- -u username:password -X POST --data ‘{"update": { "comment": [ { "add": { "body": "Bug has been fixed." }}]}}’ -H "Content-Type: application/json" http://jira_link/rest/api/2/issue/jira_issue/comment

curl -u username:password -X POST --data ‘{ "body":"Bug has been fixed." }’ -H "Content-Type: application/json" http://jira_link/rest/api/2/issue/jira_issue/comment

Error:

curl: (6) Couldn't resolve host 'body:Bug has been fixed.'
{"errorMessages":["Unexpected character ('â' (code 226)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: org.apache.catalina.connector.CoyoteInputStream@20fddc70; line: 1, column: 2]"]}

 

Can you please help me to resolve this?

0 answers

Suggest an answer

Log in or Sign up to answer