Documentation forSolarWinds Service Desk

Vendors:

Getting a list of all Vendors:

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

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

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

Response XML Example:

<vendor>

<URL>www.samanage.com</URL>

<contact_name>Support</contact_name>

<contact_email>support@samanage.com</contact_email>

<contact_phone>1-800-250-8971</contact_phone>

<address></address>

<city></city>

<state></state>

<zip></zip>

<telephone></telephone>

<note></note>

<created-at>2009-01-08T09:03:11Z</created-at>

<updated-at>2009-01-08T09:03:11Z</updated-at>

<href>https://api.samanage.com/vendors/613-samanage.xml</href>

<id>613</id>

</vendor>

Creating a new vendor:

curl -H "X-Samanage-Authorization: Bearer TOKEN" -d 'INPUT_XML' -H 'Accept: application/vnd.samanage.v2.1+xml' -H 'Content-Type:text/xml' -X POST https://api.samanage.com/vendors.xml

Required fields:

Name, Vendor Type

XML Example:

<vendor>

<name>Samanage</name>

<vendor_type><name>SaaS Vendor</name></vendor_type>

<url>www.samanage.com</url>

<contact_name>Support</contact_name>

<contact_email>support@samanage.com</contact_email>

<contact_phone>1-888-250-8971</contact_phone>

<note>Note Example</note>

<address>117 Edinburgh South</address>

<city>Cary</city>

<state>NC</state>

<zip>USA 27511</zip>

<telephone>1-888-250-8971</telephone>

</vendor>

JSON Example:

{

"vendor": {

"name": "Samanage",

"vendor_type": {"name": "vendor_type_name"},

"url": "www.samanage.com",

"contact_name": "Support",

"contact_email": "support@samanage.com",

"contact_phone": "1-888-250-8971",

"note": "note",

"address": "117 Edinburgh South",

"city": "Cary",

"state": "NC",

"zip": "USA 27511",

"telephone": "1-888-250-8971"

}

}

Updating an existing vendor:

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/vendors/VENDOR_ID.xml

XML Example:

<vendor>

  <field_to_update>content</field_to_update>

</vendor>

JSON Example:

{

"vendor": {

"field_to_update": "content",

}

}

Deleting a vendor:

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