Example of using the simplified REST API to search and update an incident
To retrieve incident details based on search criteria
cURL example
'https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/incident/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 incident details based on the incident ID
cURL example
Request URL
To update the details of an incident
cURL example
'https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/incident/INC000000000102' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"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",
"company": "string",
"organization": "string"
}'
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",
"company": "string",
"organization": "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 an incident
- 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 incident details based on search criteria
POST
https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/incident/search?filter=<search filter>
In this URL, the filter query parameter can have the following three values:
- My Group Tickets
- My Group Open Tickets
- My Group Need Attention Tickets
To retrieve incident details based on the incident ID
GET
https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/incident/INC000000000102
To update the details of an incident
PATCH
https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/incident/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.