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 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/list?&responseType=basic&withCount=<totalCount>&forSearch=<SearchCondition>
Request body
While running this request, you can specify conditions or filter criteria based on which a list of policies is returned. These conditions can be specified in the request body parameters.
Specifying the conditions is optional. If you run the request with a blank body, the API returns a list of all the policies configured.
The following sample can help you understand the structure of the request body. For more information about the parameters included in the request body, see Parameter definitions.
"filterCriteria": {
"policyEnabledStatus": "ENABLED",
"policySharedStatus": "ANY",
"monitoringSolutionName": "",
"monitoringSolutionVersion": "",
"monitoringProfile": "",
"monitoringType": "",
"tenantId": ""
},
"stringToSearch": "",
"fieldToSearch": "",
"type": "monitoringpolicy"
}
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": 900,
"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",
}
Parameter definitions
The following parameters can be used in the request body.