Problems
Getting a list of all problems
curl -H "X-Samanage-Authorization: Bearer TOKEN" -H 'Accept: application/vnd.samanage.v2.1+xml' -X GET
https://api.samanage.com/problems.xml
Getting problem details (using problem’s ID number):
curl -H "X-Samanage-Authorization: Bearer TOKEN" -H 'Accept: application/vnd.samanage.v2.1+xml' -X GET https://api.samanage.com/problems/PROBLEM_ID.xml
Create a new problem:
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/problems.xml
Required fields:
<name>,<requester>,<state>
Optional fields:
<priority>,<assignee>,<site>,<department>,<root_cause>,<symptoms>, <workaround>,<incidents>,<assets>,<change>
XML Example:
<problem>
<name>Problem Title</name>
<state>Open</state>
<description>Problem description</description>
<requester><email>demo@samanage.com</email></requester>
<priority>Low</priority>
<assignee><email>demo@samanage.com</email></assignee>
<site><name>Site name</name></site>
<department><name>Department name</name></department>
<root_cause>Problem root cause</root_cause>
<symptoms>Problem symptoms</symptoms>
<workaround>Problem Workaround</workaround>
<incidents type="array">
<incident><number>1474</number></incident>
</incidents>
<assets>
<asset><id>275498</id></asset>
</assets>
<change><number>123</number></change>
<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>
</problem>
JSON Example:
{
"problem": {
"name": "Problem Title",
"state": "Open",
"description": "Problem Description",
"requester": {"email": "demo@samanage.com"},
"priority": "Low",
"assignee": {"email": "demo@samanage.com"},
"site": {"name": "Site Name"},
"department": {"name": "Department Name"},
"root_cause": "Problem root cause",
"symptoms": "Problem symptoms",
"workaround": "Problem workaround",
"assets": {
"asset": [{"id": 001}, {"id": 002}]
},
"incidents": {
"incident": [{"number": 123},{"number": 456}]
},
"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"}
]
}
}
}
Updating a problem:
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/problems/PROBLEM_ID.xml
XML Example:
<problem>
<field_to_update>content</field_to_update>
</problem>
JSON Example:
{
"problem": {
"field_to_update": "content",
}
}