{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/anomalyarmor-ai/json-schema/anomalyarmor-ai-create-drift-monitor-request-schema.json",
  "title": "CreateDriftMonitorRequest",
  "description": "Request to create a drift monitor.",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/docs.anomalyarmor.ai-openapi.json#/components/schemas/CreateDriftMonitorRequest",
  "properties": {
    "table_path": {
      "type": "string",
      "title": "Table Path",
      "description": "Table path (schema.table)"
    },
    "column_name": {
      "type": "string",
      "title": "Column Name",
      "description": "Column to monitor"
    },
    "column_type": {
      "type": "string",
      "enum": [
        "numeric",
        "categorical"
      ],
      "title": "Column Type",
      "description": "Column type: 'numeric' or 'categorical'"
    },
    "baseline_mode": {
      "type": "string",
      "enum": [
        "rolling",
        "fixed"
      ],
      "title": "Baseline Mode",
      "description": "Baseline mode: 'rolling' or 'fixed'",
      "default": "rolling"
    },
    "baseline_window_days": {
      "type": "integer",
      "maximum": 365.0,
      "minimum": 1.0,
      "title": "Baseline Window Days",
      "description": "Days to look back for rolling baseline (1-365)",
      "default": 7
    },
    "test_types": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Test Types",
      "description": "Tests to run: 'psi', 'ks', 'chi_squared'",
      "default": [
        "psi"
      ]
    },
    "psi_threshold": {
      "type": "number",
      "maximum": 1.0,
      "exclusiveMinimum": 0.0,
      "title": "Psi Threshold",
      "description": "PSI threshold for drift (0 < x <= 1)",
      "default": 0.25
    },
    "ks_threshold": {
      "type": "number",
      "maximum": 1.0,
      "exclusiveMinimum": 0.0,
      "title": "Ks Threshold",
      "description": "KS p-value threshold (0 < x <= 1)",
      "default": 0.05
    },
    "chi_squared_threshold": {
      "type": "number",
      "maximum": 1.0,
      "exclusiveMinimum": 0.0,
      "title": "Chi Squared Threshold",
      "description": "Chi-squared p-value threshold (0 < x <= 1)",
      "default": 0.05
    },
    "capture_interval": {
      "type": "string",
      "enum": [
        "hourly",
        "daily",
        "weekly"
      ],
      "title": "Capture Interval",
      "description": "Capture interval: 'hourly', 'daily', 'weekly'",
      "default": "daily"
    },
    "histogram_bins": {
      "type": "integer",
      "maximum": 100.0,
      "minimum": 5.0,
      "title": "Histogram Bins",
      "description": "Bins for numeric histograms (5-100)",
      "default": 20
    },
    "max_categories": {
      "type": "integer",
      "maximum": 10000.0,
      "minimum": 10.0,
      "title": "Max Categories",
      "description": "Max categories for categorical (10-10000)",
      "default": 1000
    }
  },
  "type": "object",
  "required": [
    "table_path",
    "column_name",
    "column_type"
  ]
}