List all policy IDs as per the last evaluation date specified.
Parameter |
Required/Optional |
Data Type |
Description |
---|---|---|---|
Request header: Authorization |
Required |
String |
JWT encrypted token. Note: Provide the token received from the Authorization API as the input. |
lastEvaluationDate
|
Optional |
Integer |
Compliance posture information records when the posture is equal to or greater than the specified date. You may also specify the time. The format for date and time is: YYYY-MM-DD or, YYYY-MM-DDTHH:MM:SSZ (UTC/GMT). |
API Request
curl -X GET https://<qualys_base_url>/pcrs/1.0/posture/policy/list-H "accept: */*"-H "Authorization: Bearer token"
JSON Output
{
"subscriptionId": "<SUBSCRIPTION ID>",
"policyList": [
{
"id": "<POLICY ID>",
"title": "VMWARE 5.5 AND 6.0",
"createdBy": "<USER NAME>",
"createdDate": "2018-01-19T07:52:11Z",
"modifiedBy": "<USER NAME>",
"modifiedDate": "2018-02-01T09:32:33Z",
"lastEvaluatedDate": "2019-12-19T06:38:46Z",
"status": "inactive",
"locked": 0
},
{
"id": "<POLICY ID>",
"title": "Windows Server 2012",
"createdBy": "<USER NAME>",
"createdDate": "2018-02-02T06:22:16Z",
"modifiedBy": "<USER NAME>",
"modifiedDate": "2018-02-22T10:06:25Z",
"lastEvaluatedDate": "2019-12-19T06:39:05Z",
"status": "inactive",
"locked": 0
},
{
"id": "<POLICY ID>",
"title": "Policy for HPUX",
"createdBy": "<USER NAME>",
"createdDate": "2018-04-23T07:14:16Z",
"modifiedBy": "<USER NAME>",
"modifiedDate": "2018-04-23T07:15:12Z",
"lastEvaluatedDate": "2019-12-19T06:37:51Z",
"status": "inactive",
"locked": 0
},
....
]
}
API Request
curl -X GET https://<qualys_base_url>/pcrs/1.0/posture/policy/list?lastEvaluationDate=2022-02-15T06:04:46Z-H "accept: */*"-H "Authorization: Bearer token"
JSON Output
{
"subscriptionId": "<SUBSCRIPTION ID>",
"policyList": [
{
"id": "<POLICY ID>",
"title": "ALL",
"createdBy": "<USER NAME>",
"createdDate": "2021-04-08T05:46:39Z",
"modifiedBy": "<USER NAME>",
"modifiedDate": "2021-06-16T11:38:54Z",
"lastEvaluatedDate": "2022-02-17T13:11:19Z",
"status": "inactive",
"locked": 0
},
{
"id": "<POLICY ID>",
"title": "udc_sp",
"createdBy": "<USER NAME>",
"createdDate": "2021-04-20T17:40:32Z",
"modifiedBy": "<USER NAME>",
"modifiedDate": "2021-04-20T17:44:48Z",
"lastEvaluatedDate": "2022-02-17T13:11:08Z",
"status": "inactive",
"locked": 0
},
{
"id": "<POLICY ID>",
"title": "10.115.95.138_agent_fromHostPolicy",
"createdBy": "<USER NAME>",
"createdDate": "2021-05-19T23:30:25Z",
"modifiedBy": "<USER NAME>",
"modifiedDate": "2021-05-19T23:31:53Z",
"lastEvaluatedDate": "2022-02-17T12:59:33Z",
"status": "inactive",
"locked": 0
},
.....
]
}