{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cavuno-com/json-schema/cavuno-com-domain-probe-schema.json",
  "title": "DomainProbe",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cavuno-com-domains-api-openapi.yml#/components/schemas/DomainProbe",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "enum": [
        "domain_probe"
      ]
    },
    "domainId": {
      "type": "string"
    },
    "url": {
      "type": "string",
      "description": "The first URL requested."
    },
    "outcome": {
      "type": "string",
      "enum": [
        "ok",
        "http_error",
        "redirected_off_board",
        "too_many_redirects",
        "network_error",
        "timeout",
        "blocked"
      ],
      "description": "`ok`: the last response was not an error. `http_error`: it was 4xx or 5xx. `redirected_off_board`: a redirect left the Board domains, so it was reported but not followed. `too_many_redirects`: more than 5 redirects. `network_error`: DNS, connection or TLS failure. `timeout`: no response in time. `blocked`: the domain resolves to a private network address."
    },
    "finalUrl": {
      "type": [
        "string",
        "null"
      ],
      "description": "The last URL requested. Its hop holds the final response."
    },
    "finalStatus": {
      "type": [
        "integer",
        "null"
      ],
      "description": "HTTP status of the last response, or null."
    },
    "hops": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DomainProbeHop"
      },
      "description": "Each request made, in order. Response bodies are never read."
    },
    "totalDurationMs": {
      "type": "integer",
      "minimum": 0
    }
  },
  "required": [
    "object",
    "domainId",
    "url",
    "outcome",
    "finalUrl",
    "finalStatus",
    "hops",
    "totalDurationMs"
  ],
  "$defs": {
    "DomainProbeHop": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string",
          "description": "URL requested in this hop."
        },
        "method": {
          "type": "string",
          "enum": [
            "HEAD",
            "GET"
          ],
          "description": "HEAD first; GET when the server does not support HEAD (405 or 501)."
        },
        "status": {
          "type": [
            "integer",
            "null"
          ],
          "description": "HTTP status code, or null when no response arrived."
        },
        "location": {
          "type": [
            "string",
            "null"
          ],
          "description": "The `Location` header of a redirect, as sent."
        },
        "server": {
          "type": [
            "string",
            "null"
          ],
          "description": "The `Server` header, if any."
        },
        "servedByCloudflare": {
          "type": "boolean",
          "description": "Whether the response came through Cloudflare (a `cf-ray` header or `Server: cloudflare`)."
        },
        "cfRay": {
          "type": [
            "string",
            "null"
          ],
          "description": "The `cf-ray` header, useful when contacting support."
        },
        "durationMs": {
          "type": "integer",
          "minimum": 0,
          "description": "Time to response headers, in milliseconds."
        },
        "error": {
          "type": [
            "string",
            "null"
          ],
          "description": "Why no response arrived, for example `ENOTFOUND`, `ECONNREFUSED`, `CERT_HAS_EXPIRED` or a timeout. Null when a response arrived."
        }
      },
      "required": [
        "url",
        "method",
        "status",
        "location",
        "server",
        "servedByCloudflare",
        "cfRay",
        "durationMs",
        "error"
      ]
    }
  }
}