Get Ticket Comments

Get a list of the comments for a specified ticket.

HTTP Request

GET /api/sonar/tickets/:guid/comments
Request using cURL
curl -H "Authorization: Bearer <API_KEY>" \
Request Parameters
guidOStringTicket GUID36 characters
output_htmlXBooleanWhether to ouput as HTMLIf not specified, output in original format.

Success Response

  "comments": [
      "guid": "b66a31b5-db94-478b-8751-194b5ee5f358",
      "user_guid": "ffaf431b-653a-4329-8f83-913cbb00342d",
      "user_name": "Joshua",
      "type": "TEXT",
      "format": "MARKDOWN",
      "content": "* Blocked the IP address in firewall.",
      "created": "2022-09-14 17:52:20+0900",
      "updated": "2022-09-14 17:52:20+0900",
      "x_login": null,
      "x_user": null,
      "x_dept": null
  • (Array) comments
    • guid (String): Guid of the ticket comment
    • user_guid (String): Author GUID
    • user_name (String): Author name
    • type (String): (Reserved) Always TEXT.
    • format (String): PLAIN or MARKDOWN.
    • content (String): Comment content. If a user set the output_html to true, MARKDOWN text will be output in HTML format.
    • created (String): Date and time of creation (yyyy-MM-dd HH:mm:ssZ)
    • updated (String): Date and time of last modification (yyyy-MM-dd HH:mm:ssZ)
    • x_login (String): Login user name logged when the author's account is deleted
    • x_user (String): User name logged when the author's account is deleted
    • x_dept (String): Department name logged when the author's account is deleted

Error Responses

Identifier is not in valid GUID format

HTTP status code 400

  "error_code": "invalid-param-type",
  "error_msg": "guid should be guid type."
Ticket is not found

HTTP status code 500

  "error_code": "illegal-state",
  "error_msg": "ticket not found: 49272877-75f2-4c2f-9301-d21c4f9a106c"