Solutions
Getting a list of all solutions
curl -H "X-Samanage-Authorization: Bearer TOKEN" -H 'Accept: application/vnd.samanage.v2.1+xml' -X GET
https://api.samanage.com/solutions.xml
Getting solution details (using solution’s ID number):
curl -H "X-Samanage-Authorization: Bearer TOKEN" -H 'Accept: application/vnd.samanage.v2.1+xml' -X GET https://api.samanage.com/solutions/SOLUTION_ID.xml
Create a new solution:
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/solutions.xml
Required fields:
<name>,<state>
XML Exmaple:
<solution>
<name>Solution title</name>
<description>Solution description</description>
<portal_homepage>true</portal_homepage>
<state>Approved</state><incidents type="array">
<incident><number>1452</number></incident>
</incidents>
<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>
</solution>
JSON Exmaple:
{
"solution": {
"name": "Solution Title",
"description": "Solution Description",
"portal_homepage": false,
"state": "Approved",
"incidents":{
"incident":[{number: 1452}]
},
"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"}]
}
}
}