Documentation forSolarWinds Service Desk

Changes

Getting a list of all changes

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

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

Getting change details (using change’s ID number):

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

Create a new change:

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

Required fields:

<name>,<requester>,<state>,<priority>

Optional fields:

<description>,<assignee>,<change_plan>,<rollback_plan>,

<rollback_plan>,<test_plan>,<planned_start_at>,<planned_end_at>,<site>,<department>,<release>,<problems>

XML Example:

<change>

  <name>Change title</name>

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

  <state>On_Hold</state>

  <description>Change description</description>

  <priority>Medium</priority>

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

  <change_plan>Change Plan</change_plan>

  <rollback_plan>Rollback plan</rollback_plan>

  <test_plan>Test Plan</test_plan>

  <planned_start_at>Dec 11, 2012</planned_start_at>

  <planned_end_at>Dec 12, 2012</planned_end_at>

  <site><name>Site name</name></site>

  <department><name>Department name</name></department>

  <release><number>14</number></release>

  <problems type="array">

    <problem><number>445</number></problem>

  </problems>

  <custom_fields_values>

    <custom_fields_value>

      <name>field name</name>

      <value>content</value>

    </custom_fields_value>

    <custom_fields_value>

      <name>field name</name>

      <value>content</value>

    </custom_fields_value>

  </custom_fields_values>

</change>

JSON Example:

{

  "change":{

    "name":"change title",

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

    "state":"On hold",

    "description":"change description",

    "priority":"Medium",

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

    "change_plan":"change plan",

    "rollback_plan":"rollback plan",

    "test_plan":"test plan",

    "planned_start_at":"dec 12,2015",

    "planned_end_at":"dec 12,2015",

    "site":{"name":"site name"},

    "department":{"name":"department name"},

    "release":{"number":"14"},

    "problems":{"problem":[{"number":"445"}]},

    "custom_fields_values":{

      "custom_fields_value":[

      {"name":"field_name","value":"content"},

      {"name":"field_name","value":"content"}]

    }

  }

}

  "change":{

    "name":"change title",

    "Requester":{"email":"demo@samanage.com"},She truly

    "state":"On hold",

    "description":"change description",

    "priority":"Medium",

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

    "change_plan":"change plan",

    "rollback_plan":"rollback plan",

    "test_plan":"test plan",

    "planned_start_at":"dec 12,2015",

    "planned_end_at":"dec 12,2015",

    "site":{"name":"site name"},

    "department":{"name":"department name"},

    "release":{"number":"14"},

    "problems":{"problem":[{"number":"445"}]},

    "custom_fields_values":{

      "custom_fields_value":[

      {"name":"field_name","value":"content"},

      {"name":"field_name","value":"content"}]

    }

  }

}

Updating a change:

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/changes/CHANGE_ID.xml

XML Example:

<change>

  <field_to_update>content</field_to_update>

</change>

JSON Example:

{

  "change":{

    "field_to_update":"content"

  }

}