Documentation forSolarWinds Service Desk

Items

Create a new item (and add it to an existing contract):

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/contracts/CONTRACT_ID/items.xml

XML Example:

<item>

  <name>Name</name>

  <version>123</version>

  <qty>2</qty    >

  <tag>Tag</tag>

</item>

JSON Example:

{

  "item":{

    "name":"name"

    "version""123"

    "qty":"2"

    "tag":"tag"

  }

}

Updating an item:

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/contracts/CONTRACT_ID/items/ITEM_ID.xml

XML Example:

<item>

  <field_to_update>content</field_to_update>

</item>

JSON Example:

{

  "item":{

    "field_to_update":"content"

  }

}

Deleting an item:

curl -H "X-Samanage-Authorization: Bearer TOKEN" -H 'Accept: application/vnd.samanage.v2.1+xml' -X DELETE https://api.samanage.com/contracts/CONTRACT_ID/items/ITEM_ID.xml