The list API uses the POST method to list information about all the policies. You must provide authentication credentials by using the login API before accessing the data. For information about the authentication process, see TSWS Web service authentication.
The generic format of a URL for the list API is as follows:
http|https://<serverHost>:<port>/tsws/10.0/api/unifiedadmin/Policy/list?&responseType=basic
Example
http://tspswsserver:80/tsws/10.0/api/unifiedadmin/Policy/list?&responseType=basic
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. |
responseType=basic | Specifies to retrieve the basic information of the policies |
A sample JSON response is as follows:
{ "response": [ { "blackoutPolicy": { "name": "policy123_blackout", "id": "90c6ea33-ee91-4740-9dda-6f28c8496122", "type": "blackout", "enabled": true, "tenant": { "name": "GLOBAL", "id": "GLOBAL" }, "description": "description", "precedence": 999, "agentSelectionCriteria": { "criteria": { "value": "10.10.10.100- 10.10.10.200", "identifier": "agentIP", "operator": "IN_RANGE", "groupingOperator": null, "leftExpression": null, "rightExpression": null } } }, "statusMsg": "OK", "statusCode": "200", "resourceName": "policy123_blackout", "resourceId": "90c6ea33-ee91-4740-9dda-6f28c8496122" } ], "statusMsg": "OK", "statusCode": "200", "responseTimeStamp": "2013-01-22T09:20:34", }