Listing details for a specific policy

The list API uses the GET method to list a policy. You must provide authentication credentials by using the login API before accessing the data. For information about the authentication process, see Web services authentication .

URL to access the list API

The generic format of a URL for the list API is as follows: 

https://<TSPShostname>:<port>/tsws/10.0/api/unifiedadmin/Policy/
<policyIdentifier>/list?&idType=<identifierType>

Example

https://tsps105:443/tsws/10.0/api/unifiedadmin/Policy/policy201/list?&idType=name

Entry

Description

https|http

Type of protocol to send the request. BMC TrueSight Presentation Server supports HTTPS protocol by default. You can use HTTP protocol as well.

serverHost

Host name of the Presentation Server.

port

Port number through which communication is established. By default, the HTTPS protocol is supported and the default port number is 443. If you use HTTP protocol, use the port number 80.

policyIdentifier

Identifier of the policy. You can provide multiple identifiers, separated by commas. The supported identifiers are as follows:

  • name of the policy
  • ID of the policy

idType or identifierType

Type of the identifier that you have provided in the request. The supported values are as follows, and the default value is name.

  • name
  • id

Response information for the list API

A sample JSON response is as follows:

{
  "responseTimeStamp": "2016-07-01T01:31:36",
  "statusCode": "200",
  "statusMsg": "OK",
  "response": [
    {
      "resourceId": "1bc34b07-3e28-4a3e-8a0f-136fe1234171",
      "resourceName": "Test",
      "statusCode": "200",
      "statusMsg": "OK",
      "monitoringPolicy": {
        "id": "1bc34b07-3e28-4a3e-8a0f-136fe1234171",
        "name": "Test",
        "type": "monitoring",
        "description": "Demo",
        "tenant": {
          "name": "*",
          "id": "*"
        },
        "precedence": 900,
        "agentSelectionCriteria": "agentTag EQUALS \"abc.bmc.com\" ",
        "associatedUserGroup": "Administrators",
        "owner": "admin",
        "creationTime": 1467379838257,
        "monitorConfiguration": {
          "configurations": [
            {
              "solutionName": "iak",
              "solutionVersion": "1.1.00",
              "monitoringProfile": "IAK_Process",
              "monitors": [
                {
                  "monitorType": "IAK_Process_Container",
                  "configuration": [
                    {
                      "id": "processes",
                      "value": "bash_process",
                      "details": [
                        {
                          "id": "procInst",
                          "value": "bash_process",
                          "details": null,
                          "secure": false,
                          "mapDetails": {
                            "/procInst": "bash_process"
                          }
                        }
                      ],
                      "secure": false,
                      "mapDetails": {
                        "/processes/bash_process/procInst": "bash_process"
                      }
                    },
                    {
                      "id": "processes",
                      "value": "bash_process",
                      "details": [
                        {
                          "id": "procMinCnt",
                          "value": "1",
                          "details": null,
                          "secure": false,
                          "mapDetails": {
                            "/procMinCnt": "1"
                          }
                        }
                      ],
                      "secure": false,
                      "mapDetails": {
                        "/processes/bash_process/procMinCnt": "1"
                      }
                    },
                    {
                      "id": "processes",
                      "value": "bash_process",
                      "details": [
                        {
                          "id": "procMaxCnt",
                          "value": "1",
                          "details": null,
                          "secure": false,
                          "mapDetails": {
                            "/procMaxCnt": "1"
                          }
                        }
                      ],
                      "secure": false,
                      "mapDetails": {
                        "/processes/bash_process/procMaxCnt": "1"
                      }
                    },
                    {
                      "id": "processes",
                      "value": "bash_process",
                      "details": [
                        {
                          "id": "procOwnFilterEnabled",
                          "value": "0",
                          "details": null,
                          "secure": false,
                          "mapDetails": {
                            "/procOwnFilterEnabled": "0"
                          }
                        }
                      ],
                      "secure": false,
                      "mapDetails": {
                        "/processes/bash_process/procOwnFilterEnabled": "0"
                      }
                    },
                    {
                      "id": "processes",
                      "value": "bash_process",
                      "details": [
                        {
                          "id": "isParentProcInit",
                          "value": "0",
                          "details": null,
                          "secure": false,
                          "mapDetails": {
                            "/isParentProcInit": "0"
                          }
                        }
                      ],
                      "secure": false,
                      "mapDetails": {
                        "/processes/bash_process/isParentProcInit": "0"
                      }
                    },
                    {
                      "id": "processes",
                      "value": "bash_process",
                      "details": [
                        {
                          "id": "procPpid1FilterEnabled",
                          "value": "0",
                          "details": null,
                          "secure": false,
                          "mapDetails": {
                            "/procPpid1FilterEnabled": "0"
                          }
                        }
                      ],
                      "secure": false,
                      "mapDetails": {
                        "/processes/bash_process/procPpid1FilterEnabled": "0"
                      }
                    },
                    {
                      "id": "processes",
                      "value": "bash_process",
                      "details": [
                        {
                          "id": "procAlertDelayCount",
                          "value": "1",
                          "details": null,
                          "secure": false,
                          "mapDetails": {
                            "/procAlertDelayCount": "1"
                          }
                        }
                      ],
                      "secure": false,
                      "mapDetails": {
                        "/processes/bash_process/procAlertDelayCount": "1"
                      }
                    },
                    {
                      "id": "processes",
                      "value": "bash_process",
                      "details": [
                        {
                          "id": "procAlertState",
                          "value": "0",
                          "details": null,
                          "secure": false,
                          "mapDetails": {
                            "/procAlertState": "0"
                          }
                        }
                      ],
                      "secure": false,
                      "mapDetails": {
                        "/processes/bash_process/procAlertState": "0"
                      }
                    },
                    {
                      "id": "processes",
                      "value": "bash_process",
                      "details": [
                        {
                          "id": "procString",
                          "value": "bash",
                          "details": null,
                          "secure": false,
                          "mapDetails": {
                            "/procString": "bash"
                          }
                        }
                      ],
                      "secure": false,
                      "mapDetails": {
                        "/processes/bash_process/procString": "bash"
                      }
                    }
                  ]
                }
              ],
              "defaultMonitoring": false
            }
          ]
        },
        "shared": false,
        "enabled": true
      }
    }
  ]
}
Was this page helpful? Yes No Submitting... Thank you

Comments

  1. Chase Colvin

    I had some longer comments here, but after further testing I realize I was misunderstanding the documentation due to the way it is organized. Unfortunately it took me several hours of testing to realize this.

    I think the line "You can provide multiple identifiers, separated by commas." needs to be moved to the description for policyIdentifier instead of for identifierType.

    There are three issues I've found with this:

    One: "identifierType" is also a valid URI parameter name when used in place of "idType".

    Two: That combined with that line, "You can provide multiple identifiers, separated by commas.", being where it is, it seems that it is referring to the identifierType parameter, and not the policyIdentifier parameter.

    Three: The fact that you can actually feed in a comma separated list of identifierTypes when using "identifierType" as the parameter name instead of "idType". And it appears to work, until you try also feeding a comma separated list of policyIdentifiers.

    This is a strange one, and I've spent entirely too much time here trying to make sense of it. So I hope my explanation is clear, as I might not be thinking clearly at this point.

    Jan 16, 2020 05:51
    1. Harihara Subramanian

      Hi Chase Colvin,

      I have responded to you by an email. Please confirm the changes, so that I can publish it.


      Thanks,

      Hari

      Feb 07, 2020 03:06