Documentation forSolarWinds Service Desk

Releases

Getting a list of all releases

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

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

Getting release details (using release ID number):

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

Create a new release:

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

Required fields:

<name>,<requester>,<state>

XML Example:

<release>

  <name>Release title</name>

  <state>Open</state>

  <priority>Medium</priority>

  <description>Release description</description>

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

  <approvers type="array">

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

  </approvers>

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

  <plan>Release plan</plan>

  <build>Release build</build>

  <deploy>Release deploy</deploy>

  <planned_end_at>Dec 11, 2012</planned_end_at>

  <planned_start_at>Dec 12, 2012</planned_start_at>

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

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

  <changes type="array">

    <change><number>27</number></change>

  </changes>

  <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>

</release>

JSON Exmaple:

{

    "release": {

    "name": "Release Title",

    "state": "Open",

    "priority": "Medium",

    "description": "Release description",

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

       "approval_levels": [

          "approval_level": {

            "approval_condition": APPR_COND,

            "Approvers":{

               "Approver": [

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

               ]

            }

          }

       ],

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

    "plan": "Release plan",

    "build": "Release build",

    "deploy": "Release deploy",

    "planned_end_at": "Dec 11, 2012",

    "planned_start_at": "Dec 1, 2012",

    "site": {"name": "Site Name"},

"department": {"name": "Department Name"},

"changes":{

    "change": [{"number": 27}, {"number": 45}]

    },

    "custom_fields_values":{

    "custom_fields_value":[

{"name": "Custom Field Name 1", "value": "Value 1"},

{"name": "Custom Field Name 2", "value": "Value 2"},

{"name": "Custom Field Name 3", "value": "Value 3"}]

}

}

}

Available values for fields:

  • approval_condition:

    • 0, no approvers required

    • 1, only one approver required

    • 2, all approvers required

    • 3, 50% of approvers required