Update a Registry Schedule

Updates an existing registry schedule. Jobs in the running state cannot be updated.

PUT/v1.3/registry/{registryId}/schedule/{scheduleId}

Input ParametersInput Parameters

Parameter

Mandatory/Optional

Data Type

Description

registryId

Mandatory

string

ID/UUID of the registry you want to update.

scheduleId

Mandatory

string

ID/UUID of the schedule you want to update.

Request body

Mandatory

-

Specify the request body parameters as explained under the Request Body Parameters section below.

Request Body ParametersRequest Body Parameters

Parameter

Mandatory/Optional

Data Type

Description

OnDemand

Mandatory 

 Boolean

Specify true if you want to enable OnDemand scan. Otherwise, Automatic scan will be triggered everyday at a set time. (This parameter cannot be updated, as you can update only Automatic scan jobs.)

repo

Mandatory 

 string

Provide the name of the repository you want to scan.

You can add one more repositories to a single scan schedule. (This parameter cannot be updated.)

tag

Mandatory 

string 

For an OnDemand scan, include image tags you want to include in the scan (comma separated values).

(This parameter cannot be updated, as you can update only Automatic scan jobs.)

days

Mandatory 

 integer

For an OnDemand scan, include images created certain days ago.

Enter 1-7 days or 14 (for last two weeks).

(This parameter cannot be updated, as you can update only Automatic scan jobs.)

scheduleScanIntervalInDays

Mandatory 

 integer

For an Automatic scan, specify how often the scan should run in days (1-365).

For example, set to 1 to scan daily, set to 7 to scan every 7 days, set to 10 to scan every 10 days, etc.

weekDay Mandatory (for weekly automatic scan schedules)  string

For an automatic registry scan schedule, specify a day on which the scan is triggered every week.

The value is the name of a day. For example, MONDAY, TUESDAY, or WEDNESDAY.

This field is valid only when the "scheduleIntervalInDays "parameter has a value of 7.

schedule

Mandatory 

 string

Valid only when scheduleScanIntervalInDays=1

For a daily Automatic scan, specify the scan start time in UTC (e.g., 19:30).

forceScan

Mandatory 

 Boolean

The Force Registry Image Scan feature must be enabled for your subscription.

When enabled, this option is valid for OnDemand scans and for Automatic scans when scheduleScanIntervalInDays is 7 or greater.

Specify "true" if you want to scan all images each time the registry scan is launched. This means each scan job will scan new images and re-scan previously found images.

The default value is "false".

Sample - Maximum Number of Images to Scan Fetched using a Created DateSample - Maximum Number of Images to Scan Fetched using a Created Date

API request

    curl -X POST
"<qualys_base_url>/csapi/v1.3/registry/fd05c5d5-7583-4e47-b538-c8b414bd9c86/schedule"
-H "accept: application/json"
-H "Authorization: Bearer <token>"
-H "Content-Type: application/json"
    

Request Body

    {
    "filters": [
        {
            "days": 90,
            "repoTags": [
                {
                    "repo": "azuretest",
                    "tag": null
                }
            ]
        }
    ],
    "name": "Automatic Scan Schedule",
    "onDemand": false,
    "schedule": "06:55",
    "forceScan": true,
    "registryType": "Azure",
    "scheduleIntervalInDays": 7,
    "additionalFilters": null,
    "weekDay": "THURSDAY"
}
    

Response

    {
    "scheduleUuid": "889ea97d-5b9c-4e34-9783-a40eae8d8feb"
}
    

Sample - Maximum Number of Images to Scan Fetched using Image TagsSample - Maximum Number of Images to Scan Fetched using Image Tags

API request

    curl -X POST
"<qualys_base_url>/csapi/v1.3/registry/fd05c5d5-7583-4e47-b538-c8b414bd9c86/schedule"
-H "accept: application/json"
-H "Authorization: Bearer <token>"
-H "Content-Type: application/json"
    

Request Body

    {
    "filters": [
        {
            "days": null,
            "repoTags": [
                {
                    "repo": "azuretest",
                    "tag": null
                }
            ]
        }
    ],
    "name": "Automatic Scan Schedule",
    "onDemand": false,
    "schedule": "09:30",
    "forceScan": true,
    "registryType": "Azure",
    "scheduleIntervalInDays": 1,
    "additionalFilters": {
        "numberOfTags": 5,
        "sortCriteria": "createdDate"
    },
    "weekDay": "THURSDAY"
}
    

Response

    {
"scheduleUuid": "094ef321-e601-4fb3-b378-7a62f13249de"
}