Scan Modes

Update scan mode

Updates an existing scan mode with new configuration

put/api/scan-modes/{scanModeId}

Path parameters

scanModeIdstring required

Request body

namestring required

The name of the scan mode.

descriptionstring required

A description of the scan mode's purpose or behavior.

type'cron' | 'interval' required

How a scan mode decides when to tick.

  • cron: driven by a cron expression (the historical behaviour).
  • interval: driven by a fixed period between ticks.
cronstring required

A cron expression defining the scan schedule. Ignored when type is "interval".

Example request

{
  "name": "Daily Backup Scan",
  "description": "Scans for new backup data every day at midnight",
  "cron": "0 0 * * *",
  "interval": {
    "value": 30
  },
  "activationWindow": {
    "dateRange": {
      "start": "2023-10-31T12:34:56.789Z",
      "end": "2023-10-31T12:34:56.789Z"
    },
    "recurring": {
      "timezone": "Europe/Paris",
      "daysOfWeek": [
        6,
        0
      ],
      "timeOfDay": {
        "start": "12:34:56",
        "end": "12:34:56"
      }
    }
  }
}

Response

Scan mode updated successfully

Changes