Example of using the simplified REST API to retrieve metadata


The following example demonstrates how you can use the BMC Helix ITSM simplified API to retrieve metadata details of incident, problem, or change tickets.

You can provide the following parameters:

Parameter

Type

Location

Description

type

String

Path (mandatory)

The ticket type for which you want to retrieve the metadata. Provide any of the following options:

  • Incident
  • Change
  • Problem

includeRequiredFields

String

Query (Optional)

Specify if you want the required fields to be included. The options are: Y and N.

cURL example

curl -X 'GET' \
 'https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/metadata/incident?includeRequiredFields=Y' \
 -H 'accept: application/json'

Request URL

https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/metadata/incident?includeRequiredFields=Y

Response body

{
   "status": "Success",
   "details": {
       "incident": {
           "statusReason": {
               "selectionValues": [
                   {
                       "id": 1000,
                       "value": "Infrastructure Change Created"
                   },
                   {
                       "id": 2000,
                       "value": "Local Site Action Required"
                   },
                   {
                       "id": 3000,
                       "value": "Purchase Order Approval"
                   },
                   {
                       "id": 4000,
                       "value": "Registration Approval"
                   },
                   {
                       "id": 5000,
                       "value": "Supplier Delivery"
                   },
                   {
                       "id": 6000,
                       "value": "Support Contact Hold"
                   },
                   {
                       "id": 7000,
                       "value": "Third Party Vendor Action Reqd"
                   },
                   {
                       "id": 8000,
                       "value": "Client Action Required"
                   },
                   {
                       "id": 9000,
                       "value": "Infrastructure Change"
                   },
                   {
                       "id": 10000,
                       "value": "Request"
                   },
                   {
                       "id": 11000,
                       "value": "Future Enhancement"
                   },
                   {
                       "id": 12000,
                       "value": "Pending Original Incident"
                   },
                   {
                       "id": 13000,
                       "value": "Client Hold"
                   },
                   {
                       "id": 14000,
                       "value": "Monitoring Incident"
                   },
                   {
                       "id": 15000,
                       "value": "Customer Follow-Up Required"
                   },
                   {
                       "id": 16000,
                       "value": "Temporary Corrective Action"
                   },
                   {
                       "id": 17000,
                       "value": "No Further Action Required"
                   },
                   {
                       "id": 18000,
                       "value": "Resolved by Original Incident"
                   },
                   {
                       "id": 19000,
                       "value": "Automated Resolution Reported"
                   },
                   {
                       "id": 20000,
                       "value": "No longer a Causal CI"
                   },
                   {
                       "id": 21000,
                       "value": "Pending Causal Incident Resolution"
                   },
                   {
                       "id": 22000,
                       "value": "Resolved by Causal Incident"
                   }
                ]
           },
           "urgency": {
               "selectionValues": [
                   {
                       "id": 1000,
                       "value": "1-Critical"
                   },
                   {
                       "id": 2000,
                       "value": "2-High"
                   },
                   {
                       "id": 3000,
                       "value": "3-Medium"
                   },
                   {
                       "id": 4000,
                       "value": "4-Low"
                   }
                ]
           },
           "impact": {
               "selectionValues": [
                   {
                       "id": 1000,
                       "value": "1-Extensive/Widespread"
                   },
                   {
                       "id": 2000,
                       "value": "2-Significant/Large"
                   },
                   {
                       "id": 3000,
                       "value": "3-Moderate/Limited"
                   },
                   {
                       "id": 4000,
                       "value": "4-Minor/Localized"
                   }
                ]
           },
           "incidentType": {
               "selectionValues": [
                   {
                       "id": 0,
                       "value": "User Service Restoration"
                   },
                   {
                       "id": 1,
                       "value": "User Service Request"
                   },
                   {
                       "id": 2,
                       "value": "Infrastructure Restoration"
                   },
                   {
                       "id": 3,
                       "value": "Infrastructure Event"
                   },
                   {
                       "id": 1000,
                       "value": "Security Incident"
                   }
                ]
           },
           "priority": {
               "selectionValues": [
                   {
                       "id": 0,
                       "value": "Critical"
                   },
                   {
                       "id": 1,
                       "value": "High"
                   },
                   {
                       "id": 2,
                       "value": "Medium"
                   },
                   {
                       "id": 3,
                       "value": "Low"
                   }
                ]
           },
           "status": {
               "selectionValues": [
                   {
                       "id": 0,
                       "value": "New"
                   },
                   {
                       "id": 1,
                       "value": "Assigned"
                   },
                   {
                       "id": 2,
                       "value": "In Progress"
                   },
                   {
                       "id": 3,
                       "value": "Pending"
                   },
                   {
                       "id": 4,
                       "value": "Resolved"
                   },
                   {
                       "id": 5,
                       "value": "Closed"
                   },
                   {
                       "id": 6,
                       "value": "Cancelled"
                   }
                ]
           }
       },
       "statusMappings": [
           {
               "id": 1,
               "value": "Assigned",
               "invalidStatusTransitions": [
                   {
                       "toStatusId": 0
                   }
                ]
           },
           {
               "id": 2,
               "value": "In Progress",
               "invalidStatusTransitions": [
                   {
                       "toStatusId": 0
                   }
                ]
           },
           {
               "id": 3,
               "value": "Pending",
               "statusReasons": [
                   {
                       "id": 2000,
                       "value": "Local Site Action Required"
                   },
                   {
                       "id": 3000,
                       "value": "Purchase Order Approval"
                   },
                   {
                       "id": 4000,
                       "value": "Registration Approval"
                   },
                   {
                       "id": 5000,
                       "value": "Supplier Delivery"
                   },
                   {
                       "id": 6000,
                       "value": "Support Contact Hold"
                   },
                   {
                       "id": 7000,
                       "value": "Third Party Vendor Action Reqd"
                   },
                   {
                       "id": 8000,
                       "value": "Client Action Required"
                   },
                   {
                       "id": 9000,
                       "value": "Infrastructure Change"
                   },
                   {
                       "id": 10000,
                       "value": "Request"
                   },
                   {
                       "id": 11000,
                       "value": "Future Enhancement"
                   },
                   {
                       "id": 13000,
                       "value": "Client Hold"
                   },
                   {
                       "id": 14000,
                       "value": "Monitoring Incident"
                   },
                   {
                       "id": 19000,
                       "value": "Automated Resolution Reported"
                   }
                ],
               "invalidStatusTransitions": [
                   {
                       "toStatusId": 0
                   }
                ]
           },
           {
               "id": 4,
               "value": "Resolved",
               "statusReasons": [
                   {
                       "id": 11000,
                       "value": "Future Enhancement"
                   },
                   {
                       "id": 14000,
                       "value": "Monitoring Incident"
                   },
                   {
                       "id": 15000,
                       "value": "Customer Follow-Up Required"
                   },
                   {
                       "id": 16000,
                       "value": "Temporary Corrective Action"
                   },
                   {
                       "id": 17000,
                       "value": "No Further Action Required"
                   },
                   {
                       "id": 19000,
                       "value": "Automated Resolution Reported"
                   }
                ],
               "invalidStatusTransitions": [
                   {
                       "toStatusId": 0
                   }
                ]
           },
           {
               "id": 5,
               "value": "Closed",
               "statusReasons": [
                   {
                       "id": 1000,
                       "value": "Infrastructure Change Created"
                   },
                   {
                       "id": 19000,
                       "value": "Automated Resolution Reported"
                   }
                ],
               "invalidStatusTransitions": [
                   {
                       "toStatusId": 0
                   },
                   {
                       "toStatusId": 1
                   },
                   {
                       "toStatusId": 2
                   },
                   {
                       "toStatusId": 3
                   },
                   {
                       "toStatusId": 4
                   },
                   {
                       "toStatusId": 6
                   }
                ]
           },
           {
               "id": 6,
               "value": "Cancelled",
               "statusReasons": [
                   {
                       "id": 20000,
                       "value": "No longer a Causal CI"
                   }
                ],
               "invalidStatusTransitions": [
                   {
                       "toStatusId": 0
                   },
                   {
                       "toStatusId": 1
                   },
                   {
                       "toStatusId": 2
                   },
                   {
                       "toStatusId": 3
                   },
                   {
                       "toStatusId": 4
                   },
                   {
                       "toStatusId": 5
                   }
                ]
           }
        ],
       "requiredFields": [
           {
               "fieldName": "statusReason",
               "criteria": {
                   "conditions": [
                       {
                           "fieldName": "status",
                           "fieldValue": [
                               3,
                               4
                            ],
                           "fieldType": "int"
                       }
                    ]
               }
           },
           {
               "fieldName": "resolutionNote",
               "criteria": {
                   "conditions": [
                       {
                           "fieldName": "status",
                           "fieldValue": [
                               4,
                               5
                            ],
                           "fieldType": "int"
                       }
                    ]
               }
           }
        ],
       "workNote": {
           "types": [
               {
                   "id": 2000,
                   "value": "Customer Communication"
               },
               {
                   "id": 3000,
                   "value": "Customer Follow-up"
               },
               {
                   "id": 4000,
                   "value": "Customer Status Update"
               },
               {
                   "id": 6000,
                   "value": "Closure Follow Up"
               },
               {
                   "id": 7000,
                   "value": "Detail Clarification"
               },
               {
                   "id": 8000,
                   "value": "General Information"
               },
               {
                   "id": 9000,
                   "value": "Resolution Communications"
               },
               {
                   "id": 10000,
                   "value": "Satisfaction Survey"
               },
               {
                   "id": 11000,
                   "value": "Status Update"
               },
               {
                   "id": 13000,
                   "value": "Incident Task / Action"
               },
               {
                   "id": 14000,
                   "value": "Problem Script"
               },
               {
                   "id": 15000,
                   "value": "Working Log"
               },
               {
                   "id": 16000,
                   "value": "Email System"
               },
               {
                   "id": 17000,
                   "value": "Paging System"
               },
               {
                   "id": 18000,
                   "value": "BMC Impact Manager Update"
               },
               {
                   "id": 35000,
                   "value": "Chat"
               },
               {
                   "id": 37000,
                   "value": "Vendor Communication"
               }
            ]
       }
   }
}

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 retrieve the recommended knowledge articles or incidents

  1. Open the Postman - REST Client.
  2. Set the request URL as:
    https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/v2/metadata/<type>?includeRequiredFields=<Y/N> 

    In the type parameter, you must specify the ticket type for which you want to retrieve metadata. The options are: incident, change, and problem.

  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. 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*