This documentation supports the 22.1 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 get person details


The following example demonstrates how you can use the BMC Helix ITSM simplified API to retrieve the following details of a person record:

  • A list of the support groups the person belongs to.
  • Permission details for a logged in user.
  • Person details. 

To retrieve the support group details based on person ID

cURL example

curl --location --request GET 'http://clm-pun-v7w4l2:8008/api/com.bmc.dsm.itsm.itsm-rest-api/v2/person/Allen?fetchSupportGroups=Y'

Request URL

https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/v2/person/Allen?fetchSupportGroups=Y

Response body

{
   "status": "Success",
   "details": {
       "firstName": "Allen",
       "lastName": "Allbrook",
       "assigneeSupportGroups": [
           {
               "defaultGroup": false,
               "organization": "IT Support",
               "available": false,
               "name": "Backoffice Support",
               "company": "Calbro Services",
               "id": "SGP000000000009"
           },
           {
               "defaultGroup": false,
               "organization": "IT Support",
               "available": false,
               "name": "Frontoffice Support",
               "company": "Calbro Services",
               "id": "SGP000000000010"
           },
           {
               "defaultGroup": true,
               "organization": "IT Support",
               "available": false,
               "name": "Service Desk",
               "company": "Calbro Services",
               "id": "SGP000000000011"
           }
        ],
       "fullName": "Allen Allbrook",
       "personId": "PPL000000000013",
       "company": "Calbro Services",
       "id": "Allen"
   }
}


To retrieve permission details for a logged in user

cURL example

curl -X 'GET' \
 'https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/v2/person/permission?user=Allen&permissiontype=applicationpermission%2Fuserpermission' \
 -H 'accept: application/json'

Request URL

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

Response body

{
   "status": "Success",
   "details": {
       "loginId": "Allen",
       "firstName": "Allen",
       "lastName": "Allbrook",
       "fullName": "Allen Allbrook",
       "permission": [
           "Activity Config",
           "Activity User",
           "Approval Admin",
           "ASE-Administrator",
           "Asset Admin",
           "Asset Config",
           "Asset User",
           "Asset Viewer",
           "Browser",
           "Business Analyst",
           "Business Manager",
           "CM Dashboard User",
           "Command Event Master",
           "Config Categorization Admin",
           "Config Categorization User",
           "Config Group Mapping Admin",
           "Contact Location Admin",
           "Contact Organization Admin",
           "Contact People Admin",
           "Contact People HR Admin",
           "Contact People User",
           "Contact Support Admin",
           "Contract Admin",
           "Contract Config",
           "Cost Manager",
           "Customize",
           "DSL Master",
           "DSL Viewer",
           "Entitlement Administrator",
           "Incident Config",
           "Incident Master",
           "Incident Submitter",
           "Incident User",
           "Incident Viewer",
           "Infrastructure Change Config",
           "Infrastructure Change Master",
           "Infrastructure Change Submit",
           "Infrastructure Change User",
           "Infrastructure Change Viewer",
           "Licensing",
           "Notification Admin",
           "Problem Config",
           "Problem Master",
           "Problem Submitter",
           "Problem User",
           "Problem Viewer",
           "Purchasing User",
           "Receiving User",
           "Release Config",
           "Release Master",
           "Request Catalog Manager",
           "Requester Console Config",
           "Requester Console Master",
           "Security",
           "Service Request User",
           "SRM Administrator",
           "Summary Definition Config",
           "Task Administrator",
           "Task Application Config",
           "Task Manager",
           "Task Process Config",
           "Task User",
           "Work Order Config",
           "Work Order Master",
           "Work Order Submitter",
           "Work Order User",
           "Work Order Viewer"
        ]
   }
}

To retrieve person details based on the person ID

cURL example

curl -X 'GET' \
 'https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/v2/person/Allen' \
 -H 'accept: application/json'

Request URL

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

Response body

"{
    ""status"": ""Success"",
    ""details"": {
        ""firstName"": ""Allen"",
        ""lastName"": ""Allbrook"",
        ""fullName"": ""Allen Allbrook"",
        ""personId"": ""PPL000000000013"",
        ""company"": ""Calbro Services"",
        ""id"": ""Allen""
    }
}"

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

  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 the support group details based on person ID

    GET

    https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/v2/person/<person login ID>?fetchSupportGroups=Y

    To retrieve permission details for a logged in user

    GET

    https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/v2/person/permission?user=<person ID>&permissiontype=<permission type>

    To retrieve person details based on the person ID

    GET

    https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/v2/person/<person login ID>

  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*