This documentation supports the 23.3 version of BMC Helix ITSM.To view an earlier version, select the version from the Product version menu.

Example of using the simplified REST API to search and update a problem investigation


The following example demonstrates how you can use the BMC Helix ITSM simplified API to perform the following operations on a problem investigation:

  • Retrieve problem details based on search criteria (filter)
  • Retrieve problem details based on the incident ID
  • Update status of a problem investigation

The API supports only the problem investigation ticket type. Known error ticket type is not supported.

To retrieve problem investigation details based on search criteria

cURL example

curl -X 'POST' \
 '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

https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/v2/problem/search?filter=My%20Group%20Need%20Attention%20Tickets&optimize=Y

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

curl --location --request GET 'https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/v2/problem/PBI000000000112'

Request URL

https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/v2/problem/PBI000000000112

To update the status of a problem investigation

cURL example

curl -X 'PATCH' \
 '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

https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/v2/problem/PBI000000000102

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

  1. Open the Postman - REST Client.
  2. 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

  3. Click Headers.
  4. Enter the following data as key value pairs in the header:

    Key

    Value

    X-Requested-By

    XMLHttpRequest

    Content-Type

    application/json

  5. On the Body tab, select raw.
  6. From the list, select JSON.
  7. Enter the JSON.
    For example:

    To search for a problem investigation based on filter criteria
    {
       "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 update the status of a problem investigation
    {
    "assignee": {
       "loginId": "Allen"
    },
    "assigneeGroup": "Backoffice Support",
    "assigneeGroupId": "SGP000000000009",
    "assigneeSupportCompany":"Calbro Services",
    "assigneeSupportOrganization":"IT Support"
    }
  8. Click Send.
    The results are displayed on the response panel.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*