{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ibm-api-connect/json-schema/ibm-api-connect-scan-schema.json",
  "title": "Scan",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ibm-api-connect-compliance-api-openapi.yml#/components/schemas/Scan",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "type": {
      "type": "string",
      "readOnly": true,
      "enum": [
        "scan"
      ]
    },
    "api_version": {
      "type": "string",
      "readOnly": true,
      "enum": [
        "2.0.0"
      ]
    },
    "id": {
      "type": "string",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "maxLength": 255
    },
    "title": {
      "type": "string",
      "maxLength": 1023
    },
    "summary": {
      "type": "string",
      "maxLength": 65535
    },
    "scope": {
      "type": "string"
    },
    "collection": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "parent_id": {
          "type": "string"
        },
        "parent_name": {
          "type": "string"
        },
        "parent_title": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "catalog",
            "space",
            "org"
          ]
        },
        "location": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "config": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "documents": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "documents_scanned": {
      "type": "integer"
    },
    "progress": {
      "type": "integer"
    },
    "reports": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "type": "string"
          },
          "report_url": {
            "type": "string",
            "format": "uri"
          },
          "scan_result": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "errors": {
                "type": "string"
              },
              "warnings": {
                "type": "string"
              },
              "infos": {
                "type": "string"
              },
              "hints": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "scan_result": {
      "type": "string"
    },
    "status": {
      "type": "integer"
    },
    "scan_type": {
      "type": "string"
    },
    "tagged_rulesets": {
      "type": "object",
      "additionalProperties": true
    },
    "raw_tags": {
      "type": "object",
      "additionalProperties": true
    },
    "enforcement_config": {
      "type": "object",
      "additionalProperties": true
    },
    "is_gateway_scan": {
      "type": "boolean"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "url": {
      "type": "string",
      "readOnly": true,
      "format": "uri"
    },
    "is_cron_active": {
      "type": "boolean",
      "x-bhendi-db-type": "transient",
      "description": "Indicates if the scan schedule is active"
    },
    "last_run": {
      "type": "string",
      "format": "date-time",
      "x-bhendi-db-type": "transient",
      "description": "Timestamp of the last scheduled scan execution"
    },
    "next_run": {
      "type": "string",
      "format": "date-time",
      "x-bhendi-db-type": "transient",
      "description": "Timestamp of the next scheduled scan execution"
    },
    "cron_expression": {
      "type": "string",
      "x-bhendi-db-type": "transient",
      "description": "Cron expression defining the scan schedule"
    },
    "cron_object": {
      "type": "object",
      "additionalProperties": true,
      "x-bhendi-db-type": "transient",
      "description": "Parsed cron schedule object"
    }
  }
}