Fetch a List of Images in Your Account
Shows a list of images in your account.
Input ParametersInput Parameters
Parameter |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
filter |
Optional |
string |
Filter the containers list by providing a query using Qualys syntax. Refer to the 'Searching for Images' topic in the online help for assistance with creating your query. |
pageNumber |
Optional |
integer |
The page to be returned. Page numbers start with 1. |
pageSize |
Optional |
integer |
The number of records per page to be included in the response. |
sort |
Optional |
string |
Sort the results using a Qualys token. For example eventOccurred:desc. Refer to the “Sortable tokens” topic in the online help for more information. |
SampleSample
API request
curl -X GET
"<qualys_base_url>/csapi/v1.3/images?filter=imagesInUse:'[now-7d ... now]'&pageNumber=1&pageSize=50&sort=created%3Adesc"
-H "accept: application/json"
-H "Authorization: Bearer <token>"
Response
"data": [
{
"created": "1717026901000",
"updated": "1721714104046",
"lastUsedDate": "1721714104046",
"sha":
"4f67c83422ec747235357c04556616234e66fc3fa39cb4f40b2d4441ddd8f100",
"repo": [
{
"registry": "docker.io",
"tag": "latest",
"repository": "nginx"
}
],
"repoDigests": [
{
"registry": "docker.io",
"digest":
"0f04e4f646a3f14bf31d8bc8d885b6c951fdcf42589d06845f64d18aec6a3c4d",
"repository": "nginx"
}
],
"uuid": "16c984cf-7029-3cd9-951f-b9ef7d712059",
"size": 187667860,
"vulnerabilities": {
"severity5Count": 0,
"severity3Count": 0,
"severity4Count": 0,
"severity1Count": 0,
"severity2Count": 0
},
"imageId": "4f67c83422ec",
"associatedContainersCount": 0,
"associatedHostsCount": 1,
"lastVmScanDate": "1718652145295",
"registryUuid": null,
"source": [
"GENERAL"
],
"isDockerHubOfficial": false,
"scanType": null,
"scanTypes": [
"DYNAMIC"
],
"scanErrorCode": null,
"scanStatus": "SUCCESS",
"lastFoundOnHost": {
"sensorUuid": "e5c501d1-169e-4001-83d1-ca60ba35ef7d",
"hostname": "ip-10-**-8-**",
"ipAddress": "10.**.8.**",
"uuid": "b7b5ad35-41fd-4262-9cbf-bc2601a6b5f5",
"lastUpdated": "2024-06-12T06:54:09.796Z"
},
"exceptions": null,
"riskScore": 78,
"riskScoreCalculatedDate": 1721631694803,
"maxQdsScore": 65,
"qdsSeverity": MEDIUM,
"lastScannedBySensor": null,
"scanErrorMessage": null,
"criticality": 4,
"criticalityUpdated": 1717098843553,
"baseImage": null,
"childImagesCount": 0,
"sbomLayerProcessingTimestamp": null,
"baseImageProcessingTimestamp": null,
"compliance": {
"failCount": 2,
"passCount": 0,
"errorCount": 0
},
"lastComplianceScanDate": "1718175514362"
}
],
"count": 1
}
Sample with SCA ScanningSample with SCA Scanning
This is applicable for subscriptions with SCA Scanning enabled and for images scanned using SCA.
API request
curl -X GET
"<qualys_base_url>/csapi/v1.3/images?pageNumber=1&pageSize=50&sort=created%3Adesc"
-H "Authorization: Bearer <token>"
Response
{
"created": "1525522580000",
"updated": "1661479716359",
"sha": "0645d07d36305947d72a31282e2dd035f54fbeff6d9adb6701e9c72e75f675e8",
"repo": [
{
"registry": "docker.io",
"tag": "0.9.2",
"repository": "known"
}
],
"repoDigests": [
{
"registry": "docker.io",
"digest": "a3cfd95b4ff72c4f1f33aa98aae1d86b9ed1bfe050058fb46205540280e9937f",
"repository": "known"
}
],
"uuid": "38aa3900-f803-32a7-9806-39233e66b85c",
"size": 539069295,
"vulnerabilities": {
"severity5Count": 8,
"severity3Count": 54,
"severity4Count": 13,
"severity1Count": 1,
"severity2Count": 1
},
"imageId": "0645d07d3630",
"associatedContainersCount": 1,
"associatedHostsCount": 1,
"lastVmScanDate": "1661479716359",
"registryUuid": null,
"source": [
"GENERAL"
],
"isDockerHubOfficial": false,
"isInstrumented": false,
"instrumentedFrom": null,
"instrumentationState": null,
"scanType": null,
"scanTypes": [
"SCA",
"DYNAMIC"
],
"scanErrorCode": null,
...
}