Example of using the simplified REST API to search and update a problem investigation
To retrieve problem investigation details based on search criteria
cURL example
'https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/v2/problem/search?filter=My%20Group%20Need%20Attention%20Tickets&optimize=Y' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"limit": 10,
"offset": 10,
"sortBy": [{ "field" : "priority", "order": "desc"}],
"fields": "['\''id'\'','\''status'\'']",
"criteria": {
"bindingExpression": "AND",
"conditions": "{\r\n \"fieldName\": \"status\",\r\n \"operation\": \"eq\",\r\n \"fieldValue\": \"27000\"\r\n },\r\n {\r\n \"fieldName\": \"assignee\",\r\n \"operation\": \"eq\",\r\n \"fieldValue\": \"Allen Allbrook\"\r\n }"
}
}'
Request URL
Request body
"limit": 2,
"offset": 0,
"criteria": {
"bindingExpression": "AND",
"conditions": [
{
"fieldName": "assignee",
"operation": "contains",
"fieldValue": "Ian"
},
{
"fieldName": "status",
"operation": "neq",
"fieldValue": "10"
},
{
"fieldName": "status",
"operation": "neq",
"fieldValue": "11"
},
{
"fieldName": "status",
"operation": "neq",
"fieldValue": "12"
},
{
"fieldName": "status",
"operation": "neq",
"fieldValue": "13"
}
]
}
}
To retrieve problem investigation details based on the request ID
cURL example
Request URL
To update the status of a problem investigation
cURL example
'https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/v2/problem/PBI000000000102' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"assignee": {
"loginId": "Allen"
},
"assigneeGroup": "Backoffice Support",
"assigneeGroupId": "SGP000000000009",
"assigneeSupportCompany":"Calbro Services",
"assigneeSupportOrganization":"IT Support"
}'
Request URL
Request body
"assignee": {
"loginId": "Allen"
},
"assigneeGroup": "Backoffice Support",
"assigneeGroupId": "SGP000000000009",
"assigneeSupportCompany":"Calbro Services",
"assigneeSupportOrganization":"IT Support"
}
The following example demonstrate how to perform the operations by using Postman client.
Before you begin
Make sure that you have a valid authentication token. For more information, see Access-and-authentication-for-the-simplified-REST-API.
To search and update a problem investigation
- Open the Postman - REST Client.
Depending on your goal, set the request URL and method as any of the following:
Goal
Method
Sample URL
To retrieve problem investigation details based on search criteria
POST
https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/v2/problem/search?filter=<Filter>
To retrieve problem investigation details based on the request ID
GET
https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/v2/problem/PBI_CAL_1000024
To update the status of a problem investigation
PATCH
https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/v2/problem/INC000000000102
- Click Headers.
Enter the following data as key value pairs in the header:
Key
Value
X-Requested-By
XMLHttpRequest
Content-Type
application/json
- On the Body tab, select raw.
- From the list, select JSON.
Enter the JSON.
For example:- Click Send.
The results are displayed on the response panel.