Add Ticket Comment

Adds a comment to a specified ticket.

Required Permissions

Requires the MEMBER role or higher.

HTTP Request

POST /api/sonar/tickets/:ticket_guid/comments
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     -d format=MARKDOWN \
     -d content="* Blocked the IP on the firewall" \
     -X POST \
     https://HOSTNAME/api/sonar/tickets/fa69e0dc-5116-491d-8a57-19cf0332b157/comments
Request Parameters
Path Parameters
KeyTypeDescriptionNote
ticket_guidStringTicket GUID36 characters
Request Body Parameters
KeyRequiredTypeDescriptionNote
guidNoStringNote GUID36 characters
formatYesStringContent formatJSON or MARKDOWN or PLAIN
contentYesStringContent

Success Response

{}

Error Responses

guid is not a valid GUID

HTTP status code 400

{
  "error_code": "invalid-param-type",
  "error_msg": "guid should be guid type."
}
Invalid format is specified

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "format should be one of PLAIN, MARKDOWN, JSON."
}
Ticket is not found

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "ticket not found: 638cfeb2-e259-46af-961a-1eeb65ea35f0"
}
Permission denied

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "no-permission"
}