Listing details for all the policies
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.
URL to access the list API
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
Response information for the list API
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",
}
"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",
}
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*