{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/puzaricloud-in/json-schema/puzaricloud-in-monitor-in-schema.json",
  "title": "MonitorIn",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/puzaricloud-in-openapi.json#/components/schemas/MonitorIn",
  "properties": {
    "name": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ],
      "title": "Name"
    },
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Url",
      "description": "URL; host:port for tcp; domain for domain; provider slug or status URL for dependency; not used for heartbeat/flow"
    },
    "mode": {
      "type": "string",
      "pattern": "^(text|price|keyword|uptime|api|heartbeat|flow|tcp|domain|health|dependency)$",
      "title": "Mode",
      "default": "uptime"
    },
    "selector": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ],
      "title": "Selector"
    },
    "keyword": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 200
        },
        {
          "type": "null"
        }
      ],
      "title": "Keyword"
    },
    "keyword_rule": {
      "type": "string",
      "pattern": "^(appears|disappears)$",
      "title": "Keyword Rule",
      "default": "appears"
    },
    "price_rule": {
      "type": "string",
      "pattern": "^(any|below|above|pct)$",
      "title": "Price Rule",
      "default": "any"
    },
    "price_threshold": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Price Threshold"
    },
    "interval_minutes": {
      "type": "integer",
      "title": "Interval Minutes",
      "default": 5
    },
    "channel_ids": {
      "items": {
        "type": "integer"
      },
      "type": "array",
      "title": "Channel Ids",
      "default": []
    },
    "escalation_channel_ids": {
      "items": {
        "type": "integer"
      },
      "type": "array",
      "title": "Escalation Channel Ids",
      "default": []
    },
    "escalation_minutes": {
      "type": "integer",
      "title": "Escalation Minutes",
      "default": 0
    },
    "tags": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Tags",
      "default": []
    },
    "method": {
      "type": "string",
      "pattern": "^(GET|POST|PUT|PATCH|DELETE|HEAD)$",
      "title": "Method",
      "default": "GET"
    },
    "headers": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object",
      "title": "Headers",
      "default": {}
    },
    "body": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Body"
    },
    "expect_status": {
      "type": "string",
      "title": "Expect Status",
      "default": "2xx"
    },
    "assertions": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Assertions",
      "description": "One rule per line: contains X | json a.b == 1 | header content-type contains json"
    },
    "max_latency_ms": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Latency Ms"
    },
    "ssl_alert_days": {
      "type": "integer",
      "title": "Ssl Alert Days",
      "default": 14
    },
    "security_alerts": {
      "type": "boolean",
      "title": "Security Alerts",
      "default": false
    },
    "confirm_retry": {
      "type": "boolean",
      "title": "Confirm Retry",
      "default": true
    },
    "period_minutes": {
      "type": "integer",
      "title": "Period Minutes",
      "description": "heartbeat: expected ping period",
      "default": 60
    },
    "grace_minutes": {
      "type": "integer",
      "title": "Grace Minutes",
      "description": "heartbeat: allowed lateness",
      "default": 10
    },
    "schedule_cron": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Schedule Cron",
      "description": "heartbeat: cron expression instead of a period"
    },
    "schedule_tz": {
      "type": "string",
      "title": "Schedule Tz",
      "default": "UTC"
    },
    "max_duration_minutes": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Duration Minutes"
    },
    "hb_value_min": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Hb Value Min",
      "description": "heartbeat: alert when a success ping's ?value= is below this"
    },
    "hb_value_max": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Hb Value Max",
      "description": "heartbeat: alert when a success ping's ?value= is above this"
    },
    "repeat_alert_minutes": {
      "type": "integer",
      "title": "Repeat Alert Minutes",
      "default": 0
    },
    "steps": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Steps",
      "description": "flow: list of steps {name, method, url, headers, body, expect_status, assertions, extract}"
    },
    "domain_alert_days": {
      "type": "integer",
      "title": "Domain Alert Days",
      "default": 30
    },
    "dns_watch": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Dns Watch",
      "default": []
    },
    "health_secret": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Health Secret"
    },
    "agent_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Agent Id",
      "description": "private location id (Pro+)"
    },
    "slo_target": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Slo Target",
      "description": "e.g. 99.9"
    },
    "anomaly_alerts": {
      "type": "boolean",
      "title": "Anomaly Alerts",
      "default": false
    }
  },
  "type": "object"
}