{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-windows-server/json-schema/microsoft-windows-server-web-site-schema.json",
  "title": "WebSite",
  "description": "A complete IIS web site resource including configuration, bindings, application pool assignment, and HAL links to related resources.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-windows-server-websites-api-openapi.yml#/components/schemas/WebSite",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the web site."
    },
    "id": {
      "type": "string",
      "description": "The unique identifier of the web site."
    },
    "physical_path": {
      "type": "string",
      "description": "The physical file system path for the web site root."
    },
    "key": {
      "type": "string",
      "description": "The IIS site key identifier."
    },
    "status": {
      "type": "string",
      "description": "The current status of the web site.",
      "enum": [
        "started",
        "stopped",
        "starting",
        "stopping"
      ]
    },
    "server_auto_start": {
      "type": "boolean",
      "description": "Whether the web site starts automatically when IIS starts.",
      "default": true
    },
    "enabled_protocols": {
      "type": "string",
      "description": "The protocols enabled for this web site, as a comma-separated list."
    },
    "limits": {
      "$ref": "#/$defs/WebSiteLimits"
    },
    "bindings": {
      "type": "array",
      "description": "The list of bindings configured for this web site.",
      "items": {
        "$ref": "#/$defs/Binding"
      }
    },
    "application_pool": {
      "$ref": "#/$defs/ApplicationPoolReference"
    },
    "_links": {
      "$ref": "#/$defs/WebSiteLinks"
    }
  },
  "$defs": {
    "ApplicationPoolReference": {
      "type": "object",
      "description": "A reference to an application pool resource.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the application pool."
        },
        "id": {
          "type": "string",
          "description": "The unique identifier of the application pool."
        },
        "status": {
          "type": "string",
          "description": "The current status of the application pool.",
          "enum": [
            "started",
            "stopped",
            "starting",
            "stopping"
          ]
        }
      }
    },
    "Binding": {
      "type": "object",
      "description": "Defines the protocol, IP address, port, and optional hostname that a web site listens on. The binding_information property format is '{ip_address}:{port}:{hostname}' for HTTP and HTTPS protocols.",
      "required": [
        "protocol"
      ],
      "properties": {
        "protocol": {
          "type": "string",
          "description": "The protocol for this binding (e.g., http, https, net.tcp)."
        },
        "binding_information": {
          "type": "string",
          "description": "Combined binding string in the format '{ip_address}:{port}:{hostname}'."
        },
        "ip_address": {
          "type": "string",
          "description": "The IP address to bind to. Use '*' for all addresses."
        },
        "port": {
          "type": "integer",
          "description": "The port number to listen on.",
          "minimum": 1,
          "maximum": 65535
        },
        "hostname": {
          "type": "string",
          "description": "The hostname for host header-based routing."
        },
        "certificate": {
          "$ref": "#/$defs/Certificate"
        },
        "require_sni": {
          "type": "boolean",
          "description": "Whether Server Name Indication (SNI) is required for this binding.",
          "default": false
        }
      }
    },
    "Certificate": {
      "type": "object",
      "description": "An SSL/TLS certificate associated with an HTTPS binding.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The friendly name of the certificate."
        },
        "id": {
          "type": "string",
          "description": "The unique identifier of the certificate resource."
        },
        "issued_by": {
          "type": "string",
          "description": "The certificate issuer distinguished name."
        },
        "subject": {
          "type": "string",
          "description": "The certificate subject distinguished name."
        },
        "thumbprint": {
          "type": "string",
          "description": "The SHA-1 thumbprint of the certificate."
        },
        "valid_to": {
          "type": "string",
          "format": "date-time",
          "description": "The expiration date of the certificate."
        }
      }
    },
    "HalLink": {
      "type": "object",
      "properties": {
        "href": {
          "type": "string",
          "format": "uri-reference",
          "description": "The URI of the linked resource."
        }
      }
    },
    "WebSiteLimits": {
      "type": "object",
      "description": "Resource limits for the web site.",
      "properties": {
        "connection_timeout": {
          "type": "integer",
          "description": "The connection timeout in seconds.",
          "default": 120
        },
        "max_bandwidth": {
          "type": "integer",
          "description": "The maximum bandwidth in bytes per second.",
          "format": "int64",
          "default": 4294967295
        },
        "max_connections": {
          "type": "integer",
          "description": "The maximum number of concurrent connections.",
          "format": "int64",
          "default": 4294967295
        },
        "max_url_segments": {
          "type": "integer",
          "description": "The maximum number of URL segments allowed.",
          "default": 32
        }
      }
    },
    "WebSiteLinks": {
      "type": "object",
      "description": "HAL-style links to related resources for a web site.",
      "properties": {
        "authentication": {
          "$ref": "#/$defs/HalLink"
        },
        "authorization": {
          "$ref": "#/$defs/HalLink"
        },
        "default_document": {
          "$ref": "#/$defs/HalLink"
        },
        "delegation": {
          "$ref": "#/$defs/HalLink"
        },
        "directory_browsing": {
          "$ref": "#/$defs/HalLink"
        },
        "files": {
          "$ref": "#/$defs/HalLink"
        },
        "handlers": {
          "$ref": "#/$defs/HalLink"
        },
        "ip_restrictions": {
          "$ref": "#/$defs/HalLink"
        },
        "logging": {
          "$ref": "#/$defs/HalLink"
        },
        "modules": {
          "$ref": "#/$defs/HalLink"
        },
        "request_filtering": {
          "$ref": "#/$defs/HalLink"
        },
        "request_monitor": {
          "$ref": "#/$defs/HalLink"
        },
        "request_tracing": {
          "$ref": "#/$defs/HalLink"
        },
        "response_compression": {
          "$ref": "#/$defs/HalLink"
        },
        "response_headers": {
          "$ref": "#/$defs/HalLink"
        },
        "ssl": {
          "$ref": "#/$defs/HalLink"
        },
        "static_content": {
          "$ref": "#/$defs/HalLink"
        },
        "vdirs": {
          "$ref": "#/$defs/HalLink"
        },
        "webapps": {
          "$ref": "#/$defs/HalLink"
        }
      }
    }
  }
}