6011364

Start Service Request via API

Discussion created by 6011364 on Nov 11, 2014
Latest reply on Apr 5, 2016 by Chris Walls

Did you know you can start a Service Request from the Service Catalog via the API?

 

With the following command:

 

curl --digest -k -u "EMAIL:PASSWORD" -H "Accept: application/vnd.samanage.v1.2+xml" -H "Content-Type:text/xml" -d @SR.xml  -X POST "https://api.samanage.com/catalog_items/REQUESTID/service_requests.xml"

 

Where the SR.xml file contains:

 

<incident> <requester_name>EMAIL REQUESTER</requester_name>
<due_at>2015-01-01</due_at>
<priority>4</priority>
<site_id>-1</site_id>
<department_id>-1</department_id>
<request_variables_attributes>
<name>Variable Name 1</name>
<kind>free_text</kind>
<options></options>
<required>0</required>
<sorted>0</sorted>
<value>text value</value>
</request_variables_attributes>
<request_variables_attributes>
<name>Variable Name 2</name>
<kind>check_box</kind>
<options></options>
<required>0</required>
<sorted>0</sorted>
<value>1</value>
</request_variables_attributes>
</incident>

 

Let us know if you see good use cases for this

 

Ben

Outcomes