Documentation forSolarWinds Service Desk

Tasks

Create a new task (and add it to an existing itsm, contract, other asset):

incident 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/tasks.xml

XML Example:

<task>

  <name>Comment</name>

  <assignee><email>demo@samanage.com</email></assignee>

  <due_at>Dec 12, 2012</due_at>

</task>

JSON Example:

{

    "task": {

    "name": "Task Name",

    "assignee": {"email": "demo@samanage.com"},

    "due_at": "Dec, 12, 2012"

    }

}

Updating a task:

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/tasks/TASK_ID.xml

XML Example:

<task>

  <field_to_update>content</field_to_update>

</task>

JSON Example:

{

"task": {

"field_to_update": "content",

}

}

Deleting a task:

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