Page tree

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: 

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

Example

http://tspspanna:80/tsws/10.0/api/unifiedadmin/Policy/policy201/list?&idType=name

Entry

Description

http|https

Type of protocol to send the request. Infrastructure Management support both HTTP and HTTPS protocols.

serverHost

Host name of the BMC TrueSight Infrastructure Management Server that has Central Monitoring Administration

port

Port number through which communication is established. The default port number is 80 if you use the HTTP protocol and 443 if you use the HTTPS protocol.

policyIdentifier

Identifier of the policy. The supported identifiers are as follows:

  • name of the policy
  • ID of the policy

identifierType

Type of the identifier that you have provided in the request. You can provide multiple identifiers, separated by commas. 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:

{
    "listResult": [
        {
            "monitoringPolicy": {
                "agentConfigData": {
                    "agentTag": "host123_agent_tag", 
                    "agentPort": "3183", 
                    "publishedHostName": "host123", 
                    "domainName": "adprod.bmc.com", 
                    "isphoneHome": {
                        "istype": "single", 
                        "name": "leaf_host_IS_name"
                    }, 
                    "remoteCell": "ISCell"
                }, 
                "agentSelectionCriteria": "agentTag EQUALS \"Windows_agent_Policy\" OR  agentOS CONTAINS \"Windows\"", 
                "enabled": true, 
                "tenant": {
                    "name": "GLOBAL", 
                    "id": "GLOBAL"
                }, 
                "precedence": 999, 
                "name": "policy123", 
                "policyId": "id_2", 
                "type": "monitoring", 
                "description": "description"
            }, 
            "statusCode": "200", 
            "statusMsg": "OK"
        }
    ], 
    "statusCode": "200", 
    "statusMsg": "OK", 
    "responseTimeStamp": "2012-07-25T07:34:36",
}