{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pingzen-dev/json-schema/pingzen-dev-test-connection-request-schema.json",
  "title": "TestConnectionRequest",
  "description": "Request schema for testing a connection before creating a monitor.",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pingzen-dev-openapi.json#/components/schemas/TestConnectionRequest",
  "properties": {
    "url": {
      "type": "string",
      "maxLength": 2048,
      "minLength": 1,
      "title": "Url",
      "description": "URL or host to test"
    },
    "protocol": {
      "type": "string",
      "title": "Protocol",
      "description": "Protocol: HTTP, HTTPS, TCP, ICMP, DNS, GRPC, etc."
    },
    "timeout_seconds": {
      "type": "integer",
      "maximum": 120.0,
      "minimum": 1.0,
      "title": "Timeout Seconds",
      "description": "Timeout in seconds",
      "default": 30
    },
    "probe_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Probe Id",
      "description": "Run the test from this probe. None = central server."
    },
    "http_method": {
      "type": "string",
      "title": "Http Method",
      "description": "HTTP method",
      "default": "GET"
    },
    "expected_status": {
      "type": "integer",
      "maximum": 599.0,
      "minimum": 100.0,
      "title": "Expected Status",
      "description": "Expected HTTP status code",
      "default": 200
    },
    "verify_ssl": {
      "type": "boolean",
      "title": "Verify Ssl",
      "description": "Whether to verify SSL certificate",
      "default": true
    },
    "follow_redirects": {
      "type": "boolean",
      "title": "Follow Redirects",
      "description": "Whether to follow HTTP redirects",
      "default": true
    },
    "detect_stub_pages": {
      "type": "boolean",
      "title": "Detect Stub Pages",
      "description": "Detect domain-parking / hosting-suspension pages on HTTP 200",
      "default": true
    },
    "auth_type": {
      "type": "string",
      "pattern": "^(none|basic|bearer|digest|api_key)$",
      "title": "Auth Type",
      "default": "none"
    },
    "auth_username": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255
        },
        {
          "type": "null"
        }
      ],
      "title": "Auth Username"
    },
    "auth_password": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ],
      "title": "Auth Password"
    },
    "auth_token": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2048
        },
        {
          "type": "null"
        }
      ],
      "title": "Auth Token"
    },
    "auth_header_name": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 100
        },
        {
          "type": "null"
        }
      ],
      "title": "Auth Header Name"
    },
    "headers": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object",
      "title": "Headers",
      "description": "HTTP headers"
    },
    "keyword": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ],
      "title": "Keyword",
      "description": "Keyword to search in response body"
    },
    "keyword_present": {
      "type": "boolean",
      "title": "Keyword Present",
      "description": "True = keyword must be present, False = must be absent",
      "default": true
    },
    "keyword_type": {
      "type": "string",
      "pattern": "^(contains|not_contains|regex)$",
      "title": "Keyword Type",
      "description": "Keyword match type: contains, not_contains, or regex",
      "default": "contains"
    },
    "json_path": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ],
      "title": "Json Path",
      "description": "JSONPath expression to validate"
    },
    "json_expected_value": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ],
      "title": "Json Expected Value",
      "description": "Expected value at JSONPath"
    },
    "socks5_auth_required": {
      "type": "boolean",
      "title": "Socks5 Auth Required",
      "description": "Whether SOCKS5 proxy requires authentication",
      "default": false
    },
    "socks5_username": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255
        },
        {
          "type": "null"
        }
      ],
      "title": "Socks5 Username",
      "description": "SOCKS5 auth username"
    },
    "socks5_password": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255
        },
        {
          "type": "null"
        }
      ],
      "title": "Socks5 Password",
      "description": "SOCKS5 auth password"
    },
    "socks5_test_target": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ],
      "title": "Socks5 Test Target",
      "description": "Target host:port to test proxy-through (e.g. google.com:80)"
    },
    "mtproxy_secret": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ],
      "title": "Mtproxy Secret"
    },
    "dnsbl_servers": {
      "anyOf": [
        {
          "items": {
            "type": "string",
            "maxLength": 200,
            "minLength": 3,
            "pattern": "^[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?(\\.[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?)+$"
          },
          "type": "array",
          "maxItems": 50
        },
        {
          "type": "null"
        }
      ],
      "title": "Dnsbl Servers"
    },
    "pagespeed_strategy": {
      "type": "string",
      "pattern": "^(mobile|desktop)$",
      "title": "Pagespeed Strategy",
      "description": "PageSpeed strategy: mobile or desktop",
      "default": "mobile"
    },
    "dns_record_type": {
      "type": "string",
      "maxLength": 10,
      "title": "Dns Record Type",
      "description": "DNS record type",
      "default": "A"
    },
    "dns_expected_values": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array",
          "maxItems": 100
        },
        {
          "type": "null"
        }
      ],
      "title": "Dns Expected Values"
    },
    "dns_server": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 45
        },
        {
          "type": "null"
        }
      ],
      "title": "Dns Server",
      "description": "DNS only: IP address of the DNS server to ask instead of public DNS, port 53. A local-network address needs your private checker in that network."
    },
    "host_settings": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Host Settings",
      "description": "SSH login and thresholds. The key and password are write-only."
    }
  },
  "type": "object",
  "required": [
    "url",
    "protocol"
  ]
}