Documentation forSolarWinds Service Desk

Comments

Create a new comment (and add it to an existing itsm, incidents for example):

curl -H "X-Samanage-Authorization: Bearer TOKEN" -d 'INPUT_XML' -H 'Accept: application/xml' -H 'Content-Type:text/xml' -X POST https://api.samanage.com/incidents/INCIDENT_ID/comments.xml

XML Example:

<comment>

  <body>Comment</body>

  <is_private>true</is_private>

</comment>

Optional fields: 

<commenter>demo@samanage.com</commenter>

JSON Example:

{

  "comment":{

    "body":"Comment",

    "is_private":"true",

  }

}

Optional fields:

"commenter":"demo@samanage.com",

Updating a comment:

curl -H "X-Samanage-Authorization: Bearer TOKEN" -d 'INPUT_XML' -H 'Accept: application/xml' -H 'Content-Type:text/xml' -X PUT https://api.samanage.com/incidents/INCIDENT_ID/comments/COMMENT_ID.xml

XML Example:

<comment>

  <field_to_update>content</field_to_update>

</comment>

JSON Example:

{

  "comment":{

    "body":"Comment",

    "is_private":"true",

  }

}

Deleting a comment:

curl -H "X-Samanage-Authorization: Bearer TOKEN" -H 'Accept: application/vnd.samanage.v2.1+xml' -X DELETE https://api.samanage.com/incidents/INCIDENT_ID/comments/COMMENT_ID.xml