View Registry Scan Progress
GET/api/v32.07/registry/progress
x-prisma-cloud-target-env: {"permission":"monitorImages"}
Shows the progress of an ongoing regular or on-demand registry scan. By default, the API endpoint displays the progress of a regular scan.
View regular registry scan progress
For a regular scan, use the API path only without any query parameters.
Note: The
hostname
andscanTime
fields will not be populated fordiscovery
andimageScan
parameters in the API response.
cURL Request
Refer to the following example cURL request that retrieves the ongoing scan details for a regular registry scan:
$ curl -k \
-u <USER> \
-H 'Content-Type: application/json' \
-X GET \
"https://<CONSOLE>/api/v<VERSION>/registry/progress"
cURL Response
Refer to the following example cURL response:
[
{
"discovery": {
"id": "",
"type": "",
"discovery": false,
"total": 4,
"scanned": 2,
"title": "Step 1/2 discovering tags in registry us-west2-docker.pkg.dev: Discovered tags in 2/4 repositories with 1 Defenders"
},
"imageScan": {
"id": "",
"type": "",
"discovery": false,
"total": 2,
"scanned": 0,
"title": "Step 2/2 scanning images in registry us-west2-docker.pkg.dev: Scanned 0/2 images with 1 Defender"
},
"isScanOngoing": true
"specScanStartTime": "0001-01-01T00:00:00Z"
}
]
View on-demand registry scan progress
For an on-demand scan that is started using the /registry/scan
endpoint with the following fields:
- onDemand: (Mandatory) Set the parameter to
true
. - repo: (Mandatory) Specify the repository name.
- tag: Specify the image tag (alias of image ID).
- digest: Specify the image digest identifier.
Note: You must specify either
tag
ordigest
along with the mandatory parametersonDemand
andrepo
to view the progress.
cURL Request
Refer to the following example cURL request that retrieves the ongoing scan details for an on-demand registry scan that is started using the /registry/scan
endpoint for the repository alpine
with tag 3.16
:
$ curl -k \
-u <USER> \
-H 'Content-Type: application/json' \
-X GET \
"https://<CONSOLE>/api/v<VERSION>/registry/progress?onDemand=true&repo=library/alpine&tag=3.16"
cURL Response
Refer to the following example cURL response:
[
{
"discovery": {
"id": "",
"type": "",
"discovery": false,
"total": 1,
"scanned": 1,
"title": "Step 1/2 discovering tags in repository: library/alpine, tag: 3.16"
},
"imageScan": {
"id": "",
"type": "",
"discovery": false,
"total": 1,
"scanned": 1,
"title": "Step 2/2 scanning images in repository: library/alpine, tag: 3.16"
},
"isScanOngoing": false
"specScanStartTime": "0001-01-01T00:00:00Z"
}
]
Important:
- If you use on-demand scan related parameters such as
registry
,repo
, ortag
but set the query parameteronDemand
tofalse
, you'll get a bad request error (400).- If an on-demand scan was completed and you get the progress response for that scan (i.e. "isScanOngoing": false), the next progress response for that image will be an empty list:
[]
, until you initiate another on-demand scan for that image.
Request
Query Parameters
OnDemand indicates the requested progress is for an on-demand scan.
Registry is the image's registry.
Repository is the image's repository.
Tag is the image's tag.
Digest is the image's digest.
Responses
- 200
- default
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
discovery object
Progress displays the scan progress
AISInitialScanInProgress indicates whether agentless next-gen first scheduled scan is in progress.
AISOnDemandScanInProgress indicates whether agentless next-gen on demand scan is in progress.
Discovery indicates whether the scan is in discovery phase.
Error is the error that happened during scan.
Hostname is the hostname for which the progress apply.
ID is the ID of the entity being scanned.
OnDemand indicates whether the scan was triggered by the user or not (scheduled scan).
ScanTime is the time of scan.
Scanned is the number of entities for which the scan completed.
Title is the progress title (set by the scanning process).
Total is the total amount of entities that should be scanned.
Possible values: [image,ciImage,container,host,agentlessHost,registry,serverlessScan,ciServerless,vm,tas,ciTas,cloudDiscovery,serverlessRadar,serverlessAutoDeploy,hostAutoDeploy,codeRepo,ciCodeRepo
]
ScanType displays the components for an ongoing scan
imageScan object
Progress displays the scan progress
AISInitialScanInProgress indicates whether agentless next-gen first scheduled scan is in progress.
AISOnDemandScanInProgress indicates whether agentless next-gen on demand scan is in progress.
Discovery indicates whether the scan is in discovery phase.
Error is the error that happened during scan.
Hostname is the hostname for which the progress apply.
ID is the ID of the entity being scanned.
OnDemand indicates whether the scan was triggered by the user or not (scheduled scan).
ScanTime is the time of scan.
Scanned is the number of entities for which the scan completed.
Title is the progress title (set by the scanning process).
Total is the total amount of entities that should be scanned.
Possible values: [image,ciImage,container,host,agentlessHost,registry,serverlessScan,ciServerless,vm,tas,ciTas,cloudDiscovery,serverlessRadar,serverlessAutoDeploy,hostAutoDeploy,codeRepo,ciCodeRepo
]
ScanType displays the components for an ongoing scan
IsScanOngoing indicates if a scan is currently ongoing.
SpecScanStartTime indicates when the current spec scan started.
[
{
"discovery": {
"aisInitialScanInProgress": true,
"aisOnDemandScanInProgress": true,
"discovery": true,
"error": "string",
"hostname": "string",
"id": "string",
"onDemand": true,
"scanTime": "2024-07-29T15:51:28.071Z",
"scanned": 0,
"title": "string",
"total": 0,
"type": [
"image",
"ciImage",
"container",
"host",
"agentlessHost",
"registry",
"serverlessScan",
"ciServerless",
"vm",
"tas",
"ciTas",
"cloudDiscovery",
"serverlessRadar",
"serverlessAutoDeploy",
"hostAutoDeploy",
"codeRepo",
"ciCodeRepo"
]
},
"imageScan": {
"aisInitialScanInProgress": true,
"aisOnDemandScanInProgress": true,
"discovery": true,
"error": "string",
"hostname": "string",
"id": "string",
"onDemand": true,
"scanTime": "2024-07-29T15:51:28.071Z",
"scanned": 0,
"title": "string",
"total": 0,
"type": [
"image",
"ciImage",
"container",
"host",
"agentlessHost",
"registry",
"serverlessScan",
"ciServerless",
"vm",
"tas",
"ciTas",
"cloudDiscovery",
"serverlessRadar",
"serverlessAutoDeploy",
"hostAutoDeploy",
"codeRepo",
"ciCodeRepo"
]
},
"isScanOngoing": true,
"specScanStartTime": "2024-07-29T15:51:28.071Z"
}
]