You can fetch the list of scans that you have triggered by you. You could also use filters to narrow down the scan list. For example, filter such as status of the scan (SUBMITTED, PROCESSING, or FINISHED) to view scans that are in particular state.
Parameter |
Mandatory/Optional | Data Type |
Description |
filter |
Optional | String |
Filter the scan list by providing a query using filters we support. The following search filters are supported: - scanUuid: Unique identifier assigned to the IaC scan. The scan UUID is returned in the response of Trigger IaC scan after the scan is completed. - status: status of the scan - SUBMITTED, PROCESSING, or FINISHED. - tag.key & tag.value: Use a text value ##### to define the key and value of the tag assigned to the resource (case sensitive). For example, using the status:FINISHED filter in the curl request fetches all scans that are completed. - scanDate:[start date .. end date]: Use a date range or a specific date on which the scan was triggered. For more information on how to enter dates, see Date Queries. |
pageNo |
Optional | Integer |
The page to be returned. |
pageSize |
Optional | Integer |
The number of records per page to be included in the response. |
API request
curl -X GET
"https://<QualysBaseURL>/cloudview-api/rest/v1/iac/getScanList?filter=scanUuid:337a21ef-3c53-43bf-aed6-46f04e1c542d AND tag.value:Value AND tag.key:Key AND status:FINISHED AND scanDate:%5B2021-06-15%20...%202021-06-24%5D&pageNo=0&pageSize=80"
-H 'authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXX'
Response
{
"content": [
{
"scanUuid": "337a21ef-3c53-43bf-aed6-46f04e1c542d",
"tags": [
{
"key": "Key",
"value": "Value"
}
],
"scanDate": "2021-06-16T12:05:03.889+00:00",
"status": "FINISHED",
"name": "FilterTrue"
},
],
"pageable": {
"sort": {
"sorted": true,
"unsorted": false
},
"pageSize": 50,
"pageNumber": 0,
"offset": 0,
"paged": true,
"unpaged": false
},
"totalPages": 3,
"totalElements": 140,
"last": false,
"number": 0,
"size": 50,
"numberOfElements": 50,
"sort": {
"sorted": true,
"unsorted": false
},
"first": true
}