{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/intruder/main/json-schema/intruder-scan-schema.json",
  "title": "Scan",
  "x-generated": "2026-10-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/intruder-api-openapi.yml#/components/schemas/Scan",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "readOnly": true,
      "description": "Name of the scan."
    },
    "status": {
      "allOf": [
        {
          "$ref": "#/$defs/ScanStatusField"
        }
      ],
      "readOnly": true
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "target_addresses": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Target addresses to include in scan."
    },
    "scan_type": {
      "allOf": [
        {
          "$ref": "#/$defs/ScanTypeEnum"
        }
      ],
      "readOnly": true
    },
    "throttled": {
      "type": "boolean",
      "default": false
    },
    "web_ports_only": {
      "type": "boolean",
      "default": false
    },
    "schedule_period": {
      "allOf": [
        {
          "$ref": "#/$defs/SchedulePeriodEnum"
        }
      ],
      "readOnly": true
    },
    "start_time": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "readOnly": true
    },
    "completed_time": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "readOnly": true
    }
  },
  "required": [
    "completed_time",
    "created_at",
    "id",
    "name",
    "scan_type",
    "schedule_period",
    "start_time",
    "status"
  ],
  "$defs": {
    "ScanStatusField": {
      "type": "string",
      "enum": [
        "in_progress",
        "completed",
        "cancelled",
        "cancelled_no_active_targets",
        "cancelled_no_valid_targets",
        "analysing_results"
      ]
    },
    "ScanTypeEnum": {
      "enum": [
        "assessment_schedule",
        "new_service",
        "cloudbot_new_target",
        "rapid_remediation",
        "advisory",
        "cloud_security",
        "container_image"
      ],
      "type": "string",
      "description": "* `assessment_schedule` - ASSESSMENT_SCHEDULE\n* `new_service` - NEW_SERVICE\n* `cloudbot_new_target` - CLOUDBOT_NEW_TARGET\n* `rapid_remediation` - RAPID_REMEDIATION\n* `advisory` - ADVISORY\n* `cloud_security` - CLOUD_SECURITY\n* `container_image` - CONTAINER_IMAGE"
    },
    "SchedulePeriodEnum": {
      "type": "string",
      "enum": [
        "monthly",
        "daily",
        "one_off",
        "weekly",
        "quarterly"
      ]
    }
  }
}