Skip to main content

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 and scanTime fields will not be populated for discovery and imageScan 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 or digest along with the mandatory parameters onDemand and repo 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, or tag but set the query parameter onDemand to false, 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 boolean

    OnDemand indicates the requested progress is for an on-demand scan.

    registry string

    Registry is the image's registry.

    repo string

    Repository is the image's repository.

    tag string

    Tag is the image's tag.

    digest string

    Digest is the image's digest.

Responses

Schema
  • Array [
  • discovery object

    Progress displays the scan progress

    aisInitialScanInProgress boolean

    AISInitialScanInProgress indicates whether agentless next-gen first scheduled scan is in progress.

    aisOnDemandScanInProgress boolean

    AISOnDemandScanInProgress indicates whether agentless next-gen on demand scan is in progress.

    discovery boolean

    Discovery indicates whether the scan is in discovery phase.

    error string

    Error is the error that happened during scan.

    hostname string

    Hostname is the hostname for which the progress apply.

    id string

    ID is the ID of the entity being scanned.

    onDemand boolean

    OnDemand indicates whether the scan was triggered by the user or not (scheduled scan).

    scanTime date-time

    ScanTime is the time of scan.

    scanned integer

    Scanned is the number of entities for which the scan completed.

    title string

    Title is the progress title (set by the scanning process).

    total integer

    Total is the total amount of entities that should be scanned.

    type shared.ScanType (string)

    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 boolean

    AISInitialScanInProgress indicates whether agentless next-gen first scheduled scan is in progress.

    aisOnDemandScanInProgress boolean

    AISOnDemandScanInProgress indicates whether agentless next-gen on demand scan is in progress.

    discovery boolean

    Discovery indicates whether the scan is in discovery phase.

    error string

    Error is the error that happened during scan.

    hostname string

    Hostname is the hostname for which the progress apply.

    id string

    ID is the ID of the entity being scanned.

    onDemand boolean

    OnDemand indicates whether the scan was triggered by the user or not (scheduled scan).

    scanTime date-time

    ScanTime is the time of scan.

    scanned integer

    Scanned is the number of entities for which the scan completed.

    title string

    Title is the progress title (set by the scanning process).

    total integer

    Total is the total amount of entities that should be scanned.

    type shared.ScanType (string)

    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 boolean

    IsScanOngoing indicates if a scan is currently ongoing.

    specScanStartTime date-time

    SpecScanStartTime indicates when the current spec scan started.

  • ]
Loading...