Documentation forSolarWinds Service Desk

Sites:

Getting a list of all sites:

curl -H "X-Samanage-Authorization: Bearer TOKEN" -H 'Accept: application/vnd.samanage.v2.1+xml' -X GET

https://api.samanage.com/sites.xml

Getting site details (using site ID number):

curl -H "X-Samanage-Authorization: Bearer TOKEN" -H 'Accept: application/vnd.samanage.v2.1+xml' -X GET https://api.samanage.com/sites/SITE_ID.xml

Create a new site:

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/sites.xml

Required fields:

<name>

XML Example:

<site>

  <name>Site name</name>

  <location>Location</location>

  <description>Description</description>

  <time-zone>Time zone</time-zone>

  <language>Language</language>

  <business-record-id>Business record ID</business-record-id>

</site>

JSON Example:

{

    "site": {

        "name": "Site name",

        "location": "Location",

        "description": "Description",

    "time_zone": "Time Zone",

    "language": "Language",

    "business_record": {"id": ID # of Business Hours Record}

    }

}

Updating an existing site:

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/sites/SITE_ID.xml

XML Example:

<site>

  <field_to_update>content</field_to_update>

</site>

JSON Example:

{

"site": {

"field_to_update": "content",

}

}

Deleting a site:

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

Permitted fields:

<location> (text),

<description> (text),

<time_zone> (name, e.g. "Hawaii"),

<business_record_id> (ID of Business Hour),

<language> (two-letter code, e.g. "en", "fr"),

<manager_id> (user only, not group),

<manager><email>,

<default_assignee_id> (user or group)