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/problem/search?filter=My%20Group' \
-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": 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 }"
}
}
To retrieve problem investigation details based on the request ID
cURL example
'https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/problem/PBI_CAL_1000024' \
-H 'accept: application/json'
Request URL
To update the status of a problem investigation
cURL example
Failed to execute the [code] macro. Cause: [RuntimeError: maximum recursion depth exceeded (Java StackOverflowError)]. Click on this message for details.
Request URL
Request body
"id": "string",
"guid": "string",
"instanceId": "string",
"summary": "string",
"description": "string",
"locationCompany": "string",
"createDate": "string",
"modifiedDate": "string",
"type": 0,
"status": 0,
"statusReason": 0,
"resolutionNote": "string",
"priority": 0,
"impact": 0,
"urgency": 0,
"customer": {
"loginId": "string",
"firstName": "string",
"lastName": "string",
"fullName": "string",
"company": "string",
"permission": [
"string"
],
"assigneeSupportGroups": [
{
"id": "string",
"name": "string",
"company": "string",
"organization": "string",
"defaultGroup": false,
"available": false,
"functionalRole": "string"
}
]
},
"assignee": {
"loginId": "string",
"firstName": "string",
"lastName": "string",
"fullName": "string",
"company": "string",
"permission": [
"string"
],
"assigneeSupportGroups": [
{
"id": "string",
"name": "string",
"company": "string",
"organization": "string",
"defaultGroup": false,
"available": false,
"functionalRole": "string"
}
]
},
"assigneeGroupId": "string",
"assigneeGroup": "string",
"needsAttention": false,
"fields": [
"string"
],
"launchUrl": "string",
"attachments": [
{
"id": "string",
"fileSize": 0,
"thumbnail": "string",
"fileContentType": "string",
"fileName": "string",
"downloadUrl": "string",
"attachmentReference": {
"dataSource": "string",
"attachmentFieldId": "string",
"dataSourceId": "string"
}
}
],
"targetDate": "string",
"assigneeSupportOrganization": "string",
"assigneeSupportCompany": "string",
"rootCause": "string",
"coordinator": {
"loginId": "string",
"firstName": "string",
"lastName": "string",
"fullName": "string",
"company": "string",
"permission": [
"string"
],
"assigneeSupportGroups": [
{
"id": "string",
"name": "string",
"company": "string",
"organization": "string",
"defaultGroup": false,
"available": false,
"functionalRole": "string"
}
]
},
"coordinatorGroup": "string",
"coordinatorGroupId": "string",
"coordinatorGroupOrganization": "string",
"coordinatorGroupCompany": "string"
}
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/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/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/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.