The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.