Scan Modes

Create scan mode

Creates a new scan mode with the provided configuration

post/api/scan-modes

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 created successfully

idstring required

The unique identifier of the entity.

createdAtstring required

Represents an instant in time as an ISO 8601 string.

updatedAtstring required

Represents an instant in time as an ISO 8601 string.

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. Empty when type is "interval".

activationWindowExpiredboolean required

Whether the activation window can never trigger again (for instance its end date is already past). Computed server-side; drives a non-blocking warning in the UI.

Example response

{
  "id": "entity123",
  "createdBy": {
    "id": "abc123",
    "friendlyName": "John Doe (john.doe)"
  },
  "updatedBy": {
    "id": "abc123",
    "friendlyName": "John Doe (john.doe)"
  },
  "createdAt": "2023-10-31T12:34:56.789Z",
  "updatedAt": "2023-10-31T12:34:56.789Z",
  "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"
      }
    }
  }
}

Changes