{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/monit-rs/json-schema/monit-rs-endpoint-detail-schema.json",
  "title": "EndpointDetail",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/monit-rs-openapi.json#/components/schemas/EndpointDetail",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "name": {
      "type": "string",
      "title": "Name"
    },
    "url": {
      "type": "string",
      "title": "Url"
    },
    "method": {
      "type": "string",
      "title": "Method"
    },
    "interval_seconds": {
      "type": "integer",
      "title": "Interval Seconds"
    },
    "is_active": {
      "type": "boolean",
      "title": "Is Active"
    },
    "config_version": {
      "type": "integer",
      "title": "Config Version",
      "default": 1
    },
    "monitoring_mode": {
      "type": "string",
      "title": "Monitoring Mode",
      "default": "http"
    },
    "heartbeat_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Heartbeat Url"
    },
    "response_capture": {
      "type": "string",
      "title": "Response Capture",
      "default": "redacted"
    },
    "last_status": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Status"
    },
    "last_checked_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Checked At"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "headers": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Headers"
    },
    "body_template": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Body Template"
    },
    "has_auth": {
      "type": "boolean",
      "title": "Has Auth",
      "default": false
    },
    "openapi_spec_url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Openapi Spec Url"
    },
    "body_assertions": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "type": "object",
        "required": [
          "path",
          "op"
        ],
        "properties": {
          "path": {
            "type": "string",
            "maxLength": 256
          },
          "op": {
            "type": "string",
            "enum": [
              "contains",
              "empty",
              "equals",
              "exists",
              "gt",
              "gte",
              "lt",
              "lte",
              "not_contains",
              "not_empty",
              "not_equals",
              "not_exists"
            ]
          },
          "value": {
            "description": "Required unless op is one of: empty, exists, not_empty, not_exists."
          }
        }
      },
      "description": "Assertions checked against the JSON response body on each probe. A failing assertion marks the endpoint DOWN."
    }
  },
  "type": "object",
  "required": [
    "id",
    "name",
    "url",
    "method",
    "interval_seconds",
    "is_active",
    "last_status",
    "last_checked_at",
    "created_at"
  ]
}