Example of using the simplified REST API to retrieve metadata
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'
'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
{
"fields": {
"additionalProp1": {
"name": "string",
"fieldMenuItems": [
{
"labels": [
"string"
],
"value": "string"
}
],
"selectionValues": [
{
"id": 0,
"value": "string"
}
]
},
"additionalProp2": {
"name": "string",
"fieldMenuItems": [
{
"labels": [
"string"
],
"value": "string"
}
],
"selectionValues": [
{
"id": 0,
"value": "string"
}
]
},
"additionalProp3": {
"name": "string",
"fieldMenuItems": [
{
"labels": [
"string"
],
"value": "string"
}
],
"selectionValues": [
{
"id": 0,
"value": "string"
}
]
}
},
"statusMappings": [
{
"id": 0,
"value": "string",
"alias": "string",
"statusReasons": [
{
"id": 0,
"value": "string"
}
],
"invalidStatusTransitions": [
{
"toStatusId": 0
}
]
}
],
"requiredFields": [
{
"fieldName": "id/status/summary",
"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 }"
}
}
],
"workNote": {
"types": [
{
"id": 0,
"value": "string"
}
]
}
}
"fields": {
"additionalProp1": {
"name": "string",
"fieldMenuItems": [
{
"labels": [
"string"
],
"value": "string"
}
],
"selectionValues": [
{
"id": 0,
"value": "string"
}
]
},
"additionalProp2": {
"name": "string",
"fieldMenuItems": [
{
"labels": [
"string"
],
"value": "string"
}
],
"selectionValues": [
{
"id": 0,
"value": "string"
}
]
},
"additionalProp3": {
"name": "string",
"fieldMenuItems": [
{
"labels": [
"string"
],
"value": "string"
}
],
"selectionValues": [
{
"id": 0,
"value": "string"
}
]
}
},
"statusMappings": [
{
"id": 0,
"value": "string",
"alias": "string",
"statusReasons": [
{
"id": 0,
"value": "string"
}
],
"invalidStatusTransitions": [
{
"toStatusId": 0
}
]
}
],
"requiredFields": [
{
"fieldName": "id/status/summary",
"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 }"
}
}
],
"workNote": {
"types": [
{
"id": 0,
"value": "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 retrieve the recommended knowledge articles or incidents
- Open the Postman - REST Client.
Set the request URL as:
https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/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.
- Click Headers.
Enter the following data as key value pairs in the header:
Key
Value
X-Requested-By
XMLHttpRequest
Content-Type
application/json
- 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*