Example of using the simplified REST API to get person details
To retrieve the support group details based on person ID
cURL example
'https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/foundation/supportGroups' \
-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 }"
}
}
Response body
"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"
}
]
}
To retrieve permission details for a logged in user
cURL example
'https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/person/permission?user=Allen&permissiontype=userpermission' \
-H 'accept: application/json'
Request URL
Response body
"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"
}
]
}
To retrieve person details based on the person ID
cURL example
'https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/person/Allen?fetchSupportGroups=Y' \
-H 'accept: application/json'
Request URL
Response body
"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"
}
]
}
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 person details
- 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 the support group details based on person ID
POST
https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/foundation/supportGroups
To retrieve permission details for a logged in user
GET
https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/person/permission?user=<person ID>&permissiontype=<permission type>
To retrieve person details based on the person ID
PATCH
https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/person/<person ID>?fetchSupportGroups=Y
- Click Headers.
Enter the following data as key value pairs in the header:
Key
Value
X-Requested-By
XMLHttpRequest
Content-Type
application/json
- Perform the following steps only if you want to retrieve the support group details of a person:
- 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.