{
  "openapi": "3.1.0",
  "info": {
    "title": "Zoneminder API",
    "description": "A modern REST API for ZoneMinder",
    "license": {
      "name": "AGPL-3.0-or-later",
      "identifier": "AGPL-3.0-or-later"
    },
    "version": "3.0.0-alpha.1"
  },
  "paths": {
    "/api/v3/ai/datasets": {
      "get": {
        "tags": [
          "AI"
        ],
        "summary": "List AI datasets (COCO and any user-added datasets).",
        "operationId": "list_datasets",
        "responses": {
          "200": {
            "description": "Paginated datasets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedAiDatasetsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "AI"
        ],
        "summary": "Create an AI dataset.",
        "operationId": "create_dataset",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAiDatasetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiDatasetResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ai/datasets/{id}": {
      "get": {
        "tags": [
          "AI"
        ],
        "summary": "Get one AI dataset.",
        "operationId": "get_dataset",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Dataset ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Dataset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiDatasetResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "AI"
        ],
        "summary": "Delete an AI dataset. Its object classes cascade.",
        "operationId": "delete_dataset",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Dataset ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "AI"
        ],
        "summary": "Update an AI dataset (partial).",
        "operationId": "update_dataset",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Dataset ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAiDatasetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiDatasetResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ai/models": {
      "get": {
        "tags": [
          "AI"
        ],
        "summary": "List AI models, each with its dataset name resolved.",
        "operationId": "list_ai_models",
        "responses": {
          "200": {
            "description": "Paginated models",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedAiModelsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "AI"
        ],
        "summary": "Register an AI model.",
        "operationId": "create_ai_model",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAiModelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiModelResponse"
                }
              }
            }
          },
          "400": {
            "description": "Unknown dataset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ai/models/{id}": {
      "get": {
        "tags": [
          "AI"
        ],
        "summary": "Get one AI model.",
        "operationId": "get_ai_model",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Model ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Model",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiModelResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "AI"
        ],
        "summary": "Delete an AI model.",
        "operationId": "delete_ai_model",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Model ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "AI"
        ],
        "summary": "Update an AI model (partial).",
        "operationId": "update_ai_model",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Model ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAiModelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiModelResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ai/object-classes": {
      "get": {
        "tags": [
          "AI"
        ],
        "summary": "List object classes, optionally filtered to one dataset.",
        "operationId": "list_classes",
        "parameters": [
          {
            "name": "dataset_id",
            "in": "query",
            "description": "Only classes in this dataset",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated classes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedAiObjectClassesResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "AI"
        ],
        "summary": "Create an object class.",
        "operationId": "create_class",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAiObjectClassRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiObjectClassResponse"
                }
              }
            }
          },
          "400": {
            "description": "Unknown dataset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ai/object-classes/{id}": {
      "get": {
        "tags": [
          "AI"
        ],
        "summary": "Get one object class.",
        "operationId": "get_class",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Object class ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Object class",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiObjectClassResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "AI"
        ],
        "summary": "Delete an object class.",
        "operationId": "delete_class",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Object class ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "AI"
        ],
        "summary": "Update an object class (partial).",
        "operationId": "update_class",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Object class ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAiObjectClassRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiObjectClassResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/auth/login": {
      "post": {
        "tags": [
          "Auth"
        ],
        "operationId": "login",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success login user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid data input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/auth/logout": {
      "get": {
        "tags": [
          "Auth"
        ],
        "operationId": "logout",
        "responses": {
          "200": {
            "description": "Successfully logged out",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or missing token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/auth/refresh": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Refresh token.",
        "operationId": "refresh_token",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshTokenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success get new access token and refresh token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid data input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/configs": {
      "get": {
        "tags": [
          "Config"
        ],
        "summary": "List all configuration key/value entries from the ZoneMinder `Config` table.",
        "description": "- Requires a valid JWT.\n- Returns a paginated set of config entries including metadata such as type, category,\n  default value and readonly flags.",
        "operationId": "list_configs",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          },
          {
            "name": "category",
            "in": "query",
            "description": "Exact match on Category column",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Substring match on Name column",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of config entries",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedConfigsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/configs/categories": {
      "get": {
        "tags": [
          "Config"
        ],
        "summary": "List distinct config categories with their entry counts.",
        "description": "- Requires a valid JWT.\n- Returns an array of category names with the number of config entries in each.",
        "operationId": "list_categories",
        "responses": {
          "200": {
            "description": "List of categories with counts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CategoryCountResponse"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/configs/{name}": {
      "get": {
        "tags": [
          "Config"
        ],
        "summary": "Get a single configuration entry by its `name`.",
        "description": "- Requires a valid JWT.\n- Responds with 404 if the entry does not exist.",
        "operationId": "get_config",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "description": "Config name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get config by name",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfigResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Config not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "put": {
        "tags": [
          "Config"
        ],
        "summary": "Update a configuration value by `name`.",
        "description": "- Requires a valid JWT.\n- Fails with 403 when attempting to update a readonly config key.\n- Responds with 404 if the entry does not exist.",
        "operationId": "update_config",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "description": "Config name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateConfigRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated config",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfigResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "403": {
            "description": "Config is read-only",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Config not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/control_presets": {
      "get": {
        "tags": [
          "Control Presets"
        ],
        "summary": "List control presets with pagination; optionally filter by monitor id.",
        "description": "- Requires a valid JWT.",
        "operationId": "list_control_presets",
        "parameters": [
          {
            "name": "monitor_id",
            "in": "query",
            "description": "Filter by monitor",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of control presets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedControlPresetsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Control Presets"
        ],
        "summary": "Create a new control preset entry.",
        "description": "- Requires a valid JWT.",
        "operationId": "create_control_preset",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateControlPresetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created control preset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ControlPresetResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/control_presets/{monitor_id}/{preset}": {
      "get": {
        "tags": [
          "Control Presets"
        ],
        "summary": "Get a control preset by monitor ID and preset number.",
        "description": "- Requires a valid JWT; responds 404 if not found.",
        "operationId": "get_control_preset",
        "parameters": [
          {
            "name": "monitor_id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "preset",
            "in": "path",
            "description": "Preset number",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Control preset detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ControlPresetResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Control Presets"
        ],
        "summary": "Delete a control preset by monitor ID and preset number.",
        "description": "- Responds 204 on success, 404 if not found.\n- Requires a valid JWT.",
        "operationId": "delete_control_preset",
        "parameters": [
          {
            "name": "monitor_id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "preset",
            "in": "path",
            "description": "Preset number",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted control preset"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Control Presets"
        ],
        "summary": "Update a control preset entry.",
        "description": "- Partial update.\n- Requires a valid JWT.",
        "operationId": "update_control_preset",
        "parameters": [
          {
            "name": "monitor_id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "preset",
            "in": "path",
            "description": "Preset number",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateControlPresetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated control preset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ControlPresetResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/controls": {
      "get": {
        "tags": [
          "Controls"
        ],
        "summary": "List all camera controls with pagination.",
        "description": "- Requires a valid JWT.",
        "operationId": "list_controls",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of controls",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedControlsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Controls"
        ],
        "summary": "Create a new control record.",
        "description": "- Requires a valid JWT.",
        "operationId": "create_control",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateControlRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created control",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ControlResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/controls/{id}": {
      "get": {
        "tags": [
          "Controls"
        ],
        "summary": "Get control by id.",
        "description": "- Requires a valid JWT; responds 404 if not found.",
        "operationId": "get_control",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Control ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Control detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ControlResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Controls"
        ],
        "summary": "Delete a control by id.",
        "description": "- Responds 204 on success, 404 if not found.\n- Requires a valid JWT.",
        "operationId": "delete_control",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Control ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted control"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Controls"
        ],
        "summary": "Update a control.",
        "description": "- Partial update.\n- Requires a valid JWT.",
        "operationId": "update_control",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Control ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateControlRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated control",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ControlResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/daemons": {
      "get": {
        "tags": [
          "Daemons"
        ],
        "summary": "List all daemons.",
        "operationId": "list_daemons",
        "responses": {
          "200": {
            "description": "List of all daemons",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DaemonListResponse"
                }
              }
            }
          },
          "503": {
            "description": "Daemon manager not available"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/daemons/{id}": {
      "get": {
        "tags": [
          "Daemons"
        ],
        "summary": "Get a specific daemon's status.",
        "operationId": "get_daemon",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Daemon identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Daemon status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DaemonStatusResponse"
                }
              }
            }
          },
          "404": {
            "description": "Daemon not found"
          },
          "503": {
            "description": "Daemon manager not available"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/daemons/{id}/reload": {
      "post": {
        "tags": [
          "Daemons"
        ],
        "summary": "Reload a daemon's configuration (SIGHUP).",
        "operationId": "reload_daemon",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Daemon identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Reload signal sent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DaemonActionResponse"
                }
              }
            }
          },
          "503": {
            "description": "Daemon manager not available"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/daemons/{id}/restart": {
      "post": {
        "tags": [
          "Daemons"
        ],
        "summary": "Restart a daemon.",
        "operationId": "restart_daemon",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Daemon identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Daemon restarted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DaemonActionResponse"
                }
              }
            }
          },
          "503": {
            "description": "Daemon manager not available"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/daemons/{id}/start": {
      "post": {
        "tags": [
          "Daemons"
        ],
        "summary": "Start a daemon.",
        "operationId": "start_daemon",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Daemon identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Optional arguments",
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/StartDaemonRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Daemon started",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DaemonActionResponse"
                }
              }
            }
          },
          "503": {
            "description": "Daemon manager not available"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/daemons/{id}/stop": {
      "post": {
        "tags": [
          "Daemons"
        ],
        "summary": "Stop a daemon.",
        "operationId": "stop_daemon",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Daemon identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Daemon stopped",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DaemonActionResponse"
                }
              }
            }
          },
          "503": {
            "description": "Daemon manager not available"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/devices": {
      "get": {
        "tags": [
          "Devices"
        ],
        "summary": "List all devices with pagination.",
        "description": "- Requires a valid JWT.",
        "operationId": "list_devices",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of devices",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedDevicesResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Devices"
        ],
        "summary": "Create a new device record.",
        "description": "- Requires a valid JWT.",
        "operationId": "create_device",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDeviceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created device",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/devices/{id}": {
      "get": {
        "tags": [
          "Devices"
        ],
        "summary": "Get device by id.",
        "description": "- Requires a valid JWT; responds 404 if not found.",
        "operationId": "get_device",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Device ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Device detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Devices"
        ],
        "summary": "Delete a device by id.",
        "description": "- Responds 204 on success, 404 if not found.\n- Requires a valid JWT.",
        "operationId": "delete_device",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Device ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted device"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Devices"
        ],
        "summary": "Update a device.",
        "description": "- Partial update.\n- Requires a valid JWT.",
        "operationId": "update_device",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Device ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDeviceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated device",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/event-data": {
      "get": {
        "tags": [
          "Event Data"
        ],
        "summary": "List all event data with pagination.",
        "operationId": "list_event_data",
        "parameters": [
          {
            "name": "event_id",
            "in": "query",
            "description": "Filter by event ID",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of event data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedEventDataResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Event Data"
        ],
        "summary": "Create new event data.",
        "operationId": "create_event_data",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEventDataRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created event data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventDataResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/event-data/{id}": {
      "get": {
        "tags": [
          "Event Data"
        ],
        "summary": "Get event data by id.",
        "operationId": "get_event_data",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Event Data ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Event data detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventDataResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Event Data"
        ],
        "summary": "Delete event data by id.",
        "operationId": "delete_event_data",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Event Data ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted event data"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Event Data"
        ],
        "summary": "Update event data.",
        "operationId": "update_event_data",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Event Data ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEventDataRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated event data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventDataResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/event-summaries": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Get event summaries for all monitors",
        "description": "Returns pre-calculated event counts and disk space usage for all monitors.\nThese summaries include counts for: total, hour, day, week, month, and archived events.",
        "operationId": "listEventSummaries",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of event summaries for all monitors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedEventSummariesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/event-summaries/{monitor_id}": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Get event summary for a specific monitor",
        "description": "Returns pre-calculated event counts and disk space usage for a specific monitor.",
        "operationId": "getEventSummary",
        "parameters": [
          {
            "name": "monitor_id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Event summary for the monitor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventSummaryResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/events": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Get a paginated list of events",
        "operationId": "listEvents",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Number of items per page",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 20
          },
          {
            "name": "monitor_id",
            "in": "query",
            "description": "Filter by monitor ID",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "start_time",
            "in": "query",
            "description": "Filter by start time (ISO8601)",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2025-04-28T00:00:00Z"
          },
          {
            "name": "end_time",
            "in": "query",
            "description": "Filter by end time (ISO8601)",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2025-04-29T23:59:59Z"
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Field to sort by: start_time, end_time, alarm_frames, max_score, avg_score, tot_score, length, id, name, cause, monitor_id, notes, frames",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "start_time"
          },
          {
            "name": "direction",
            "in": "query",
            "description": "Sort direction: asc or desc",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "desc"
          },
          {
            "name": "alarm_frames_min",
            "in": "query",
            "description": "Minimum number of alarm frames",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            },
            "example": 5
          },
          {
            "name": "archived",
            "in": "query",
            "description": "Filter by archived status",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "example": false
          },
          {
            "name": "cause",
            "in": "query",
            "description": "Substring match on cause",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Motion"
          },
          {
            "name": "name",
            "in": "query",
            "description": "Substring match on name",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "Front"
          },
          {
            "name": "notes",
            "in": "query",
            "description": "Substring match on notes",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag_id",
            "in": "query",
            "description": "Events with any of these tag ids (comma-separated)",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "1,4"
          },
          {
            "name": "storage_id",
            "in": "query",
            "description": "Filter by the storage holding the event media",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            },
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "List of events",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedEventsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Events"
        ],
        "summary": "Create a new event",
        "operationId": "createEvent",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Event created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/events-tags": {
      "get": {
        "tags": [
          "Events Tags"
        ],
        "summary": "List all event-tag associations with pagination.",
        "operationId": "list_events_tags",
        "parameters": [
          {
            "name": "event_id",
            "in": "query",
            "description": "Filter by event ID",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "tag_id",
            "in": "query",
            "description": "Filter by tag ID",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of event-tag associations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedEventsTagsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Events Tags"
        ],
        "summary": "Create a new event-tag association.",
        "operationId": "create_event_tag",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEventTagRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created event-tag association",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventTagResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/events-tags/{tag_id}/{event_id}": {
      "get": {
        "tags": [
          "Events Tags"
        ],
        "summary": "Get an event-tag association by composite ID.",
        "operationId": "get_event_tag",
        "parameters": [
          {
            "name": "tag_id",
            "in": "path",
            "description": "Tag ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "event_id",
            "in": "path",
            "description": "Event ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Event-tag association detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventTagResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Events Tags"
        ],
        "summary": "Delete an event-tag association by composite ID.",
        "operationId": "delete_event_tag",
        "parameters": [
          {
            "name": "tag_id",
            "in": "path",
            "description": "Tag ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "event_id",
            "in": "path",
            "description": "Event ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted event-tag association"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/events/counts-by-monitor/{hours}": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Get event counts grouped by monitor (for console view)",
        "operationId": "getEventCountsByMonitor",
        "parameters": [
          {
            "name": "hours",
            "in": "path",
            "description": "Number of hours to count back from now",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Event counts grouped by monitor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventCountsByMonitorResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/events/counts/{hours}": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Get event counts grouped by hour",
        "operationId": "getEventCounts",
        "parameters": [
          {
            "name": "hours",
            "in": "path",
            "description": "Number of hours to count back from now",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Event counts grouped by hour",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventCountsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/events/{id}": {
      "get": {
        "tags": [
          "Events"
        ],
        "summary": "Get a specific event by ID",
        "operationId": "getEvent",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Event ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Event details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Event not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Events"
        ],
        "summary": "Delete an event",
        "operationId": "deleteEvent",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Event ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Event deleted"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Events"
        ],
        "summary": "Update an existing event",
        "operationId": "updateEvent",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Event ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Event updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Event not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/events/{id}/info": {
      "get": {
        "tags": [
          "Events Playback"
        ],
        "summary": "Get recorded event video metadata.",
        "description": "- Requires a valid JWT (header or `?token=`).",
        "operationId": "get_event_info",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Event ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Event video metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventVideoInfo"
                }
              }
            }
          },
          "404": {
            "description": "Event or video not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/events/{id}/similar": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "\"More like this\": events nearest the given event's stored embedding. The\nsource event is ACL-checked (a 404 hides events outside the caller's scope),\nand results are bounded by the same scope.",
        "operationId": "similarEvents",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Source event id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "k",
            "in": "query",
            "description": "Number of results (1-50, default 10)",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "example": 10
          }
        ],
        "responses": {
          "200": {
            "description": "Similar events",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimilarResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Event not found / not visible",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "503": {
            "description": "Search disabled / no backend",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/events/{id}/stream/init.mp4": {
      "get": {
        "tags": [
          "Event Playback"
        ],
        "summary": "Get the fMP4 initialization segment for an event's HLS-VOD stream.",
        "operationId": "get_event_init",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Event ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "fMP4 init segment",
            "content": {
              "video/mp4": {}
            }
          },
          "404": {
            "description": "Event not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/events/{id}/stream/media.mp4": {
      "get": {
        "tags": [
          "Event Playback"
        ],
        "summary": "Byte-serve an event's media file for the in-progress HLS playlist's\n`#EXT-X-BYTERANGE` segments — the growing `incomplete.*.mp4` while recording,\nor the finalized file once closed. Range support is what makes the rewritten\n`media.mp4` URIs resolve.",
        "operationId": "getEventStreamMedia",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Event ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Media file (full)",
            "content": {
              "video/mp4": {}
            }
          },
          "206": {
            "description": "Partial content",
            "content": {
              "video/mp4": {}
            }
          },
          "404": {
            "description": "Event not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "416": {
            "description": "Range not satisfiable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/events/{id}/stream/playlist.m3u8": {
      "get": {
        "tags": [
          "Event Playback"
        ],
        "summary": "Get HLS playlist for event playback",
        "description": "Generates an HLS playlist with byte-range segments from a fragmented MP4 file.\nThis enables efficient seeking without having separate segment files.",
        "operationId": "getEventPlaylist",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Event ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "HLS playlist",
            "content": {
              "application/vnd.apple.mpegurl": {}
            }
          },
          "404": {
            "description": "Event not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/events/{id}/stream/segment/{seq}": {
      "get": {
        "tags": [
          "Event Playback"
        ],
        "summary": "Get an fMP4 media segment for an event's HLS-VOD stream.",
        "operationId": "get_event_segment",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Event ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "seq",
            "in": "path",
            "description": "Zero-based segment index",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "fMP4 media segment",
            "content": {
              "video/mp4": {}
            }
          },
          "404": {
            "description": "Event or segment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/events/{id}/stream/video.mp4": {
      "get": {
        "tags": [
          "Event Playback"
        ],
        "summary": "Get event video for HLS streaming (same as video endpoint but different path)",
        "operationId": "getEventStreamVideo",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Event ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Video file (full or partial)",
            "content": {
              "video/mp4": {}
            }
          },
          "206": {
            "description": "Partial content",
            "content": {
              "video/mp4": {}
            }
          },
          "404": {
            "description": "Event not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/events/{id}/thumbnail": {
      "get": {
        "tags": [
          "Event Playback"
        ],
        "summary": "Get event thumbnail",
        "operationId": "getEventThumbnail",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Event ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Thumbnail image",
            "content": {
              "image/jpeg": {}
            }
          },
          "404": {
            "description": "Event or thumbnail not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/events/{id}/video": {
      "get": {
        "tags": [
          "Event Playback"
        ],
        "summary": "Get event video file with Range support",
        "description": "Serves the event video file with HTTP Range support for efficient seeking.",
        "operationId": "getEventVideo",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Event ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Video file (full or partial)",
            "content": {
              "video/mp4": {}
            }
          },
          "206": {
            "description": "Partial content",
            "content": {
              "video/mp4": {}
            }
          },
          "404": {
            "description": "Event not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "416": {
            "description": "Range not satisfiable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/filters": {
      "get": {
        "tags": [
          "Filters"
        ],
        "summary": "List saved event filters with pagination.",
        "description": "- Supports server-side scheduled filters; this lists definitions (not executions).\n- Requires a valid JWT.",
        "operationId": "list_filters",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of filters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedFiltersResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Filters"
        ],
        "summary": "Create a new filter definition.",
        "description": "- `query_json` should be a valid filter expression understood by ZoneMinder.\n- Requires a valid JWT.",
        "operationId": "create_filter",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFilterRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created filter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FilterResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/filters/preview": {
      "post": {
        "tags": [
          "Filters"
        ],
        "summary": "Preview a structured filter: run it now and return the matching events.",
        "description": "- Body is the structured filter AST (`FilterQuery`); `page`/`page_size` are\n  query params. The predicate is compiled to a parameterised query (no SQL\n  is built from client strings) and row-level monitor ACL is applied.\n- Requires a valid JWT.",
        "operationId": "preview_filter",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FilterQuery"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Events matching the filter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedEventsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/filters/{id}": {
      "get": {
        "tags": [
          "Filters"
        ],
        "summary": "Get a single filter definition by id.",
        "description": "- Requires a valid JWT.",
        "operationId": "get_filter",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Filter ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Filter details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FilterResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "put": {
        "tags": [
          "Filters"
        ],
        "summary": "Update any subset of a filter's fields.",
        "description": "- Requires a valid JWT; only fields present in the body are changed.",
        "operationId": "update_filter",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Filter ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFilterRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated filter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FilterResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Filters"
        ],
        "summary": "Delete a filter by id.",
        "description": "- Responds 204 on success, 404 if not found.\n- Requires a valid JWT.",
        "operationId": "delete_filter",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Filter ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted filter"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/frames": {
      "get": {
        "tags": [
          "Frames"
        ],
        "summary": "List frames; optionally filter by event id.",
        "description": "- Requires a valid JWT.",
        "operationId": "list_frames",
        "parameters": [
          {
            "name": "event_id",
            "in": "query",
            "description": "Filter by event",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of frames",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedFramesResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Frames"
        ],
        "summary": "Create a new frame entry.",
        "description": "- Requires a valid JWT.",
        "operationId": "create_frame",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFrameRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created frame",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FrameResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/frames/{id}": {
      "get": {
        "tags": [
          "Frames"
        ],
        "summary": "Get a frame by id.",
        "description": "- Requires a valid JWT; responds 404 if not found.",
        "operationId": "get_frame",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Frame ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Frame detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FrameResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Frames"
        ],
        "summary": "Delete a frame by id.",
        "description": "- Responds 204 on success, 404 if not found.\n- Requires a valid JWT.",
        "operationId": "delete_frame",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Frame ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted frame"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Frames"
        ],
        "summary": "Update a frame entry.",
        "description": "- Partial update.\n- Requires a valid JWT.",
        "operationId": "update_frame",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Frame ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFrameRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated frame",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FrameResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/groups": {
      "get": {
        "tags": [
          "Groups"
        ],
        "summary": "List user groups with pagination.",
        "description": "- Requires a valid JWT.",
        "operationId": "list_groups",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of groups",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedGroupsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Groups"
        ],
        "summary": "Create a new group.",
        "description": "- Optionally specifies `parent_id` to create nested groups.",
        "operationId": "create_group",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateGroupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created group",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/groups-monitors": {
      "get": {
        "tags": [
          "Groups Monitors"
        ],
        "summary": "List all group-monitor associations with pagination.",
        "description": "- Requires a valid JWT.",
        "operationId": "list_groups_monitors",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of group-monitor associations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedGroupMonitorsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Groups Monitors"
        ],
        "summary": "Create a new group-monitor association.",
        "operationId": "create_group_monitor",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateGroupMonitorRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created group-monitor association",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupMonitorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/groups-monitors/{id}": {
      "get": {
        "tags": [
          "Groups Monitors"
        ],
        "summary": "Get a group-monitor association by id.",
        "operationId": "get_group_monitor",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Association ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Group-monitor association detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupMonitorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Groups Monitors"
        ],
        "summary": "Delete a group-monitor association by id.",
        "operationId": "delete_group_monitor",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Association ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted group-monitor association"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/groups-permissions": {
      "get": {
        "tags": [
          "Groups Permissions"
        ],
        "summary": "List all group permissions with pagination.",
        "operationId": "list_groups_permissions",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of group permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedGroupPermissionsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Groups Permissions"
        ],
        "summary": "Create a new group permission.",
        "operationId": "create_group_permission",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateGroupPermissionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created group permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupPermissionResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/groups-permissions/{id}": {
      "get": {
        "tags": [
          "Groups Permissions"
        ],
        "summary": "Get a group permission by id.",
        "operationId": "get_group_permission",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Permission ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Group permission detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupPermissionResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Groups Permissions"
        ],
        "summary": "Delete a group permission by id.",
        "operationId": "delete_group_permission",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Permission ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted group permission"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Groups Permissions"
        ],
        "summary": "Update a group permission.",
        "operationId": "update_group_permission",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Permission ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGroupPermissionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated group permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupPermissionResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/groups/{id}": {
      "get": {
        "tags": [
          "Groups"
        ],
        "summary": "Get a group by id.",
        "description": "- Requires a valid JWT.",
        "operationId": "get_group",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Group ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Group detail",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "put": {
        "tags": [
          "Groups"
        ],
        "summary": "Update a group's basic attributes.",
        "description": "- Partial update; only provided fields are changed.",
        "operationId": "update_group",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Group ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateGroupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated group",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Groups"
        ],
        "summary": "Delete a group by id.",
        "description": "- Responds 204 on success, 404 if not found.",
        "operationId": "delete_group",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Group ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted group"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/host/getVersion": {
      "get": {
        "tags": [
          "Server"
        ],
        "operationId": "get_version",
        "responses": {
          "200": {
            "description": "Get ZoneMinder and API version information",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/live/sessions": {
      "get": {
        "tags": [
          "Live Streaming"
        ],
        "summary": "List all active live streams",
        "operationId": "listLiveSessions",
        "responses": {
          "200": {
            "description": "List of active live sessions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "format": "int32",
                    "minimum": 0
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/live/sources": {
      "get": {
        "tags": [
          "Live Streaming"
        ],
        "summary": "Get source router statistics",
        "operationId": "getLiveSources",
        "responses": {
          "200": {
            "description": "Source statistics"
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/live/{monitor_id}/hls/init.mp4": {
      "get": {
        "tags": [
          "Live Streaming"
        ],
        "summary": "Get HLS init segment",
        "operationId": "getLiveInitSegment",
        "parameters": [
          {
            "name": "monitor_id",
            "in": "path",
            "description": "Monitor/Camera ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Init segment",
            "content": {
              "video/mp4": {}
            }
          },
          "404": {
            "description": "Init segment not ready",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/live/{monitor_id}/hls/live.m3u8": {
      "get": {
        "tags": [
          "Live Streaming"
        ],
        "summary": "Get HLS media playlist",
        "operationId": "getLiveMediaPlaylist",
        "parameters": [
          {
            "name": "monitor_id",
            "in": "path",
            "description": "Monitor/Camera ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Media playlist",
            "content": {
              "application/vnd.apple.mpegurl": {}
            }
          },
          "404": {
            "description": "Session not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/live/{monitor_id}/hls/master.m3u8": {
      "get": {
        "tags": [
          "Live Streaming"
        ],
        "summary": "Get HLS master playlist",
        "operationId": "getLiveMasterPlaylist",
        "parameters": [
          {
            "name": "monitor_id",
            "in": "path",
            "description": "Monitor/Camera ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Master playlist",
            "content": {
              "application/vnd.apple.mpegurl": {}
            }
          },
          "404": {
            "description": "Session not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/live/{monitor_id}/hls/{segment}": {
      "get": {
        "tags": [
          "Live Streaming"
        ],
        "summary": "Get HLS media segment",
        "operationId": "getLiveSegment",
        "parameters": [
          {
            "name": "monitor_id",
            "in": "path",
            "description": "Monitor/Camera ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "segment",
            "in": "path",
            "description": "Segment filename (e.g., segment_00001.m4s)",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Media segment",
            "content": {
              "video/iso.segment": {}
            }
          },
          "404": {
            "description": "Segment not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/live/{monitor_id}/start": {
      "post": {
        "tags": [
          "Live Streaming"
        ],
        "summary": "Start live streaming for a monitor",
        "operationId": "startLiveStream",
        "parameters": [
          {
            "name": "monitor_id",
            "in": "path",
            "description": "Monitor/Camera ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "description": "Stream configuration",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartLiveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Live streaming started",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartLiveResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "409": {
            "description": "Session already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/live/{monitor_id}/stats": {
      "get": {
        "tags": [
          "Live Streaming"
        ],
        "summary": "Get live stream statistics",
        "operationId": "getLiveStats",
        "parameters": [
          {
            "name": "monitor_id",
            "in": "path",
            "description": "Monitor/Camera ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Live stream statistics",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiveStatsResponse"
                }
              }
            }
          },
          "404": {
            "description": "Session not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/live/{monitor_id}/stop": {
      "delete": {
        "tags": [
          "Live Streaming"
        ],
        "summary": "Stop live streaming for a monitor",
        "description": "This endpoint is idempotent: stopping a non-active stream returns 204.",
        "operationId": "stopLiveStream",
        "parameters": [
          {
            "name": "monitor_id",
            "in": "path",
            "description": "Monitor/Camera ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Live streaming stopped (or was not active)"
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/live/{monitor_id}/webrtc/ws": {
      "get": {
        "tags": [
          "Live Streaming"
        ],
        "summary": "WebSocket handler for WebRTC signaling.",
        "description": "Upgrades to a WebSocket and exchanges WebRTC signaling over JSON **text\nframes**. OpenAPI cannot type WebSocket message bodies, so the message\nschema is documented here and as the `WebRtcSignalingMessage` component.\n\n## Message envelope\n\nEvery frame is a JSON object discriminated by a lowercase `type` field\n(see the `WebRtcSignalingMessage` schema). Note the field casing:\n`icecandidate` (one word) with camelCase `sdpMid` / `sdpMLineIndex`.\n\n## Typical flow (client-initiated, the common path)\n\n1. **Server → client** `{\"type\":\"offer\",\"session_id\":\"<id>\",\"sdp\":\"...\"}`\n   — the server sends its SDP offer immediately on connect.\n2. **Client → server** `{\"type\":\"answer\",\"session_id\":\"<id>\",\"sdp\":\"...\"}`.\n3. **Both directions** `{\"type\":\"icecandidate\",\"session_id\":\"<id>\",`\n   `\"candidate\":\"candidate:...\",\"sdpMid\":\"0\",\"sdpMLineIndex\":0}` — trickled\n   as discovered.\n4. **Server → client** `{\"type\":\"ready\",\"session_id\":\"<id>\",\"monitor_id\":N,`\n   `\"has_audio\":false}` once media is flowing. `has_audio` tells the client\n   whether an audio track accompanies the video.\n5. **Errors** arrive as `{\"type\":\"error\",\"message\":\"...\"}`.\n6. **Keepalive**: either side may send `{\"type\":\"ping\"}`; the peer replies\n   `{\"type\":\"pong\"}`.",
        "operationId": "webrtcSignalingStream",
        "parameters": [
          {
            "name": "monitor_id",
            "in": "path",
            "description": "Monitor/Camera ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "101": {
            "description": "WebSocket upgraded. Frames are JSON `WebRtcSignalingMessage` objects (text). Server sends `offer`/`ready`/`icecandidate`/`error`/`pong`; client sends `answer`/`icecandidate`/`ping`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebRtcSignalingMessage"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/logs": {
      "get": {
        "tags": [
          "Logs"
        ],
        "summary": "List log entries with pagination and filtering.",
        "description": "Filter by `component`, `min_level` (severity name — this severe or worse),\nexact `level`, `search` (message substring), `start`/`end` (Unix seconds),\n`server_id`, and `sort` (asc/desc by time; default newest-first).",
        "operationId": "listLogs",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Number of items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 50
          },
          {
            "name": "component",
            "in": "query",
            "description": "Filter by component (e.g., 'zmc', 'zma', 'zmdc', 'web')",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "zmc"
          },
          {
            "name": "min_level",
            "in": "query",
            "description": "Severity threshold: fatal|error|warning|info|debug, returns that severity or worse",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "error"
          },
          {
            "name": "level",
            "in": "query",
            "description": "Exact Logs.Level match (inverted scale: 0=Info, -1=Warning, -2=Error, -3=Fatal, positive=debug)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "example": -2
          },
          {
            "name": "search",
            "in": "query",
            "description": "Case-insensitive substring match on the message",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "connection"
          },
          {
            "name": "start",
            "in": "query",
            "description": "Only logs at or after this Unix time (seconds)",
            "required": false,
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "Only logs at or before this Unix time (seconds)",
            "required": false,
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "asc (oldest first) or desc (newest first, default)",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "desc"
          },
          {
            "name": "server_id",
            "in": "query",
            "description": "Filter by server ID",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            },
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of logs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedLogsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Logs"
        ],
        "summary": "Clear logs (legacy \"Clear Logs\"), optionally scoped by the same filters as\nthe list endpoint. Returns the number of rows deleted. Requires System\n(admin) permission.",
        "operationId": "clearLogs",
        "parameters": [
          {
            "name": "component",
            "in": "query",
            "description": "Only clear logs from this component",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "min_level",
            "in": "query",
            "description": "Only clear this severity or worse (fatal|error|warning|info|debug)",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "level",
            "in": "query",
            "description": "Only clear this exact Logs.Level",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Only clear messages containing this substring",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "Only clear logs at or after this Unix time (seconds)",
            "required": false,
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "Only clear logs at or before this Unix time (seconds)",
            "required": false,
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "server_id",
            "in": "query",
            "description": "Only clear logs for this server",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Number of log rows deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden (System permission required)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/logs/{id}": {
      "get": {
        "tags": [
          "Logs"
        ],
        "summary": "Get a single log entry by id.",
        "description": "- Requires a valid JWT.",
        "operationId": "get_log",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Log ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Log detail",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/manufacturers": {
      "get": {
        "tags": [
          "Manufacturers"
        ],
        "summary": "List manufacturers for camera models supported in ZoneMinder presets.",
        "description": "- Requires a valid JWT.",
        "operationId": "list_manufacturers",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of manufacturers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedManufacturersResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Manufacturers"
        ],
        "summary": "Create a new manufacturer record.",
        "description": "- Name must be unique.\n- Requires a valid JWT.",
        "operationId": "create_manufacturer",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateManufacturerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created manufacturer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManufacturerResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/manufacturers/{id}": {
      "get": {
        "tags": [
          "Manufacturers"
        ],
        "summary": "Get manufacturer by id.",
        "description": "- Requires a valid JWT; responds 404 if not found.",
        "operationId": "get_manufacturer",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Manufacturer ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Manufacturer detail",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Manufacturers"
        ],
        "summary": "Delete a manufacturer by id.",
        "description": "- Responds 204 on success, 404 if not found.\n- Requires a valid JWT.",
        "operationId": "delete_manufacturer",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Manufacturer ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted manufacturer"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Manufacturers"
        ],
        "summary": "Update a manufacturer name.",
        "description": "- Partial update.\n- Requires a valid JWT.",
        "operationId": "update_manufacturer",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Manufacturer ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateManufacturerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated manufacturer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManufacturerResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/me": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "Return the authenticated user's own account plus their token metadata.",
        "description": "The token fields (`issued_at`, `expires_at`, `token_type`) let a client show\nsession expiry without decoding the JWT itself.",
        "operationId": "me",
        "responses": {
          "200": {
            "description": "The authenticated user's account and token metadata",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or missing token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/me/password": {
      "put": {
        "tags": [
          "Auth"
        ],
        "summary": "Change the authenticated user's own password.",
        "description": "Requires the current password; on success every existing token for the\nuser is revoked, so the client must re-authenticate.",
        "operationId": "change_password",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePasswordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Password changed; existing tokens revoked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid data input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized or current password incorrect",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/models": {
      "get": {
        "tags": [
          "Models"
        ],
        "summary": "List camera models with pagination; optionally filter by manufacturer id.",
        "description": "- Requires a valid JWT.",
        "operationId": "list_models",
        "parameters": [
          {
            "name": "manufacturer_id",
            "in": "query",
            "description": "Filter by manufacturer",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of models",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedModelsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Models"
        ],
        "summary": "Create a new camera model entry.",
        "description": "- Optionally associates with a manufacturer id.\n- Requires a valid JWT.",
        "operationId": "create_model",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateModelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created model",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/models/{id}": {
      "get": {
        "tags": [
          "Models"
        ],
        "summary": "Get a camera model by id.",
        "description": "- Requires a valid JWT; responds 404 if not found.",
        "operationId": "get_model",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Model ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Model detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Models"
        ],
        "summary": "Delete a camera model by id.",
        "description": "- Responds 204 on success, 404 if not found.\n- Requires a valid JWT.",
        "operationId": "delete_model",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Model ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted model"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Models"
        ],
        "summary": "Update a camera model entry.",
        "description": "- Partial update; allows changing the model name and/or manufacturer id.\n- Requires a valid JWT.",
        "operationId": "update_model",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Model ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateModelRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated model",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/monitor-status": {
      "get": {
        "tags": [
          "Monitor Status"
        ],
        "summary": "List all monitor statuses with pagination.",
        "operationId": "list_monitor_statuses",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of monitor statuses",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedMonitorStatusesResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/monitor-status/{monitor_id}": {
      "get": {
        "tags": [
          "Monitor Status"
        ],
        "summary": "Get monitor status by monitor ID.",
        "operationId": "get_monitor_status",
        "parameters": [
          {
            "name": "monitor_id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Monitor status detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorStatusResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Monitor Status"
        ],
        "summary": "Update monitor status.",
        "operationId": "update_monitor_status",
        "parameters": [
          {
            "name": "monitor_id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMonitorStatusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated monitor status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorStatusResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/monitor_presets": {
      "get": {
        "tags": [
          "Monitor Presets"
        ],
        "summary": "List all monitor presets with pagination.",
        "description": "- Requires a valid JWT.",
        "operationId": "list_monitor_presets",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of monitor presets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedMonitorPresetsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Monitor Presets"
        ],
        "summary": "Create a new monitor preset entry.",
        "description": "- Requires a valid JWT.",
        "operationId": "create_monitor_preset",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMonitorPresetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created monitor preset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorPresetResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/monitor_presets/{id}": {
      "get": {
        "tags": [
          "Monitor Presets"
        ],
        "summary": "Get a monitor preset by id.",
        "description": "- Requires a valid JWT; responds 404 if not found.",
        "operationId": "get_monitor_preset",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor Preset ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Monitor preset detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorPresetResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Monitor Presets"
        ],
        "summary": "Delete a monitor preset by id.",
        "description": "- Responds 204 on success, 404 if not found.\n- Requires a valid JWT.",
        "operationId": "delete_monitor_preset",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor Preset ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted monitor preset"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Monitor Presets"
        ],
        "summary": "Update a monitor preset entry.",
        "description": "- Partial update.\n- Requires a valid JWT.",
        "operationId": "update_monitor_preset",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor Preset ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMonitorPresetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated monitor preset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorPresetResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/monitors": {
      "get": {
        "tags": [
          "Monitors"
        ],
        "summary": "List all monitors with pagination.",
        "description": "- Requires a valid JWT.",
        "operationId": "list_monitors",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of monitors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedMonitorsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or missing token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Monitors"
        ],
        "operationId": "create_monitor",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMonitorRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Monitor created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or missing token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "403": {
            "description": "Caller's monitor access is restricted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/monitors-permissions": {
      "get": {
        "tags": [
          "Monitors Permissions"
        ],
        "summary": "List all monitor permissions with pagination.",
        "operationId": "list_monitors_permissions",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of monitor permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedMonitorPermissionsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Monitors Permissions"
        ],
        "summary": "Create a new monitor permission.",
        "operationId": "create_monitor_permission",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMonitorPermissionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created monitor permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorPermissionResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/monitors-permissions/{id}": {
      "get": {
        "tags": [
          "Monitors Permissions"
        ],
        "summary": "Get a monitor permission by id.",
        "operationId": "get_monitor_permission",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Permission ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Monitor permission detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorPermissionResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Monitors Permissions"
        ],
        "summary": "Delete a monitor permission by id.",
        "operationId": "delete_monitor_permission",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Permission ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted monitor permission"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Monitors Permissions"
        ],
        "summary": "Update a monitor permission.",
        "operationId": "update_monitor_permission",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Permission ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMonitorPermissionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated monitor permission",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorPermissionResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/monitors/{id}": {
      "get": {
        "tags": [
          "Monitors"
        ],
        "operationId": "get_monitor",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "View monitor details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or missing token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Monitors"
        ],
        "operationId": "delete_monitor",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Monitor deleted successfully"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Monitors"
        ],
        "operationId": "update_monitor",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMonitorRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Monitor updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or missing token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/monitors/{id}/alarm": {
      "patch": {
        "tags": [
          "Monitors"
        ],
        "operationId": "alarm_control",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AlarmControlRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Monitor alarm controlled successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or missing token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/monitors/{id}/pipeline": {
      "get": {
        "tags": [
          "Monitors"
        ],
        "operationId": "get_monitor_pipeline",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The monitor's stored processing graph",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorPipelineResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor or stored pipeline not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "put": {
        "tags": [
          "Monitors"
        ],
        "operationId": "put_monitor_pipeline",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {}
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Graph replaced",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorPipelineResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid graph",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "403": {
            "description": "Caller's monitor access is restricted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Monitors"
        ],
        "operationId": "delete_monitor_pipeline",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Graph removed (reverts to the default pipeline)"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "403": {
            "description": "Caller's monitor access is restricted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/monitors/{id}/state": {
      "patch": {
        "tags": [
          "Monitors"
        ],
        "operationId": "update_monitor_state",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Monitor state updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or missing token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/monitors/{id}/zmnext": {
      "post": {
        "tags": [
          "Monitors"
        ],
        "operationId": "enable_monitor_zmnext",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Monitor switched to zm-next; default graph materialized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MonitorPipelineResponse"
                }
              }
            }
          },
          "400": {
            "description": "UseZmNext column missing (fork migration required)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "403": {
            "description": "Caller's monitor access is restricted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Monitors"
        ],
        "operationId": "disable_monitor_zmnext",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor identifier",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Monitor reverted to legacy zmc/zma (graph kept dormant)"
          },
          "400": {
            "description": "UseZmNext column missing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "403": {
            "description": "Caller's monitor access is restricted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/monitors/{id}/zones": {
      "get": {
        "tags": [
          "Zones"
        ],
        "summary": "List detection zones configured for a given monitor with pagination.",
        "description": "- Path parameter `id` identifies the monitor.\n- Requires a valid JWT.\n- Returns the minimal shape of each zone (id, name, type, units, coords, etc.).",
        "operationId": "list_by_monitor",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated zones for a monitor",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedZonesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Zones"
        ],
        "summary": "Create a new detection zone for the given monitor.",
        "description": "- Path parameter `id` identifies the monitor.\n- `type`, `units`, and `coords` are expected as strings and converted to DB enums.\n- Requires a valid JWT.",
        "operationId": "create",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateZoneRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created zone",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZoneResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/monitors/{monitor_id}/snapshot": {
      "get": {
        "tags": [
          "Live Streaming"
        ],
        "summary": "Get a JPEG snapshot from a live monitor",
        "operationId": "getMonitorSnapshot",
        "parameters": [
          {
            "name": "monitor_id",
            "in": "path",
            "description": "Monitor/Camera ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JPEG snapshot image",
            "content": {
              "image/jpeg": {}
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/montage_layouts": {
      "get": {
        "tags": [
          "Montage Layouts"
        ],
        "summary": "List all montage layouts with pagination.",
        "description": "- Requires a valid JWT.",
        "operationId": "list_montage_layouts",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of montage layouts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedMontageLayoutsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Montage Layouts"
        ],
        "summary": "Create a new montage layout entry.",
        "description": "- Requires a valid JWT.",
        "operationId": "create_montage_layout",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMontageLayoutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created montage layout",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MontageLayoutResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/montage_layouts/{id}": {
      "get": {
        "tags": [
          "Montage Layouts"
        ],
        "summary": "Get a montage layout by id.",
        "description": "- Requires a valid JWT; responds 404 if not found.",
        "operationId": "get_montage_layout",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Montage Layout ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Montage layout detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MontageLayoutResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Montage Layouts"
        ],
        "summary": "Delete a montage layout by id.",
        "description": "- Responds 204 on success, 404 if not found.\n- Requires a valid JWT.",
        "operationId": "delete_montage_layout",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Montage Layout ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted montage layout"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Montage Layouts"
        ],
        "summary": "Update a montage layout entry.",
        "description": "- Partial update.\n- Requires a valid JWT.",
        "operationId": "update_montage_layout",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Montage Layout ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMontageLayoutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated montage layout",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MontageLayoutResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/object-types": {
      "get": {
        "tags": [
          "Object Types"
        ],
        "summary": "List all object types with pagination.",
        "description": "- Requires a valid JWT.",
        "operationId": "list_object_types",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of object types",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedObjectTypesResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Object Types"
        ],
        "summary": "Create a new object type.",
        "operationId": "create_object_type",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateObjectTypeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created object type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectTypeResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/object-types/{id}": {
      "get": {
        "tags": [
          "Object Types"
        ],
        "summary": "Get an object type by id.",
        "operationId": "get_object_type",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Object Type ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Object type detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectTypeResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Object Types"
        ],
        "summary": "Delete an object type by id.",
        "operationId": "delete_object_type",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Object Type ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted object type"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Object Types"
        ],
        "summary": "Update an object type.",
        "operationId": "update_object_type",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Object Type ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateObjectTypeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated object type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectTypeResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/absolute": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Move to absolute position",
        "operationId": "ptzMoveAbsolute",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PtzAbsoluteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/capabilities": {
      "get": {
        "tags": [
          "PTZ"
        ],
        "summary": "Get PTZ capabilities for a monitor",
        "operationId": "getPtzCapabilities",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PTZ capabilities",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCapabilitiesResponse"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/focus/auto": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Auto focus",
        "operationId": "ptzFocusAuto",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/focus/far": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Focus far",
        "operationId": "ptzFocusFar",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PtzFocusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/focus/near": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Focus near",
        "operationId": "ptzFocusNear",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PtzFocusRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/focus/stop": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Stop focus",
        "operationId": "ptzFocusStop",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/home": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Go to home position",
        "operationId": "ptzGotoHome",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/iris/auto": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Enable auto-iris",
        "operationId": "ptzIrisAuto",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/iris/close": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Close the iris",
        "operationId": "ptzIrisClose",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/iris/open": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Open the iris",
        "operationId": "ptzIrisOpen",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/iris/stop": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Stop iris movement",
        "operationId": "ptzIrisStop",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/move/down": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Move camera down",
        "operationId": "ptzMoveDown",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PtzMoveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/move/down-left": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Move camera diagonally down-left",
        "operationId": "ptzMoveDownLeft",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PtzMoveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/move/down-right": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Move camera diagonally down-right",
        "operationId": "ptzMoveDownRight",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PtzMoveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/move/left": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Move camera left",
        "operationId": "ptzMoveLeft",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PtzMoveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/move/right": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Move camera right",
        "operationId": "ptzMoveRight",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PtzMoveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/move/stop": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Stop camera movement",
        "operationId": "ptzMoveStop",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/move/up": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Move camera up",
        "operationId": "ptzMoveUp",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PtzMoveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/move/up-left": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Move camera diagonally up-left",
        "operationId": "ptzMoveUpLeft",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PtzMoveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/move/up-right": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Move camera diagonally up-right",
        "operationId": "ptzMoveUpRight",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PtzMoveRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/power/reboot": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Reboot the camera",
        "operationId": "ptzPowerReboot",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/power/reset": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Reset the camera",
        "operationId": "ptzPowerReset",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/power/sleep": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Put the camera to sleep",
        "operationId": "ptzPowerSleep",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/power/wake": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Wake the camera",
        "operationId": "ptzPowerWake",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/presets/{preset_id}": {
      "delete": {
        "tags": [
          "PTZ"
        ],
        "summary": "Clear preset",
        "operationId": "ptzClearPreset",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "preset_id",
            "in": "path",
            "description": "Preset ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/presets/{preset_id}/goto": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Go to preset",
        "operationId": "ptzGotoPreset",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "preset_id",
            "in": "path",
            "description": "Preset ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/presets/{preset_id}/set": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Set preset",
        "operationId": "ptzSetPreset",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          },
          {
            "name": "preset_id",
            "in": "path",
            "description": "Preset ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PtzPresetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/relative": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Move relative",
        "operationId": "ptzMoveRelative",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PtzRelativeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/status": {
      "get": {
        "tags": [
          "PTZ"
        ],
        "summary": "Get PTZ status for a monitor",
        "operationId": "getPtzStatus",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "PTZ status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzStatusResponse"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/zoom/in": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Zoom in",
        "operationId": "ptzZoomIn",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PtzZoomRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/zoom/out": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Zoom out",
        "operationId": "ptzZoomOut",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PtzZoomRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/monitors/{id}/zoom/stop": {
      "post": {
        "tags": [
          "PTZ"
        ],
        "summary": "Stop zoom",
        "operationId": "ptzZoomStop",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Command executed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzCommandResponse"
                }
              }
            }
          },
          "404": {
            "description": "Monitor not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/ptz/protocols": {
      "get": {
        "tags": [
          "PTZ"
        ],
        "summary": "List available PTZ protocols",
        "operationId": "listPtzProtocols",
        "responses": {
          "200": {
            "description": "List of PTZ protocols",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PtzProtocolListResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/reports": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "List all reports with pagination.",
        "description": "- Requires a valid JWT.",
        "operationId": "list_reports",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of reports",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedReportsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Reports"
        ],
        "summary": "Create a new report.",
        "operationId": "create_report",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created report",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/reports/{id}": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Get a report by id.",
        "operationId": "get_report",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Report ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Report detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Reports"
        ],
        "summary": "Delete a report by id.",
        "operationId": "delete_report",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Report ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted report"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Reports"
        ],
        "summary": "Update a report.",
        "operationId": "update_report",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Report ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateReportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated report",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/search": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Natural-language event search: hybrid retrieval (vector ANN + lexical FTS,\nRRF-fused and cross-encoder reranked), an exact count for \"how many …\"\nqueries, and a grounded NL answer when the router LLM is reachable.",
        "operationId": "searchEvents",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Natural-language query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "person at the front door at night"
          },
          {
            "name": "monitor_id",
            "in": "query",
            "description": "Restrict to one monitor (subject to ACL)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "from",
            "in": "query",
            "description": "Inclusive lower time bound, epoch seconds",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "example": 1700000000
          },
          {
            "name": "to",
            "in": "query",
            "description": "Inclusive upper time bound, epoch seconds",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "example": 1700003600
          },
          {
            "name": "class",
            "in": "query",
            "description": "Comma-separated object/class pre-filter",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "person,car"
          },
          {
            "name": "k",
            "in": "query",
            "description": "Number of results (1-50, default 10)",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "example": 10
          }
        ],
        "responses": {
          "200": {
            "description": "Search results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "503": {
            "description": "Search disabled / no backend",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/server-stats": {
      "get": {
        "tags": [
          "Server Stats"
        ],
        "summary": "List all server stats with pagination.",
        "operationId": "list_server_stats",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of server stats",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedServerStatsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Server Stats"
        ],
        "summary": "Create a new server stat entry.",
        "operationId": "create_server_stat",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateServerStatRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created server stat",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerStatResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/server-stats/{id}": {
      "get": {
        "tags": [
          "Server Stats"
        ],
        "summary": "Get a server stat by id.",
        "operationId": "get_server_stat",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Server Stat ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Server stat detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerStatResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Server Stats"
        ],
        "summary": "Delete a server stat by id.",
        "operationId": "delete_server_stat",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Server Stat ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted server stat"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/server/control/{action}": {
      "post": {
        "tags": [
          "Server"
        ],
        "summary": "Control the ZoneMinder system (restart/stop/start)",
        "description": "- Restarts/stops/starts the ZoneMinder system via systemctl (zmcontrol.pl fallback).\n- This is NOT run-state application; use POST /api/v3/system/state for that.\n- Requires a valid JWT with admin (System) permissions.",
        "operationId": "change_state",
        "parameters": [
          {
            "name": "action",
            "in": "path",
            "description": "Action to perform: restart, stop, or start",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "System control action performed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          },
          "500": {
            "description": "Failed to perform action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/server/health_check": {
      "get": {
        "tags": [
          "Server"
        ],
        "operationId": "health_check",
        "responses": {
          "200": {
            "description": "check service is up",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v3/servers": {
      "get": {
        "tags": [
          "Servers"
        ],
        "summary": "List registered ZoneMinder servers with pagination.",
        "description": "- Requires a valid JWT.",
        "operationId": "list_servers",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of servers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedServersResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Servers"
        ],
        "summary": "Register a new server record.",
        "description": "- Accepts optional hostname/port/status; status is provided as a string and mapped to enum.\n- Requires a valid JWT.",
        "operationId": "create_server",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateServerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created server",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/servers/{id}": {
      "get": {
        "tags": [
          "Servers"
        ],
        "summary": "Get a server by id.",
        "description": "- Requires a valid JWT; responds 404 if not found.",
        "operationId": "get_server",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Server ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Server detail",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Servers"
        ],
        "summary": "Delete a server by id.",
        "description": "- Responds 204 on success, 404 if not found.\n- Requires a valid JWT.",
        "operationId": "delete_server",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Server ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted server"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Servers"
        ],
        "summary": "Update server fields (partial update).",
        "description": "- Applies provided fields; status string is mapped to the DB enum.\n- Requires a valid JWT.",
        "operationId": "update_server",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Server ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateServerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated server",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/sessions": {
      "get": {
        "tags": [
          "Sessions"
        ],
        "summary": "List all sessions with pagination.",
        "description": "- Requires a valid JWT.",
        "operationId": "list_sessions",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of PHP web-UI sessions (not API tokens)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedSessionsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Sessions"
        ],
        "summary": "Create a new session entry.",
        "description": "- Requires a valid JWT.",
        "operationId": "create_session",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/sessions/{id}": {
      "get": {
        "tags": [
          "Sessions"
        ],
        "summary": "Get a session by id.",
        "description": "- Requires a valid JWT; responds 404 if not found.",
        "operationId": "get_session",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Session detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Sessions"
        ],
        "summary": "Delete a session by id.",
        "description": "- Responds 204 on success, 404 if not found.\n- Requires a valid JWT.",
        "operationId": "delete_session",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted session"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Sessions"
        ],
        "summary": "Update a session entry.",
        "description": "- Partial update.\n- Requires a valid JWT.",
        "operationId": "update_session",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Session ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/snapshots": {
      "get": {
        "tags": [
          "Snapshots"
        ],
        "summary": "List all snapshots with pagination.",
        "description": "- Requires a valid JWT.",
        "operationId": "list_snapshots",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of snapshots",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedSnapshotsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Snapshots"
        ],
        "summary": "Create a new snapshot entry.",
        "description": "- Requires a valid JWT.",
        "operationId": "create_snapshot",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSnapshotRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/snapshots-events": {
      "get": {
        "tags": [
          "Snapshots Events"
        ],
        "summary": "List all snapshot-event associations with pagination.",
        "operationId": "list_snapshot_events",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of snapshot-event associations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedSnapshotEventsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Snapshots Events"
        ],
        "summary": "Create a new snapshot-event association.",
        "operationId": "create_snapshot_event",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSnapshotEventRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created snapshot-event association",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotEventResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/snapshots-events/{id}": {
      "get": {
        "tags": [
          "Snapshots Events"
        ],
        "summary": "Get a snapshot-event association by id.",
        "operationId": "get_snapshot_event",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Association ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Snapshot-event association detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotEventResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Snapshots Events"
        ],
        "summary": "Delete a snapshot-event association by id.",
        "operationId": "delete_snapshot_event",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Association ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted snapshot-event association"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/snapshots/{id}": {
      "get": {
        "tags": [
          "Snapshots"
        ],
        "summary": "Get a snapshot by id.",
        "description": "- Requires a valid JWT; responds 404 if not found.",
        "operationId": "get_snapshot",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Snapshot ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Snapshot detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Snapshots"
        ],
        "summary": "Delete a snapshot by id.",
        "description": "- Responds 204 on success, 404 if not found.\n- Requires a valid JWT.",
        "operationId": "delete_snapshot",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Snapshot ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted snapshot"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Snapshots"
        ],
        "summary": "Update a snapshot entry.",
        "description": "- Partial update.\n- Requires a valid JWT.",
        "operationId": "update_snapshot",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Snapshot ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSnapshotRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/states": {
      "get": {
        "tags": [
          "States"
        ],
        "summary": "List all states with pagination.",
        "description": "- Requires a valid JWT.",
        "operationId": "list_states",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of states",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedStatesResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "States"
        ],
        "summary": "Create a new state entry.",
        "description": "- Requires a valid JWT.\n- Name must be unique.",
        "operationId": "create_state",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateStateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StateResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/states/{id}": {
      "get": {
        "tags": [
          "States"
        ],
        "summary": "Get a state by id.",
        "description": "- Requires a valid JWT; responds 404 if not found.",
        "operationId": "get_state",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "State ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "State detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StateResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "States"
        ],
        "summary": "Delete a state by id.",
        "description": "- Responds 204 on success, 404 if not found.\n- Requires a valid JWT.",
        "operationId": "delete_state",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "State ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted state"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "States"
        ],
        "summary": "Update a state entry.",
        "description": "- Partial update.\n- Requires a valid JWT.",
        "operationId": "update_state_preset",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "State ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StateResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/stats": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "List all stats with pagination.",
        "description": "- Requires a valid JWT.",
        "operationId": "list_stats",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of stats",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedStatsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Stats"
        ],
        "summary": "Create a new stat entry.",
        "description": "- Requires a valid JWT.",
        "operationId": "create_stat",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateStatRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created stat",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/stats/{id}": {
      "get": {
        "tags": [
          "Stats"
        ],
        "summary": "Get a stat by id.",
        "description": "- Requires a valid JWT; responds 404 if not found.",
        "operationId": "get_stat",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Stat ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stat detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Stats"
        ],
        "summary": "Delete a stat by id.",
        "description": "- Responds 204 on success, 404 if not found.\n- Requires a valid JWT.",
        "operationId": "delete_stat",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Stat ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted stat"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Stats"
        ],
        "summary": "Update a stat entry.",
        "description": "- Partial update.\n- Requires a valid JWT.",
        "operationId": "update_stat",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Stat ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated stat",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/storage": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "List storage definitions used by ZoneMinder for event/video storage.",
        "description": "- Requires a valid JWT.",
        "operationId": "list_storage",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of storage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedStorageResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Storage"
        ],
        "summary": "Create a new storage entry.",
        "description": "- Accepts `type` and `scheme` as strings; converted to DB enums.\n- Requires a valid JWT.",
        "operationId": "create_storage",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateStorageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created storage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/storage/{id}": {
      "get": {
        "tags": [
          "Storage"
        ],
        "summary": "Get a storage entry by id.",
        "description": "- Requires a valid JWT; responds 404 if not found.",
        "operationId": "get_storage",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Storage ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Storage detail",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Storage"
        ],
        "summary": "Delete a storage entry by id.",
        "description": "- Responds 204 on success, 404 if not found.\n- Requires a valid JWT.",
        "operationId": "delete_storage",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Storage ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted storage"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Storage"
        ],
        "summary": "Update storage fields (partial update).",
        "description": "- Applies provided fields; type/scheme strings are mapped to enums.\n- Requires a valid JWT.",
        "operationId": "update_storage",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Storage ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStorageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated storage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/system/locale": {
      "get": {
        "tags": [
          "Server"
        ],
        "summary": "Server locale: effective timezone, current UTC offset, and ZoneMinder's\ndate/time format patterns, for rendering server-local time (GH #33).",
        "operationId": "get_locale",
        "responses": {
          "200": {
            "description": "Server timezone and date/time formats",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocaleResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/system/logrot": {
      "post": {
        "tags": [
          "System"
        ],
        "summary": "Trigger log rotation for all daemons.",
        "operationId": "system_logrot",
        "responses": {
          "200": {
            "description": "Log rotation triggered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DaemonActionResponse"
                }
              }
            }
          },
          "503": {
            "description": "Daemon manager not available"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/system/restart": {
      "post": {
        "tags": [
          "System"
        ],
        "summary": "Perform full system restart.",
        "operationId": "system_restart",
        "responses": {
          "200": {
            "description": "System restarted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DaemonActionResponse"
                }
              }
            }
          },
          "503": {
            "description": "Daemon manager not available"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/system/shutdown": {
      "post": {
        "tags": [
          "System"
        ],
        "summary": "Perform full system shutdown.",
        "operationId": "system_shutdown",
        "responses": {
          "200": {
            "description": "System shutdown initiated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DaemonActionResponse"
                }
              }
            }
          },
          "503": {
            "description": "Daemon manager not available"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/system/startup": {
      "post": {
        "tags": [
          "System"
        ],
        "summary": "Perform full system startup.",
        "operationId": "system_startup",
        "responses": {
          "200": {
            "description": "System started",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DaemonActionResponse"
                }
              }
            }
          },
          "503": {
            "description": "Daemon manager not available"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/system/state": {
      "post": {
        "tags": [
          "System"
        ],
        "summary": "Apply a system state.",
        "description": "States are predefined monitor configurations stored in the database.\nApplying a state updates monitor Function/Enabled settings and restarts affected daemons.",
        "operationId": "apply_state",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyStateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "State applied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DaemonActionResponse"
                }
              }
            }
          },
          "404": {
            "description": "State not found"
          },
          "503": {
            "description": "Daemon manager not available"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/system/status": {
      "get": {
        "tags": [
          "System"
        ],
        "summary": "Get system status.",
        "operationId": "get_system_status",
        "responses": {
          "200": {
            "description": "System status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SystemStatusResponse"
                }
              }
            }
          },
          "503": {
            "description": "Daemon manager not available"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/tags": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "List all tags with pagination.",
        "description": "- Requires a valid JWT.\n- Returns event_count for each tag.",
        "operationId": "list_tags",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of tags with event counts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedTagsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Tags"
        ],
        "summary": "Create a new tag entry.",
        "description": "- Requires a valid JWT.\n- Name must be unique.",
        "operationId": "create_tag",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTagRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created tag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/tags/{id}": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "Get a tag by id with paginated events.",
        "description": "- Requires a valid JWT; responds 404 if not found.\n- Returns associated events with pagination.",
        "operationId": "get_tag",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Tag ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (default 20)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tag detail with paginated events",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagDetailResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Tags"
        ],
        "summary": "Delete a tag by id.",
        "description": "- Responds 204 on success, 404 if not found.\n- Requires a valid JWT.",
        "operationId": "delete_tag",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Tag ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted tag"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Tags"
        ],
        "summary": "Update a tag entry.",
        "description": "- Partial update.\n- Requires a valid JWT.",
        "operationId": "update_tag",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Tag ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTagRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated tag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TagResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/triggers_x10": {
      "get": {
        "tags": [
          "TriggersX10"
        ],
        "summary": "List all X10 triggers with pagination.",
        "description": "- Requires a valid JWT.",
        "operationId": "list_triggers_x10",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of X10 triggers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedTriggersX10Response"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "TriggersX10"
        ],
        "summary": "Create a new X10 trigger entry.",
        "description": "- Requires a valid JWT.\n- monitor_id is the primary key.",
        "operationId": "create_trigger_x10",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTriggerX10Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created X10 trigger",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerX10Response"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/triggers_x10/{monitor_id}": {
      "get": {
        "tags": [
          "TriggersX10"
        ],
        "summary": "Get an X10 trigger by monitor_id.",
        "description": "- Requires a valid JWT; responds 404 if not found.",
        "operationId": "get_trigger_x10",
        "parameters": [
          {
            "name": "monitor_id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "X10 trigger detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerX10Response"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "TriggersX10"
        ],
        "summary": "Delete an X10 trigger by monitor_id.",
        "description": "- Responds 204 on success, 404 if not found.\n- Requires a valid JWT.",
        "operationId": "delete_trigger_x10",
        "parameters": [
          {
            "name": "monitor_id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted X10 trigger"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "TriggersX10"
        ],
        "summary": "Update an X10 trigger entry.",
        "description": "- Partial update.\n- Requires a valid JWT.",
        "operationId": "update_trigger_x10",
        "parameters": [
          {
            "name": "monitor_id",
            "in": "path",
            "description": "Monitor ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTriggerX10Request"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated X10 trigger",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TriggerX10Response"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/user_preferences": {
      "get": {
        "tags": [
          "User Preferences"
        ],
        "summary": "List user preferences with pagination.",
        "description": "- Requires a valid JWT.",
        "operationId": "list_user_preferences",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of user preferences",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedUserPreferencesResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "User Preferences"
        ],
        "summary": "Create a new user preference entry.",
        "description": "- Requires a valid JWT.",
        "operationId": "create_user_preference",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserPreferenceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created user preference",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserPreferenceResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/user_preferences/{id}": {
      "get": {
        "tags": [
          "User Preferences"
        ],
        "summary": "Get a user preference by id.",
        "description": "- Requires a valid JWT; responds 404 if not found.",
        "operationId": "get_user_preference",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "User Preference ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User preference detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserPreferenceResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "User Preferences"
        ],
        "summary": "Delete a user preference by id.",
        "description": "- Responds 204 on success, 404 if not found.\n- Requires a valid JWT.",
        "operationId": "delete_user_preference",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "User Preference ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted user preference"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "User Preferences"
        ],
        "summary": "Update a user preference entry.",
        "description": "- Partial update.\n- Requires a valid JWT.",
        "operationId": "update_user_preference",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "User Preference ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserPreferenceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated user preference",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserPreferenceResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "List ZoneMinder users with pagination.",
        "description": "- Requires a valid JWT with appropriate permissions.",
        "operationId": "list_users",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of users",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedUsersResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Create a new user with initial credentials.",
        "description": "- Sets sensible permission defaults unless explicitly configured.\n- Requires a valid JWT with admin permissions.",
        "operationId": "create_user",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/users/{id}": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get a single user by id.",
        "description": "- Requires a valid JWT.",
        "operationId": "get_user",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "User ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User detail",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "Update user fields.",
        "description": "- Partial update; only provided fields are changed. Can set the profile\n  fields, a new password (re-hashed), the eight permission levels, and the\n  token-revocation floor (admin revoke-all).\n- Requires a valid JWT with System (admin) permission.",
        "operationId": "update_user",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "User ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Delete a user by id.",
        "description": "- Responds 204 on success, 404 if not found.\n- Requires a valid JWT with admin permissions.",
        "operationId": "delete_user",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "User ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted user"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/zone-presets": {
      "get": {
        "tags": [
          "Zones"
        ],
        "summary": "List available zone presets which define reusable zone parameters.",
        "description": "- Useful for applying consistent detection thresholds across monitors.\n- Requires a valid JWT.",
        "operationId": "list_zone_presets",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number (1-indexed)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 1
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Items per page (max 1000)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64",
              "minimum": 0
            },
            "example": 25
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of zone presets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedZonePresetsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "post": {
        "tags": [
          "Zones"
        ],
        "summary": "Create a new zone preset.",
        "description": "- Accepts string variants for `type`, `units`, and `check_method` which are converted to enums.\n- Requires a valid JWT.",
        "operationId": "create_zone_preset",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateZonePresetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created zone preset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZonePresetResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/zone-presets/{id}": {
      "get": {
        "tags": [
          "Zones"
        ],
        "summary": "Get a single zone preset by id.",
        "description": "- Requires a valid JWT; responds 404 if not found.",
        "operationId": "get_zone_preset",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Zone preset ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Zone preset detail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZonePresetResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Zones"
        ],
        "summary": "Delete a zone preset by id.",
        "description": "- Responds 204 on success, 404 if not found.\n- Requires a valid JWT.",
        "operationId": "delete_zone_preset",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Zone preset ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted zone preset"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Zones"
        ],
        "summary": "Update fields of an existing zone preset (partial update).",
        "description": "- Fields are optional and applied when present.\n- Requires a valid JWT; responds 404 if not found.",
        "operationId": "update_zone_preset",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Zone preset ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateZonePresetRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated zone preset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZonePresetResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    },
    "/api/v3/zones/{id}": {
      "get": {
        "tags": [
          "Zones"
        ],
        "summary": "Fetch a single detection zone by its identifier.",
        "description": "- Responds with 404 when the zone does not exist.\n- Requires a valid JWT.",
        "operationId": "get",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Zone ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Zone details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZoneResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          },
          "404": {
            "description": "Zone not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "put": {
        "tags": [
          "Zones"
        ],
        "summary": "Update a zone's name and/or polygon geometry for an existing zone.",
        "description": "- Only `name` and `polygon` (coords) are supported for updates here.\n- Requires a valid JWT.",
        "operationId": "update",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Zone ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateZoneRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated zone",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ZoneResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppResponseError"
                }
              }
            }
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Zones"
        ],
        "summary": "Delete a detection zone by id.",
        "description": "- Responds with 204 on success, 404 if not found.\n- Requires a valid JWT.",
        "operationId": "delete",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Zone ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted zone"
          }
        },
        "security": [
          {
            "jwt": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AiDatasetResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "num_classes"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": "string"
          },
          "num_classes": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "version": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "AiModelResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "framework",
          "enabled"
        ],
        "properties": {
          "dataset_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "dataset_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the linked dataset, when the listing joins it."
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "enabled": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "framework": {
            "type": "string",
            "description": "One of TensorFlow, PyTorch, ONNX, OpenVINO, TensorRT, Other."
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "model_path": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "version": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "AiObjectClassResponse": {
        "type": "object",
        "required": [
          "id",
          "dataset_id",
          "class_name",
          "class_index"
        ],
        "properties": {
          "class_index": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "class_name": {
            "type": "string"
          },
          "dataset_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "AlarmControlRequest": {
        "type": "object",
        "required": [
          "action"
        ],
        "properties": {
          "action": {
            "type": "string",
            "description": "Action to perform: \"on\" (trigger), \"off\"/\"cancel\" (cancel), \"status\" (get status)"
          },
          "cause": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short cause string (max 31 chars). Only used when action is \"on\". Default: \"API\""
          },
          "score": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Alarm score (1-100+). Only used when action is \"on\". Default: 100",
            "minimum": 0
          },
          "text": {
            "type": [
              "string",
              "null"
            ],
            "description": "Description text (max 255 chars). Only used when action is \"on\"."
          }
        }
      },
      "Analysing": {
        "type": "string",
        "enum": [
          "None",
          "Always"
        ]
      },
      "AnalysisImage": {
        "type": "string",
        "enum": [
          "FullColour",
          "YChannel"
        ]
      },
      "AnalysisSource": {
        "type": "string",
        "enum": [
          "Primary",
          "Secondary"
        ]
      },
      "AppError": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "NotFoundError"
            ],
            "properties": {
              "NotFoundError": {
                "$ref": "#/components/schemas/Resource"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "NotAvailableError"
            ],
            "properties": {
              "NotAvailableError": {
                "$ref": "#/components/schemas/Resource"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "ResourceExistsError"
            ],
            "properties": {
              "ResourceExistsError": {
                "$ref": "#/components/schemas/Resource"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "PermissionDeniedError"
            ],
            "properties": {
              "PermissionDeniedError": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "UserNotActiveError"
            ],
            "properties": {
              "UserNotActiveError": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "InvalidSessionError"
            ],
            "properties": {
              "InvalidSessionError": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "ConflictError"
            ],
            "properties": {
              "ConflictError": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "UnauthorizedError"
            ],
            "properties": {
              "UnauthorizedError": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "BadRequestError"
            ],
            "properties": {
              "BadRequestError": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "InvalidPayloadError"
            ],
            "properties": {
              "InvalidPayloadError": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "HashError"
            ],
            "properties": {
              "HashError": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "InternalServerError"
            ],
            "properties": {
              "InternalServerError": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "ServiceUnavailableError"
            ],
            "properties": {
              "ServiceUnavailableError": {
                "type": "string"
              }
            }
          },
          {
            "type": "object",
            "required": [
              "InvalidInputError"
            ],
            "properties": {
              "InvalidInputError": {
                "type": "string"
              }
            },
            "example": "Validation failed"
          },
          {
            "type": "object",
            "required": [
              "DatabaseError"
            ],
            "properties": {
              "DatabaseError": {
                "type": "string"
              }
            },
            "example": "Database error"
          },
          {
            "type": "object",
            "required": [
              "WebSocketError"
            ],
            "properties": {
              "WebSocketError": {
                "type": "string"
              }
            },
            "example": "WebSocket error"
          },
          {
            "type": "object",
            "required": [
              "IoError"
            ],
            "properties": {
              "IoError": {
                "type": "string"
              }
            },
            "example": "IO error"
          },
          {
            "type": "object",
            "required": [
              "UuidError"
            ],
            "properties": {
              "UuidError": {
                "type": "string"
              }
            },
            "example": "UUID error"
          },
          {
            "type": "object",
            "required": [
              "JwtError"
            ],
            "properties": {
              "JwtError": {
                "type": "string"
              }
            },
            "example": "JWT error"
          },
          {
            "type": "object",
            "required": [
              "HttpClientError"
            ],
            "properties": {
              "HttpClientError": {
                "type": "string"
              }
            },
            "example": "HTTP client error"
          },
          {
            "type": "object",
            "required": [
              "ConfigError"
            ],
            "properties": {
              "ConfigError": {
                "type": "string"
              }
            },
            "example": "Config error"
          },
          {
            "type": "object",
            "required": [
              "ParseJsonError"
            ],
            "properties": {
              "ParseJsonError": {
                "type": "string"
              }
            },
            "example": "JSON parse error"
          },
          {
            "type": "object",
            "required": [
              "ParseFloatError"
            ],
            "properties": {
              "ParseFloatError": {
                "type": "string"
              }
            },
            "example": "Float parse error"
          },
          {
            "type": "object",
            "required": [
              "AddrParseError"
            ],
            "properties": {
              "AddrParseError": {
                "type": "string"
              }
            },
            "example": "Address parse error"
          },
          {
            "type": "object",
            "required": [
              "SpawnTaskError"
            ],
            "properties": {
              "SpawnTaskError": {
                "type": "string"
              }
            },
            "example": "Task join error"
          },
          {
            "type": "object",
            "required": [
              "Base64Error"
            ],
            "properties": {
              "Base64Error": {
                "type": "string"
              }
            },
            "example": "Base64 decode error"
          },
          {
            "type": "object",
            "required": [
              "StrumParseError"
            ],
            "properties": {
              "StrumParseError": {
                "type": "string"
              }
            },
            "example": "Enum parse error"
          },
          {
            "type": "object",
            "required": [
              "SystemTimeError"
            ],
            "properties": {
              "SystemTimeError": {
                "type": "string"
              }
            },
            "example": "System time error"
          },
          {
            "type": "object",
            "required": [
              "AxumError"
            ],
            "properties": {
              "AxumError": {
                "type": "string"
              }
            },
            "example": "Axum error"
          },
          {
            "type": "object",
            "required": [
              "UnknownError"
            ],
            "properties": {
              "UnknownError": {
                "type": "string"
              }
            },
            "example": "Unknown error"
          },
          {
            "type": "object",
            "required": [
              "Infallible"
            ],
            "properties": {
              "Infallible": {
                "type": "string"
              }
            },
            "example": "Infallible error"
          },
          {
            "type": "object",
            "required": [
              "TypeHeaderError"
            ],
            "properties": {
              "TypeHeaderError": {
                "type": "string"
              }
            },
            "example": "Typed header error"
          }
        ]
      },
      "AppResponseError": {
        "type": "object",
        "required": [
          "kind",
          "error_message",
          "details"
        ],
        "properties": {
          "code": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "details": {
            "type": "array",
            "items": {
              "type": "array",
              "items": false,
              "prefixItems": [
                {
                  "type": "string"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          "error_message": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          }
        }
      },
      "ApplyStateRequest": {
        "type": "object",
        "description": "Request to apply a system state.",
        "required": [
          "state_name"
        ],
        "properties": {
          "state_name": {
            "type": "string",
            "description": "Name of the state to apply"
          }
        }
      },
      "AxisCapabilities": {
        "type": "object",
        "description": "Capability flags for an axis (zoom, focus, iris, gain, white balance)",
        "required": [
          "can",
          "can_auto",
          "can_abs",
          "can_rel",
          "can_con",
          "range",
          "step",
          "speed"
        ],
        "properties": {
          "can": {
            "type": "boolean",
            "description": "Can perform this operation at all"
          },
          "can_abs": {
            "type": "boolean",
            "description": "Supports absolute positioning"
          },
          "can_auto": {
            "type": "boolean",
            "description": "Has auto mode"
          },
          "can_con": {
            "type": "boolean",
            "description": "Supports continuous movement"
          },
          "can_rel": {
            "type": "boolean",
            "description": "Supports relative movements"
          },
          "range": {
            "$ref": "#/components/schemas/AxisRange",
            "description": "Range limits"
          },
          "speed": {
            "$ref": "#/components/schemas/AxisSpeed",
            "description": "Speed limits"
          },
          "step": {
            "$ref": "#/components/schemas/AxisStep",
            "description": "Step limits"
          }
        }
      },
      "AxisRange": {
        "type": "object",
        "description": "Range limits for a PTZ axis (pan, tilt, zoom, etc.)",
        "properties": {
          "max": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          }
        }
      },
      "AxisSpeed": {
        "type": "object",
        "description": "Speed limits for an axis",
        "required": [
          "has_speed"
        ],
        "properties": {
          "has_speed": {
            "type": "boolean"
          },
          "max": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          }
        }
      },
      "AxisStep": {
        "type": "object",
        "description": "Step limits for incremental movements",
        "properties": {
          "max": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          }
        }
      },
      "Capturing": {
        "type": "string",
        "enum": [
          "None",
          "Ondemand",
          "Always"
        ]
      },
      "CategoryCountResponse": {
        "type": "object",
        "required": [
          "category",
          "count"
        ],
        "properties": {
          "category": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "ChangePasswordRequest": {
        "type": "object",
        "description": "Self-service password change for the authenticated user (`PUT /me/password`).",
        "required": [
          "current_password",
          "new_password"
        ],
        "properties": {
          "current_password": {
            "type": "string"
          },
          "new_password": {
            "type": "string"
          }
        }
      },
      "ConfigQueryParams": {
        "type": "object",
        "properties": {
          "category": {
            "type": [
              "string",
              "null"
            ],
            "description": "Exact match on Category column"
          },
          "page": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "example": 1,
            "minimum": 1
          },
          "page_size": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "example": 25,
            "maximum": 1000,
            "minimum": 1
          },
          "search": {
            "type": [
              "string",
              "null"
            ],
            "description": "Substring match on Name column"
          }
        }
      },
      "ConfigResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "value",
          "type",
          "category",
          "readonly",
          "private",
          "system"
        ],
        "properties": {
          "category": {
            "type": "string"
          },
          "default_value": {
            "type": [
              "string",
              "null"
            ]
          },
          "format": {
            "type": [
              "string",
              "null"
            ]
          },
          "help": {
            "type": [
              "string",
              "null"
            ]
          },
          "hint": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": "string"
          },
          "pattern": {
            "type": [
              "string",
              "null"
            ]
          },
          "private": {
            "type": "integer",
            "format": "int32"
          },
          "prompt": {
            "type": [
              "string",
              "null"
            ]
          },
          "readonly": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "system": {
            "type": "integer",
            "format": "int32"
          },
          "type": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "ControlPresetResponse": {
        "type": "object",
        "required": [
          "monitor_id",
          "preset",
          "label"
        ],
        "properties": {
          "label": {
            "type": "string"
          },
          "monitor_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "preset": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "ControlResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "type",
          "can_wake",
          "can_sleep",
          "can_reset",
          "can_reboot",
          "can_zoom",
          "can_auto_zoom",
          "can_zoom_abs",
          "can_zoom_rel",
          "can_zoom_con",
          "has_zoom_speed",
          "can_focus",
          "can_auto_focus",
          "can_focus_abs",
          "can_focus_rel",
          "can_focus_con",
          "has_focus_speed",
          "can_iris",
          "can_auto_iris",
          "can_iris_abs",
          "can_iris_rel",
          "can_iris_con",
          "has_iris_speed",
          "can_gain",
          "can_auto_gain",
          "can_gain_abs",
          "can_gain_rel",
          "can_gain_con",
          "has_gain_speed",
          "can_white",
          "can_auto_white",
          "can_white_abs",
          "can_white_rel",
          "can_white_con",
          "has_white_speed",
          "has_presets",
          "num_presets",
          "has_home_preset",
          "can_set_presets",
          "can_move",
          "can_move_diag",
          "can_move_map",
          "can_move_abs",
          "can_move_rel",
          "can_move_con",
          "can_pan",
          "has_pan_speed",
          "has_turbo_pan",
          "can_tilt",
          "has_tilt_speed",
          "has_turbo_tilt",
          "can_auto_scan",
          "num_scan_paths"
        ],
        "properties": {
          "can_auto_focus": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_auto_gain": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_auto_iris": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_auto_scan": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_auto_white": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_auto_zoom": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_focus": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_focus_abs": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_focus_con": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_focus_rel": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_gain": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_gain_abs": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_gain_con": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_gain_rel": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_iris": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_iris_abs": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_iris_con": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_iris_rel": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_move": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_move_abs": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_move_con": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_move_diag": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_move_map": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_move_rel": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_pan": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_reboot": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_reset": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_set_presets": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_sleep": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_tilt": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_wake": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_white": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_white_abs": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_white_con": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_white_rel": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_zoom": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_zoom_abs": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_zoom_con": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "can_zoom_rel": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "has_focus_speed": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "has_gain_speed": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "has_home_preset": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "has_iris_speed": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "has_pan_speed": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "has_presets": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "has_tilt_speed": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "has_turbo_pan": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "has_turbo_tilt": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "has_white_speed": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "has_zoom_speed": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "max_focus_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_focus_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_focus_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_gain_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_gain_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_gain_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_iris_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_iris_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_iris_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_pan_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "max_pan_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "max_pan_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "max_tilt_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "max_tilt_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "max_tilt_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "max_white_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_white_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_white_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_zoom_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_zoom_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_zoom_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_focus_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_focus_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_focus_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_gain_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_gain_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_gain_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_iris_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_iris_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_iris_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_pan_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min_pan_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min_pan_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min_tilt_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min_tilt_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min_tilt_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min_white_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_white_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_white_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_zoom_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_zoom_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_zoom_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": "string"
          },
          "num_presets": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "num_scan_paths": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "protocol": {
            "type": [
              "string",
              "null"
            ]
          },
          "turbo_pan_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "turbo_tilt_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "type": {
            "$ref": "#/components/schemas/MonitorType"
          }
        }
      },
      "CreateAiDatasetRequest": {
        "type": "object",
        "required": [
          "name",
          "num_classes"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "num_classes": {
            "type": "integer",
            "format": "int32",
            "description": "Number of classes the dataset defines (COCO = 80).",
            "minimum": 0
          },
          "version": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateAiModelRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "dataset_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Dataset whose classes this model predicts.",
            "minimum": 0
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "enabled": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "framework": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Framework"
              }
            ]
          },
          "model_path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Filesystem path to the model weights."
          },
          "name": {
            "type": "string"
          },
          "version": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateAiObjectClassRequest": {
        "type": "object",
        "required": [
          "dataset_id",
          "class_name",
          "class_index"
        ],
        "properties": {
          "class_index": {
            "type": "integer",
            "format": "int32",
            "description": "Index this class occupies in the model's output vector.",
            "minimum": 0
          },
          "class_name": {
            "type": "string"
          },
          "dataset_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateControlPresetRequest": {
        "type": "object",
        "required": [
          "monitor_id",
          "preset",
          "label"
        ],
        "properties": {
          "label": {
            "type": "string"
          },
          "monitor_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "preset": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "CreateControlRequest": {
        "type": "object",
        "required": [
          "name",
          "type"
        ],
        "properties": {
          "can_auto_focus": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_auto_gain": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_auto_iris": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_auto_scan": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_auto_white": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_auto_zoom": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_focus": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_focus_abs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_focus_con": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_focus_rel": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_gain": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_gain_abs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_gain_con": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_gain_rel": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_iris": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_iris_abs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_iris_con": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_iris_rel": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_move": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_move_abs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_move_con": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_move_diag": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_move_map": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_move_rel": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_pan": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_reboot": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_reset": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_set_presets": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_sleep": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_tilt": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_wake": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_white": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_white_abs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_white_con": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_white_rel": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_zoom": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_zoom_abs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_zoom_con": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_zoom_rel": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_focus_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_gain_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_home_preset": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_iris_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_pan_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_presets": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_tilt_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_turbo_pan": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_turbo_tilt": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_white_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_zoom_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_focus_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_focus_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_focus_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_gain_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_gain_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_gain_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_iris_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_iris_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_iris_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_pan_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "max_pan_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "max_pan_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "max_tilt_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "max_tilt_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "max_tilt_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "max_white_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_white_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_white_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_zoom_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_zoom_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_zoom_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_focus_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_focus_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_focus_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_gain_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_gain_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_gain_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_iris_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_iris_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_iris_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_pan_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min_pan_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min_pan_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min_tilt_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min_tilt_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min_tilt_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min_white_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_white_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_white_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_zoom_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_zoom_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_zoom_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": "string"
          },
          "num_presets": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "num_scan_paths": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "protocol": {
            "type": [
              "string",
              "null"
            ]
          },
          "turbo_pan_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "turbo_tilt_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "type": {
            "$ref": "#/components/schemas/MonitorType"
          }
        }
      },
      "CreateDeviceRequest": {
        "type": "object",
        "required": [
          "name",
          "type",
          "key_string"
        ],
        "properties": {
          "key_string": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/DeviceType"
          }
        }
      },
      "CreateEventDataRequest": {
        "type": "object",
        "required": [
          "timestamp"
        ],
        "properties": {
          "data": {
            "type": [
              "string",
              "null"
            ],
            "example": "{\"detections\": []}"
          },
          "event_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "example": 1,
            "minimum": 0
          },
          "frame_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "example": 1,
            "minimum": 0
          },
          "monitor_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "example": 1,
            "minimum": 0
          },
          "timestamp": {
            "type": "string",
            "example": "2025-01-01T00:00:00Z"
          }
        }
      },
      "CreateEventTagRequest": {
        "type": "object",
        "required": [
          "event_id",
          "tag_id"
        ],
        "properties": {
          "assigned_by": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "example": 1,
            "minimum": 0
          },
          "event_id": {
            "type": "integer",
            "format": "int64",
            "example": 1,
            "minimum": 0
          },
          "tag_id": {
            "type": "integer",
            "format": "int64",
            "example": 1,
            "minimum": 0
          }
        }
      },
      "CreateFilterRequest": {
        "type": "object",
        "description": "Create a saved event filter. `name` and `query_json` are required; every\nother column of the `Filters` table is optional and falls back to the\nschema default when omitted (flags `0`, `execute_interval` `60`,\n`email_format` `Individual`).",
        "required": [
          "name"
        ],
        "properties": {
          "auto_archive": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_copy": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_copy_to": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_delete": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_email": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_execute": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_execute_cmd": {
            "type": [
              "string",
              "null"
            ]
          },
          "auto_message": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_move": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_move_to": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_unarchive": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_upload": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_video": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "background": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "concurrent": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "email_body": {
            "type": [
              "string",
              "null"
            ]
          },
          "email_format": {
            "type": [
              "string",
              "null"
            ],
            "description": "`Individual` or `Summary` (default `Individual`)."
          },
          "email_server": {
            "type": [
              "string",
              "null"
            ]
          },
          "email_subject": {
            "type": [
              "string",
              "null"
            ]
          },
          "email_to": {
            "type": [
              "string",
              "null"
            ]
          },
          "execute_interval": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "filter": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/FilterQuery",
                "description": "Structured, SQLi-safe filter AST. When present it is validated and\ntranslated to ZoneMinder's flat `query_json` for storage."
              }
            ]
          },
          "lock_rows": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": "string"
          },
          "query_json": {
            "type": "string",
            "description": "Raw ZoneMinder `query_json`. Optional when `filter` (the structured AST)\nis supplied — in that case the AST is translated and wins."
          },
          "update_disk_space": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "user_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "CreateFrameRequest": {
        "type": "object",
        "required": [
          "event_id",
          "frame_id",
          "type",
          "time_stamp",
          "delta",
          "score"
        ],
        "properties": {
          "delta": {
            "type": "string",
            "description": "Time delta from previous frame",
            "example": "0.05"
          },
          "event_id": {
            "type": "integer",
            "format": "int64",
            "description": "Event ID this frame belongs to",
            "minimum": 0
          },
          "frame_id": {
            "type": "integer",
            "format": "int32",
            "description": "Frame sequence number within the event",
            "minimum": 0
          },
          "score": {
            "type": "integer",
            "format": "int32",
            "description": "Motion detection score",
            "minimum": 0
          },
          "time_stamp": {
            "type": "string",
            "description": "Timestamp of the frame",
            "example": "2025-01-15T10:30:00Z"
          },
          "type": {
            "type": "string",
            "description": "Frame type (Normal, Bulk, Alarm)"
          }
        }
      },
      "CreateGroupMonitorRequest": {
        "type": "object",
        "required": [
          "group_id",
          "monitor_id"
        ],
        "properties": {
          "group_id": {
            "type": "integer",
            "format": "int32",
            "example": 1,
            "minimum": 0
          },
          "monitor_id": {
            "type": "integer",
            "format": "int32",
            "example": 1,
            "minimum": 0
          }
        }
      },
      "CreateGroupPermissionRequest": {
        "type": "object",
        "required": [
          "group_id",
          "user_id",
          "permission"
        ],
        "properties": {
          "group_id": {
            "type": "integer",
            "format": "int32",
            "example": 1,
            "minimum": 0
          },
          "permission": {
            "type": "string",
            "example": "View"
          },
          "user_id": {
            "type": "integer",
            "format": "int32",
            "example": 1,
            "minimum": 0
          }
        }
      },
      "CreateGroupRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "parent_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "CreateManufacturerRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "CreateModelRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "manufacturer_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "CreateMonitorPermissionRequest": {
        "type": "object",
        "required": [
          "monitor_id",
          "user_id",
          "permission"
        ],
        "properties": {
          "monitor_id": {
            "type": "integer",
            "format": "int32",
            "example": 1,
            "minimum": 0
          },
          "permission": {
            "type": "string",
            "example": "View"
          },
          "user_id": {
            "type": "integer",
            "format": "int32",
            "example": 1,
            "minimum": 0
          }
        }
      },
      "CreateMonitorPresetRequest": {
        "type": "object",
        "required": [
          "name",
          "type"
        ],
        "properties": {
          "channel": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "control_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "control_device": {
            "type": [
              "string",
              "null"
            ]
          },
          "control_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "controllable": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "default_rate": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "default_scale": {
            "type": [
              "string",
              "null"
            ]
          },
          "device": {
            "type": [
              "string",
              "null"
            ]
          },
          "format": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "height": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "host": {
            "type": [
              "string",
              "null"
            ]
          },
          "max_fps": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "method": {
            "type": [
              "string",
              "null"
            ]
          },
          "model_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": "string"
          },
          "palette": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "path": {
            "type": [
              "string",
              "null"
            ]
          },
          "port": {
            "type": [
              "string",
              "null"
            ]
          },
          "protocol": {
            "type": [
              "string",
              "null"
            ]
          },
          "sub_path": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "$ref": "#/components/schemas/MonitorType"
          },
          "width": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "CreateMonitorRequest": {
        "type": "object",
        "required": [
          "name",
          "deleted",
          "storage_id",
          "type",
          "function",
          "capturing",
          "decoding_enabled",
          "decoding",
          "rtsp2_web_enabled",
          "rtsp2_web_type",
          "janus_enabled",
          "janus_audio_enabled",
          "restream",
          "triggers",
          "event_start_command",
          "event_end_command",
          "onvif_url",
          "onvif_events_path",
          "onvif_username",
          "onvif_password",
          "onvif_options",
          "onvif_event_listener",
          "use_amcrest_api",
          "device",
          "channel",
          "format",
          "port",
          "sub_path",
          "width",
          "height",
          "colours",
          "palette",
          "orientation",
          "deinterlacing",
          "save_jpe_gs",
          "video_writer",
          "record_audio",
          "recording_source",
          "brightness",
          "contrast",
          "hue",
          "colour",
          "event_prefix",
          "label_x",
          "label_y",
          "label_size",
          "image_buffer_count",
          "max_image_buffer_count",
          "warmup_count",
          "pre_event_count",
          "post_event_count",
          "stream_replay_buffer",
          "alarm_frame_count",
          "section_length",
          "section_length_warn",
          "event_close_mode",
          "min_section_length",
          "frame_skip",
          "motion_frame_skip",
          "analysis_update_delay",
          "fps_report_interval",
          "ref_blend_perc",
          "alarm_ref_blend_perc",
          "controllable",
          "track_motion",
          "return_location",
          "modect_during_ptz",
          "default_rate",
          "default_scale",
          "default_codec",
          "signal_check_points",
          "signal_check_colour",
          "web_colour",
          "exif",
          "zone_count",
          "rtsp_server",
          "rtsp_stream_name",
          "soap_wsa_compl",
          "importance",
          "mqtt_enabled",
          "mqtt_subscriptions",
          "startup_delay",
          "analysing",
          "analysis_source",
          "analysis_image",
          "recording"
        ],
        "properties": {
          "alarm_frame_count": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "alarm_max_fps": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "alarm_ref_blend_perc": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "analysing": {
            "$ref": "#/components/schemas/Analysing"
          },
          "analysis_fps_limit": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "analysis_image": {
            "$ref": "#/components/schemas/AnalysisImage"
          },
          "analysis_source": {
            "$ref": "#/components/schemas/AnalysisSource"
          },
          "analysis_update_delay": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "auto_stop_timeout": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "brightness": {
            "type": "integer",
            "format": "int32"
          },
          "capturing": {
            "$ref": "#/components/schemas/Capturing"
          },
          "channel": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "colour": {
            "type": "integer",
            "format": "int32"
          },
          "colours": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "contrast": {
            "type": "integer",
            "format": "int32"
          },
          "control_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "control_device": {
            "type": [
              "string",
              "null"
            ]
          },
          "control_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "controllable": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "decoder": {
            "type": [
              "string",
              "null"
            ]
          },
          "decoder_hw_accel_device": {
            "type": [
              "string",
              "null"
            ]
          },
          "decoder_hw_accel_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "decoding": {
            "$ref": "#/components/schemas/Decoding"
          },
          "decoding_enabled": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "default_codec": {
            "$ref": "#/components/schemas/DefaultCodec"
          },
          "default_rate": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "default_scale": {
            "type": "string"
          },
          "deinterlacing": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "deleted": {
            "type": "boolean"
          },
          "device": {
            "type": "string"
          },
          "enabled": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Whether the monitor is enabled (ZoneMinder's `Monitors.Enabled`).\nDefaults to enabled when omitted.",
            "minimum": 0
          },
          "encoder": {
            "type": [
              "string",
              "null"
            ]
          },
          "encoder_parameters": {
            "type": [
              "string",
              "null"
            ]
          },
          "event_close_mode": {
            "$ref": "#/components/schemas/EventCloseMode"
          },
          "event_end_command": {
            "type": "string"
          },
          "event_prefix": {
            "type": "string"
          },
          "event_start_command": {
            "type": "string"
          },
          "exif": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "format": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "fps_report_interval": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "frame_skip": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "function": {
            "$ref": "#/components/schemas/Function"
          },
          "height": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "host": {
            "type": [
              "string",
              "null"
            ]
          },
          "hue": {
            "type": "integer",
            "format": "int32"
          },
          "image_buffer_count": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "importance": {
            "$ref": "#/components/schemas/Importance"
          },
          "janus_audio_enabled": {
            "type": "integer",
            "format": "int32"
          },
          "janus_enabled": {
            "type": "integer",
            "format": "int32"
          },
          "janus_profile_override": {
            "type": [
              "string",
              "null"
            ]
          },
          "janus_rtsp_session_timeout": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "label_format": {
            "type": [
              "string",
              "null"
            ]
          },
          "label_size": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "label_x": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "label_y": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "latitude": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "linked_monitors": {
            "type": [
              "string",
              "null"
            ]
          },
          "longitude": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "manufacturer_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_fps": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "max_image_buffer_count": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "method": {
            "type": [
              "string",
              "null"
            ]
          },
          "min_section_length": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "modect_during_ptz": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "model_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "motion_frame_skip": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "mqtt_enabled": {
            "type": "integer",
            "format": "int32"
          },
          "mqtt_subscriptions": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "onvif_alarm_text": {
            "type": [
              "string",
              "null"
            ]
          },
          "onvif_event_listener": {
            "type": "integer",
            "format": "int32"
          },
          "onvif_events_path": {
            "type": "string"
          },
          "onvif_options": {
            "type": "string"
          },
          "onvif_password": {
            "type": "string"
          },
          "onvif_url": {
            "type": "string"
          },
          "onvif_username": {
            "type": "string"
          },
          "options": {
            "type": [
              "string",
              "null"
            ]
          },
          "orientation": {
            "$ref": "#/components/schemas/Orientation"
          },
          "output_codec": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "output_container": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OutputContainer"
              }
            ]
          },
          "palette": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "pass": {
            "type": [
              "string",
              "null"
            ]
          },
          "path": {
            "type": [
              "string",
              "null"
            ]
          },
          "port": {
            "type": "string"
          },
          "post_event_count": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "pre_event_count": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "protocol": {
            "type": [
              "string",
              "null"
            ]
          },
          "record_audio": {
            "type": "integer",
            "format": "int32",
            "description": "Boolean. The old `min = -1` accepted a value the column has no meaning for."
          },
          "recording": {
            "$ref": "#/components/schemas/Recording"
          },
          "recording_source": {
            "$ref": "#/components/schemas/RecordingSource"
          },
          "ref_blend_perc": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "refresh": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "restream": {
            "type": "integer",
            "format": "int32"
          },
          "return_delay": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "return_location": {
            "type": "integer",
            "format": "int32"
          },
          "rtsp2_web_enabled": {
            "type": "integer",
            "format": "int32"
          },
          "rtsp2_web_type": {
            "$ref": "#/components/schemas/Rtsp2WebType"
          },
          "rtsp_describe": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "rtsp_server": {
            "type": "integer",
            "format": "int32"
          },
          "rtsp_stream_name": {
            "type": "string"
          },
          "rtsp_user": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "save_jpe_gs": {
            "type": "integer",
            "format": "int32",
            "description": "`Monitors.SaveJPEGs` is a two-bit mask, not a flag: bit 0 saves\ncaptured frames and bit 1 saves analysis images, so 3 means both — and\n3 is the column default, which the old `max = 1` rejected (GH #39)."
          },
          "second_path": {
            "type": [
              "string",
              "null"
            ]
          },
          "section_length": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "section_length_warn": {
            "type": "integer",
            "format": "int32"
          },
          "sequence": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "server_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "signal_check_colour": {
            "type": "string"
          },
          "signal_check_points": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "soap_wsa_compl": {
            "type": "integer",
            "format": "int32"
          },
          "startup_delay": {
            "type": "integer",
            "format": "int32"
          },
          "storage_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "stream_replay_buffer": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "sub_path": {
            "type": "string"
          },
          "track_delay": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "track_motion": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "triggers": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/MonitorType"
          },
          "use_amcrest_api": {
            "type": "integer",
            "format": "int32"
          },
          "user": {
            "type": [
              "string",
              "null"
            ]
          },
          "v4l_captures_per_frame": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "v4l_multi_buffer": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "video_writer": {
            "type": "integer",
            "format": "int32",
            "description": "0 disabled, 1 encode, 2 camera passthrough."
          },
          "warmup_count": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "web_colour": {
            "type": "string"
          },
          "width": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "zone_count": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "CreateMontageLayoutRequest": {
        "type": "object",
        "required": [
          "name",
          "user_id"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "positions": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "CreateObjectTypeRequest": {
        "type": "object",
        "properties": {
          "human": {
            "type": [
              "string",
              "null"
            ],
            "example": "Person"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "example": "person"
          }
        }
      },
      "CreateReportRequest": {
        "type": "object",
        "required": [
          "start_date_time",
          "end_date_time"
        ],
        "properties": {
          "end_date_time": {
            "type": "string",
            "example": "2025-01-08T00:00:00Z"
          },
          "filter_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "example": 1,
            "minimum": 0
          },
          "interval": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Report interval in seconds (e.g. 604800 = 7 days).",
            "example": 604800,
            "minimum": 0
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "example": "Weekly Security Report",
            "maxLength": 30
          },
          "start_date_time": {
            "type": "string",
            "example": "2025-01-01T00:00:00Z"
          }
        }
      },
      "CreateServerRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "hostname": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "port": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateServerStatRequest": {
        "type": "object",
        "required": [
          "cpu_load",
          "cpu_user_percent",
          "cpu_nice_percent",
          "cpu_system_percent",
          "cpu_idle_percent",
          "cpu_usage_percent"
        ],
        "properties": {
          "cpu_idle_percent": {
            "type": "string",
            "example": "69.2"
          },
          "cpu_load": {
            "type": "string",
            "example": "1.5"
          },
          "cpu_nice_percent": {
            "type": "string",
            "example": "0.1"
          },
          "cpu_system_percent": {
            "type": "string",
            "example": "5.2"
          },
          "cpu_usage_percent": {
            "type": "string",
            "example": "30.8"
          },
          "cpu_user_percent": {
            "type": "string",
            "example": "25.5"
          },
          "free_mem": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "example": 4096000,
            "minimum": 0
          },
          "free_swap": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "example": 1024000,
            "minimum": 0
          },
          "server_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "example": 1,
            "minimum": 0
          },
          "total_mem": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "example": 8192000,
            "minimum": 0
          },
          "total_swap": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "example": 2048000,
            "minimum": 0
          }
        }
      },
      "CreateSessionRequest": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "access": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "data": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          }
        }
      },
      "CreateSnapshotEventRequest": {
        "type": "object",
        "required": [
          "snapshot_id",
          "event_id"
        ],
        "properties": {
          "event_id": {
            "type": "integer",
            "format": "int64",
            "example": 1,
            "minimum": 0
          },
          "snapshot_id": {
            "type": "integer",
            "format": "int32",
            "example": 1,
            "minimum": 0
          }
        }
      },
      "CreateSnapshotRequest": {
        "type": "object",
        "properties": {
          "created_by": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "created_on": {
            "type": [
              "string",
              "null"
            ],
            "example": "2025-01-15T10:30:00"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateStatRequest": {
        "type": "object",
        "required": [
          "monitor_id",
          "zone_id",
          "event_id",
          "frame_id",
          "pixel_diff",
          "alarm_pixels",
          "filter_pixels",
          "blob_pixels",
          "blobs",
          "min_blob_size",
          "max_blob_size",
          "min_x",
          "max_x",
          "min_y",
          "max_y",
          "score"
        ],
        "properties": {
          "alarm_pixels": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "blob_pixels": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "blobs": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "event_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "filter_pixels": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "frame_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "max_blob_size": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "max_x": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "max_y": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "min_blob_size": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "min_x": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "min_y": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "monitor_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "pixel_diff": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "score": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "zone_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "CreateStateRequest": {
        "type": "object",
        "required": [
          "name",
          "definition",
          "is_active"
        ],
        "properties": {
          "definition": {
            "type": "string"
          },
          "is_active": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": "string"
          }
        }
      },
      "CreateStorageRequest": {
        "type": "object",
        "required": [
          "name",
          "path",
          "type",
          "enabled"
        ],
        "properties": {
          "do_delete": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Whether deleting an event may remove its media from this storage.\nDefaults to `1`, matching the column and ZoneMinder's own UI — a\nstorage created with `0` cannot be reclaimed by retention."
          },
          "enabled": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "scheme": {
            "type": [
              "string",
              "null"
            ]
          },
          "server_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "type": {
            "type": "string"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateTagRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "create_date": {
            "type": [
              "string",
              "null"
            ],
            "example": "2025-01-15T10:30:00Z"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "CreateTriggerX10Request": {
        "type": "object",
        "required": [
          "monitor_id"
        ],
        "properties": {
          "activation": {
            "type": [
              "string",
              "null"
            ]
          },
          "alarm_input": {
            "type": [
              "string",
              "null"
            ]
          },
          "alarm_output": {
            "type": [
              "string",
              "null"
            ]
          },
          "monitor_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "CreateUserPreferenceRequest": {
        "type": "object",
        "required": [
          "user_id"
        ],
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "value": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateUserRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/UserPermissionsInput",
            "description": "Per-feature permission levels. Omitted features default to `View`."
          },
          {
            "type": "object",
            "required": [
              "username",
              "password",
              "email"
            ],
            "properties": {
              "api_enabled": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32",
                "description": "Whether the user may authenticate to the API (`APIEnabled`).",
                "minimum": 0
              },
              "email": {
                "type": "string"
              },
              "enabled": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32",
                "minimum": 0
              },
              "home_view": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "language": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "max_bandwidth": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "password": {
                "type": "string"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "type": "string"
              }
            }
          }
        ]
      },
      "CreateZonePresetRequest": {
        "type": "object",
        "required": [
          "name",
          "type",
          "units",
          "check_method"
        ],
        "properties": {
          "check_method": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "units": {
            "type": "string"
          }
        }
      },
      "CreateZoneRequest": {
        "type": "object",
        "required": [
          "name",
          "type",
          "units",
          "coords",
          "num_coords"
        ],
        "properties": {
          "check_method": {
            "type": [
              "string",
              "null"
            ]
          },
          "coords": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "num_coords": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "type": {
            "type": "string"
          },
          "units": {
            "type": "string"
          }
        }
      },
      "DaemonActionResponse": {
        "type": "object",
        "description": "Response for daemon control actions.",
        "required": [
          "success",
          "message"
        ],
        "properties": {
          "message": {
            "type": "string",
            "description": "Human-readable message"
          },
          "success": {
            "type": "boolean",
            "description": "Whether the action succeeded"
          }
        }
      },
      "DaemonListResponse": {
        "type": "object",
        "description": "Response containing list of all daemons.",
        "required": [
          "daemons"
        ],
        "properties": {
          "daemons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DaemonStatusResponse"
            },
            "description": "List of daemon statuses"
          }
        }
      },
      "DaemonStatusResponse": {
        "type": "object",
        "description": "Response containing a single daemon's status.",
        "required": [
          "id",
          "name",
          "state",
          "restart_count"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Process identifier"
          },
          "monitor_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Associated monitor ID if applicable",
            "minimum": 0
          },
          "name": {
            "type": "string",
            "description": "Display name"
          },
          "pid": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Process ID if running",
            "minimum": 0
          },
          "restart_count": {
            "type": "integer",
            "format": "int32",
            "description": "Number of restart attempts",
            "minimum": 0
          },
          "state": {
            "$ref": "#/components/schemas/ProcessState",
            "description": "Current state"
          },
          "uptime_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Uptime in seconds if running",
            "minimum": 0
          }
        }
      },
      "DateTimeWrapper": {
        "type": "string",
        "format": "date-time",
        "example": "2025-04-24T12:34:56Z"
      },
      "DecimalWrapper": {
        "type": "string",
        "example": "123.45"
      },
      "Decoding": {
        "type": "string",
        "enum": [
          "None",
          "Ondemand",
          "KeyFrames",
          "KeyFrames+Ondemand",
          "Always"
        ]
      },
      "DefaultCodec": {
        "type": "string",
        "enum": [
          "auto",
          "MP4",
          "MJPEG"
        ]
      },
      "DeviceResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "type",
          "key_string"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "key_string": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/DeviceType"
          }
        }
      },
      "DeviceType": {
        "type": "string",
        "enum": [
          "X10"
        ]
      },
      "EventCloseMode": {
        "type": "string",
        "enum": [
          "system",
          "time",
          "duration",
          "idle",
          "alarm"
        ]
      },
      "EventCountResponse": {
        "type": "object",
        "required": [
          "count",
          "date"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "date": {
            "$ref": "#/components/schemas/NaiveDateTimeWrapper"
          }
        }
      },
      "EventCountsByMonitorResponse": {
        "type": "object",
        "description": "Response for event counts grouped by monitor",
        "required": [
          "counts",
          "hours"
        ],
        "properties": {
          "counts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitorEventCount"
            }
          },
          "hours": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "EventCountsResponse": {
        "type": "object",
        "required": [
          "counts",
          "hours"
        ],
        "properties": {
          "counts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventCountResponse"
            }
          },
          "hours": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "EventCreateRequest": {
        "type": "object",
        "required": [
          "monitor_id",
          "storage_id",
          "name",
          "width",
          "height",
          "length",
          "orientation"
        ],
        "properties": {
          "cause": {
            "type": [
              "string",
              "null"
            ],
            "example": "Motion in zone 1"
          },
          "end_date_time": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DateTimeWrapper"
              }
            ]
          },
          "height": {
            "type": "integer",
            "format": "int32",
            "example": 1080,
            "minimum": 0
          },
          "length": {
            "$ref": "#/components/schemas/DecimalWrapper"
          },
          "monitor_id": {
            "type": "integer",
            "format": "int32",
            "example": 1,
            "minimum": 0
          },
          "name": {
            "type": "string",
            "example": "Motion Detection"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "example": "Important security event"
          },
          "orientation": {
            "$ref": "#/components/schemas/Orientation"
          },
          "secondary_storage_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "example": "null",
            "minimum": 0
          },
          "start_date_time": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DateTimeWrapper"
              }
            ]
          },
          "storage_id": {
            "type": "integer",
            "format": "int32",
            "example": 1,
            "minimum": 0
          },
          "width": {
            "type": "integer",
            "format": "int32",
            "example": 1920,
            "minimum": 0
          }
        }
      },
      "EventDataResponse": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "data": {
            "type": [
              "string",
              "null"
            ]
          },
          "event_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "frame_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "id": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "monitor_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "timestamp": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "EventQueryParams": {
        "type": "object",
        "properties": {
          "alarm_frames_min": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Filter events with at least this many alarm frames",
            "example": "5",
            "minimum": 0
          },
          "archived": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Filter to show only archived events",
            "example": "true"
          },
          "cause": {
            "type": [
              "string",
              "null"
            ],
            "description": "Case-insensitive substring match on the event cause.",
            "example": "Motion"
          },
          "direction": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SortDirection",
                "description": "Sort direction (default: desc)"
              }
            ]
          },
          "end_time": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DateTimeWrapper"
              }
            ]
          },
          "monitor_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "example": "1",
            "minimum": 0
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Case-insensitive substring match on the event name.",
            "example": "Front"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "description": "Case-insensitive substring match on the event notes."
          },
          "page": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "example": "1",
            "minimum": 0
          },
          "page_size": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "example": "20",
            "minimum": 0
          },
          "sort": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/EventSortField",
                "description": "Field to sort results by (default: start_time)"
              }
            ]
          },
          "start_time": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DateTimeWrapper"
              }
            ]
          },
          "storage_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Filter by the storage the event's media lives on.",
            "example": 1,
            "minimum": 0
          },
          "tag_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Filter to events carrying any of these tag ids (comma-separated, e.g.\n`tag_id=1,4,5`). Standard query strings can't repeat a key into a list,\nso a comma-separated value is used.",
            "example": "1,4"
          }
        }
      },
      "EventResponse": {
        "type": "object",
        "required": [
          "id",
          "monitor_id",
          "storage_id",
          "name",
          "width",
          "height",
          "length",
          "frames",
          "alarm_frames",
          "default_video",
          "tot_score",
          "archived",
          "videoed",
          "uploaded",
          "emailed",
          "messaged",
          "executed",
          "state_id",
          "orientation",
          "scheme",
          "locked"
        ],
        "properties": {
          "alarm_frames": {
            "type": "integer",
            "format": "int32",
            "example": 10,
            "minimum": 0
          },
          "archived": {
            "type": "integer",
            "format": "int32",
            "example": 0,
            "minimum": 0
          },
          "avg_score": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "example": 50,
            "minimum": 0
          },
          "cause": {
            "type": [
              "string",
              "null"
            ],
            "example": "Motion in zone 1"
          },
          "default_video": {
            "type": "string",
            "example": "video.mp4"
          },
          "disk_space": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "example": 1048576,
            "minimum": 0
          },
          "emailed": {
            "type": "integer",
            "format": "int32",
            "example": 0,
            "minimum": 0
          },
          "end_date_time": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DateTimeWrapper"
              }
            ]
          },
          "executed": {
            "type": "integer",
            "format": "int32",
            "example": 0,
            "minimum": 0
          },
          "frames": {
            "type": "integer",
            "format": "int32",
            "example": 60,
            "minimum": 0
          },
          "height": {
            "type": "integer",
            "format": "int32",
            "example": 1080,
            "minimum": 0
          },
          "id": {
            "type": "integer",
            "format": "int64",
            "example": 1,
            "minimum": 0
          },
          "latitude": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DecimalWrapper"
              }
            ]
          },
          "length": {
            "$ref": "#/components/schemas/DecimalWrapper"
          },
          "locked": {
            "type": "integer",
            "format": "int32",
            "example": 0
          },
          "longitude": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DecimalWrapper"
              }
            ]
          },
          "max_score": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "example": 100,
            "minimum": 0
          },
          "messaged": {
            "type": "integer",
            "format": "int32",
            "example": 0,
            "minimum": 0
          },
          "monitor_id": {
            "type": "integer",
            "format": "int32",
            "example": 1,
            "minimum": 0
          },
          "name": {
            "type": "string",
            "example": "Motion Detection"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "example": "Important security event"
          },
          "orientation": {
            "$ref": "#/components/schemas/Orientation"
          },
          "save_jpe_gs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "example": 1
          },
          "scheme": {
            "$ref": "#/components/schemas/SchemeWrapper"
          },
          "secondary_storage_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "example": "null",
            "minimum": 0
          },
          "start_date_time": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DateTimeWrapper"
              }
            ]
          },
          "state_id": {
            "type": "integer",
            "format": "int32",
            "example": 1,
            "minimum": 0
          },
          "storage_id": {
            "type": "integer",
            "format": "int32",
            "example": 1,
            "minimum": 0
          },
          "tags": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/TagSummary"
            },
            "description": "Tags associated with this event"
          },
          "tot_score": {
            "type": "integer",
            "format": "int32",
            "example": 100,
            "minimum": 0
          },
          "uploaded": {
            "type": "integer",
            "format": "int32",
            "example": 0,
            "minimum": 0
          },
          "videoed": {
            "type": "integer",
            "format": "int32",
            "example": 1,
            "minimum": 0
          },
          "width": {
            "type": "integer",
            "format": "int32",
            "example": 1920,
            "minimum": 0
          }
        }
      },
      "EventSortField": {
        "type": "string",
        "description": "Field to sort events by",
        "enum": [
          "start_time",
          "end_time",
          "alarm_frames",
          "max_score",
          "avg_score",
          "tot_score",
          "length",
          "id",
          "name",
          "cause",
          "monitor_id",
          "notes",
          "frames"
        ]
      },
      "EventSummary": {
        "type": "object",
        "description": "Lightweight event summary for embedding in TagDetailResponse",
        "required": [
          "id",
          "name",
          "monitor_id"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "example": 1,
            "minimum": 0
          },
          "monitor_id": {
            "type": "integer",
            "format": "int32",
            "example": 1,
            "minimum": 0
          },
          "name": {
            "type": "string",
            "example": "Motion Detection"
          },
          "start_date_time": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DateTimeWrapper"
              }
            ]
          }
        }
      },
      "EventSummaryResponse": {
        "type": "object",
        "description": "Event counts and disk space summary for a monitor",
        "required": [
          "monitor_id",
          "total_events",
          "total_event_disk_space",
          "hour_events",
          "hour_event_disk_space",
          "day_events",
          "day_event_disk_space",
          "week_events",
          "week_event_disk_space",
          "month_events",
          "month_event_disk_space",
          "archived_events",
          "archived_event_disk_space"
        ],
        "properties": {
          "archived_event_disk_space": {
            "type": "integer",
            "format": "int64",
            "description": "Disk space used by archived events (bytes)",
            "example": 268435456
          },
          "archived_events": {
            "type": "integer",
            "format": "int32",
            "description": "Archived event count",
            "example": 25
          },
          "day_event_disk_space": {
            "type": "integer",
            "format": "int64",
            "description": "Disk space used by events in the last day (bytes)",
            "example": 524288000
          },
          "day_events": {
            "type": "integer",
            "format": "int32",
            "description": "Events in the last day",
            "example": 42
          },
          "hour_event_disk_space": {
            "type": "integer",
            "format": "int64",
            "description": "Disk space used by events in the last hour (bytes)",
            "example": 52428800
          },
          "hour_events": {
            "type": "integer",
            "format": "int32",
            "description": "Events in the last hour",
            "example": 5
          },
          "monitor_id": {
            "type": "integer",
            "format": "int32",
            "description": "Monitor ID",
            "example": 1,
            "minimum": 0
          },
          "month_event_disk_space": {
            "type": "integer",
            "format": "int64",
            "description": "Disk space used by events in the last month (bytes)",
            "example": 2147483648
          },
          "month_events": {
            "type": "integer",
            "format": "int32",
            "description": "Events in the last month",
            "example": 1100
          },
          "total_event_disk_space": {
            "type": "integer",
            "format": "int64",
            "description": "Total disk space used by events (bytes)",
            "example": 536870912
          },
          "total_events": {
            "type": "integer",
            "format": "int32",
            "description": "Total event count (all time)",
            "example": 1250
          },
          "week_event_disk_space": {
            "type": "integer",
            "format": "int64",
            "description": "Disk space used by events in the last week (bytes)",
            "example": 1073741824
          },
          "week_events": {
            "type": "integer",
            "format": "int32",
            "description": "Events in the last week",
            "example": 287
          }
        }
      },
      "EventTagResponse": {
        "type": "object",
        "required": [
          "tag_id",
          "event_id"
        ],
        "properties": {
          "assigned_by": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "example": 1,
            "minimum": 0
          },
          "assigned_date": {
            "type": [
              "string",
              "null"
            ],
            "example": "2025-01-15T10:30:00Z"
          },
          "event_id": {
            "type": "integer",
            "format": "int64",
            "example": 1,
            "minimum": 0
          },
          "tag_id": {
            "type": "integer",
            "format": "int64",
            "example": 1,
            "minimum": 0
          }
        }
      },
      "EventUpdateRequest": {
        "type": "object",
        "properties": {
          "archived": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Mark event as archived (protected from auto-deletion)",
            "example": true
          },
          "cause": {
            "type": [
              "string",
              "null"
            ],
            "example": "Motion in zone 1"
          },
          "emailed": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Mark event as having been emailed",
            "example": false
          },
          "executed": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Mark event as having triggered an external action",
            "example": false
          },
          "locked": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Lock event to prevent deletion by filters",
            "example": false
          },
          "messaged": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Mark event as having been sent via push notification",
            "example": false
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "example": "Motion Detection"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "example": "Important security event"
          },
          "orientation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Orientation"
              }
            ]
          },
          "uploaded": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Mark event as having been uploaded to external storage",
            "example": false
          }
        }
      },
      "EventVideoInfo": {
        "type": "object",
        "description": "Response for event video metadata",
        "required": [
          "event_id",
          "video_codec",
          "width",
          "height",
          "duration_seconds",
          "file_size",
          "playable_direct",
          "recommended_mode",
          "in_progress"
        ],
        "properties": {
          "duration_seconds": {
            "type": "number",
            "format": "double"
          },
          "event_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "file_size": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "height": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "in_progress": {
            "type": "boolean",
            "description": "True while the event is still recording (no `EndDateTime`). Codec/size\nfields may be unknown until it finalizes; play via `playlist.m3u8`."
          },
          "playable_direct": {
            "type": "boolean",
            "description": "True when the codec plays in any browser `<video>` (H.264). HEVC is\nSafari / hardware-Chrome only."
          },
          "recommended_mode": {
            "type": "string",
            "description": "Suggested playback endpoint: \"direct\" (progressive MP4), \"hls\" (VOD), or\n\"event\" (in-progress live HLS via `playlist.m3u8`)."
          },
          "video_codec": {
            "type": "string",
            "description": "Detected video codec: \"H264\", \"H265\" or \"Unknown\"."
          },
          "width": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "FilterExpr": {
        "oneOf": [
          {
            "type": "object",
            "description": "A bracketed group — `match` joins its `rules` with AND (`all`) or OR\n(`any`). Nesting groups gives arbitrarily deep brackets.",
            "required": [
              "match",
              "rules"
            ],
            "properties": {
              "match": {
                "$ref": "#/components/schemas/MatchOp"
              },
              "rules": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FilterExpr"
                }
              }
            }
          },
          {
            "type": "object",
            "description": "A leaf condition: `field op value`.",
            "required": [
              "field",
              "op"
            ],
            "properties": {
              "field": {
                "$ref": "#/components/schemas/FilterField"
              },
              "op": {
                "$ref": "#/components/schemas/FilterOp"
              },
              "value": {
                "description": "The comparison value. Omitted for `is_null`/`is_not_null`; an array\nfor `in`/`not_in`; otherwise a scalar. Always treated as data."
              }
            }
          }
        ],
        "description": "One node of the filter tree: either a bracketed group of sub-expressions\njoined by AND/OR, or a single leaf condition."
      },
      "FilterField": {
        "type": "string",
        "description": "Whitelisted attributes a filter may reference. Each maps to a real column\n(and a ZoneMinder attribute name) in `service::filter_field`. Most are\n`Events` columns; a few are joined `Monitors`/`Storage` attributes.",
        "enum": [
          "id",
          "monitor_id",
          "name",
          "cause",
          "notes",
          "start_time",
          "end_time",
          "length",
          "frames",
          "alarm_frames",
          "tot_score",
          "avg_score",
          "max_score",
          "archived",
          "videoed",
          "uploaded",
          "emailed",
          "messaged",
          "executed",
          "locked",
          "state_id",
          "storage_id",
          "disk_space",
          "width",
          "height",
          "monitor_name"
        ]
      },
      "FilterOp": {
        "type": "string",
        "description": "Comparison operators a condition may use. A closed set mapped to fixed SQL\noperators downstream — never interpolated.",
        "enum": [
          "eq",
          "ne",
          "gt",
          "gte",
          "lt",
          "lte",
          "like",
          "not_like",
          "in",
          "not_in",
          "is_null",
          "is_not_null",
          "regexp",
          "not_regexp"
        ]
      },
      "FilterQuery": {
        "type": "object",
        "description": "A complete structured filter query: a root predicate plus optional sort and\nrow limit.",
        "required": [
          "where"
        ],
        "properties": {
          "limit": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Optional row limit applied by the downstream executor.",
            "minimum": 0
          },
          "sort": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/FilterSort",
                "description": "Optional sort column + direction."
              }
            ]
          },
          "where": {
            "$ref": "#/components/schemas/FilterExpr",
            "description": "Root predicate. Usually a [`FilterExpr::Group`]."
          }
        }
      },
      "FilterResponse": {
        "type": "object",
        "description": "A saved event filter. Mirrors every column of the `Filters` table so the API\n(and its OpenAPI schema) faithfully represents a ZoneMinder filter rather\nthan a lossy subset.",
        "required": [
          "id",
          "name",
          "execute_interval",
          "query_json",
          "auto_archive",
          "auto_unarchive",
          "auto_video",
          "auto_upload",
          "auto_email",
          "email_format",
          "auto_message",
          "auto_execute",
          "auto_delete",
          "auto_move",
          "auto_move_to",
          "auto_copy",
          "auto_copy_to",
          "update_disk_space",
          "background",
          "concurrent",
          "lock_rows"
        ],
        "properties": {
          "auto_archive": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "auto_copy": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "auto_copy_to": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "auto_delete": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "auto_email": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "auto_execute": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "auto_execute_cmd": {
            "type": [
              "string",
              "null"
            ]
          },
          "auto_message": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "auto_move": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "auto_move_to": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "auto_unarchive": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "auto_upload": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "auto_video": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "background": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "concurrent": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "email_body": {
            "type": [
              "string",
              "null"
            ]
          },
          "email_format": {
            "type": "string",
            "description": "`Individual` or `Summary`."
          },
          "email_server": {
            "type": [
              "string",
              "null"
            ]
          },
          "email_subject": {
            "type": [
              "string",
              "null"
            ]
          },
          "email_to": {
            "type": [
              "string",
              "null"
            ]
          },
          "execute_interval": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "filter": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/FilterQuery",
                "description": "The stored `query_json` parsed into the structured AST, when it maps to\nour vocabulary. `None` for legacy/unmodelled filters. Populated by the\nservice layer (the `From<&Model>` conversion leaves it `None`)."
              }
            ]
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "lock_rows": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": "string"
          },
          "query_json": {
            "type": "string"
          },
          "update_disk_space": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "user_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "FilterSort": {
        "type": "object",
        "description": "Sort specification.",
        "required": [
          "field"
        ],
        "properties": {
          "dir": {
            "$ref": "#/components/schemas/SortDirection"
          },
          "field": {
            "$ref": "#/components/schemas/FilterField"
          }
        }
      },
      "FrameResponse": {
        "type": "object",
        "required": [
          "id",
          "event_id",
          "frame_id",
          "type",
          "time_stamp",
          "delta",
          "score"
        ],
        "properties": {
          "delta": {
            "type": "string",
            "description": "Time delta from previous frame",
            "example": "0.05"
          },
          "event_id": {
            "type": "integer",
            "format": "int64",
            "description": "Event ID this frame belongs to",
            "minimum": 0
          },
          "frame_id": {
            "type": "integer",
            "format": "int32",
            "description": "Frame sequence number within the event",
            "minimum": 0
          },
          "id": {
            "type": "integer",
            "format": "int64",
            "description": "Frame ID",
            "minimum": 0
          },
          "score": {
            "type": "integer",
            "format": "int32",
            "description": "Motion detection score",
            "minimum": 0
          },
          "time_stamp": {
            "type": "string",
            "description": "Timestamp of the frame",
            "example": "2025-01-15T10:30:00Z"
          },
          "type": {
            "type": "string",
            "description": "Frame type (Normal, Bulk, Alarm)"
          }
        }
      },
      "Framework": {
        "type": "string",
        "enum": [
          "TensorFlow",
          "PyTorch",
          "ONNX",
          "OpenVINO",
          "TensorRT",
          "Other"
        ]
      },
      "Function": {
        "type": "string",
        "enum": [
          "None",
          "Monitor",
          "Modect",
          "Record",
          "Mocord",
          "Nodect"
        ]
      },
      "GroupMonitorResponse": {
        "type": "object",
        "required": [
          "id",
          "group_id",
          "monitor_id"
        ],
        "properties": {
          "group_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "monitor_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "GroupPermissionResponse": {
        "type": "object",
        "required": [
          "id",
          "group_id",
          "user_id",
          "permission"
        ],
        "properties": {
          "group_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "permission": {
            "type": "string"
          },
          "user_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "GroupResponse": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": "string"
          },
          "parent_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "Importance": {
        "type": "string",
        "enum": [
          "Normal",
          "Less",
          "Not"
        ]
      },
      "Level": {
        "type": "string",
        "description": "A permission level, ordered `None < View < Edit`.",
        "enum": [
          "None",
          "View",
          "Edit"
        ]
      },
      "LiveProtocolStatus": {
        "type": "object",
        "description": "Protocol status in live stats",
        "required": [
          "hls",
          "webrtc"
        ],
        "properties": {
          "hls": {
            "type": "boolean"
          },
          "webrtc": {
            "type": "boolean"
          }
        }
      },
      "LiveStatsResponse": {
        "type": "object",
        "description": "Response for live stream statistics",
        "required": [
          "monitor_id",
          "status",
          "packets_processed",
          "errors",
          "uptime_seconds",
          "protocols"
        ],
        "properties": {
          "errors": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "monitor_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "packets_processed": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "protocols": {
            "$ref": "#/components/schemas/LiveProtocolStatus"
          },
          "status": {
            "type": "string"
          },
          "uptime_seconds": {
            "type": "number",
            "format": "double"
          },
          "webrtc_startup": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/WebRtcStartupView",
                "description": "Most-recent WebRTC startup profile (connect→offer→first-RTP), when a\nsession has run since boot. Lets you confirm cold-vs-warm empirically."
              }
            ]
          }
        }
      },
      "LocaleResponse": {
        "type": "object",
        "description": "Server locale: the effective timezone + ZoneMinder's date/time format\npatterns, so clients can render server-local time consistently with the\nlegacy web UI (GH #33). Pairs with event timestamps now being true UTC.",
        "required": [
          "utc_offset",
          "utc_offset_seconds"
        ],
        "properties": {
          "date_format": {
            "type": [
              "string",
              "null"
            ],
            "description": "ZoneMinder `ZM_DATE_FORMAT_PATTERN`."
          },
          "datetime_format": {
            "type": [
              "string",
              "null"
            ],
            "description": "ZoneMinder `ZM_DATETIME_FORMAT_PATTERN`."
          },
          "time_format": {
            "type": [
              "string",
              "null"
            ],
            "description": "ZoneMinder `ZM_TIME_FORMAT_PATTERN`."
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Effective IANA timezone name (from ZoneMinder's `ZM_TIMEZONE`, or the\nhost OS zone when that is empty). May be `null` if it can't be resolved.",
            "example": "Australia/Melbourne"
          },
          "utc_offset": {
            "type": "string",
            "description": "Current UTC offset of the server, e.g. `+10:00`.",
            "example": "+10:00"
          },
          "utc_offset_seconds": {
            "type": "integer",
            "format": "int32",
            "description": "Current UTC offset in seconds (e.g. 36000 for +10:00).",
            "example": 36000
          }
        }
      },
      "LogLevel": {
        "type": "string",
        "description": "A ZoneMinder log severity, named instead of numeric.\n\nZoneMinder's `Logs.Level` scale is inverted — more negative is more severe\n(`0`=Info, `-1`=Warning, `-2`=Error, `-3`=Fatal; positive values are debug\nlevels). Clients should filter by name via `min_level` rather than reasoning\nabout the numeric direction.",
        "enum": [
          "fatal",
          "error",
          "warning",
          "info",
          "debug"
        ]
      },
      "LogQueryParams": {
        "type": "object",
        "description": "Query parameters for listing (and clearing) logs.",
        "properties": {
          "component": {
            "type": [
              "string",
              "null"
            ],
            "description": "Filter by component name (e.g., \"zmc\", \"zma\", \"zmdc\", \"web\")",
            "example": "zmc"
          },
          "end": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Only logs at or before this Unix time (seconds; `TimeKey`).",
            "example": 1714400000.0
          },
          "level": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Exact `Logs.Level` value match (ZoneMinder's inverted numeric scale:\n0=Info, -1=Warning, -2=Error, -3=Fatal, positive=debug). For \"this\nsevere or worse\", use `min_level` instead.",
            "example": -2
          },
          "min_level": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/LogLevel",
                "description": "Filter to this severity **or worse** (`fatal` < `error` < `warning` <\n`info` < `debug`). E.g. `min_level=error` returns errors and fatals.\nPreferred over the raw numeric `level`."
              }
            ]
          },
          "page": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Page number (1-indexed)",
            "example": 1,
            "minimum": 0
          },
          "page_size": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Number of items per page (max 1000)",
            "example": 50,
            "minimum": 0
          },
          "search": {
            "type": [
              "string",
              "null"
            ],
            "description": "Case-insensitive substring match on the log message.",
            "example": "connection"
          },
          "server_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Filter by server ID",
            "example": 1,
            "minimum": 0
          },
          "sort": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/LogSort",
                "description": "Sort by time: `asc` (oldest first) or `desc` (newest first, default)."
              }
            ]
          },
          "start": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Only logs at or after this Unix time (seconds; `TimeKey`).",
            "example": 1714300000.0
          }
        }
      },
      "LogResponse": {
        "type": "object",
        "required": [
          "id",
          "time_key",
          "component",
          "level",
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "Log code (e.g., \"WAR\", \"ERR\", \"INF\")",
            "example": "INF"
          },
          "component": {
            "type": "string",
            "description": "Component that generated the log (e.g., \"zmc\", \"zma\", \"zmdc\", \"web\")",
            "example": "zmc"
          },
          "file": {
            "type": [
              "string",
              "null"
            ],
            "description": "Source file that generated the log",
            "example": "zm_monitor.cpp"
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "description": "Log entry ID",
            "example": 12345,
            "minimum": 0
          },
          "level": {
            "type": "integer",
            "format": "int32",
            "description": "Log level: -3=Debug, -2=Debug, -1=Debug, 0=Info, 1=Warning, 2=Error, 3=Fatal",
            "example": 0
          },
          "line": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Line number in the source file",
            "example": 123,
            "minimum": 0
          },
          "message": {
            "type": "string",
            "description": "Log message",
            "example": "Starting capture daemon"
          },
          "pid": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Process ID that generated the log",
            "example": 12345
          },
          "server_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Server ID (for multi-server setups)",
            "example": 1,
            "minimum": 0
          },
          "time_key": {
            "type": "string",
            "description": "Timestamp as Unix epoch with microseconds (e.g., 1234567890.123456)",
            "example": "1704067200.123456"
          }
        }
      },
      "LogSort": {
        "type": "string",
        "description": "Sort direction for the log time (`TimeKey`).",
        "enum": [
          "asc",
          "desc"
        ]
      },
      "LoginRequest": {
        "type": "object",
        "required": [
          "username",
          "password"
        ],
        "properties": {
          "password": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        }
      },
      "LoginResponse": {
        "oneOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/TokenResponse"
              },
              {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "Token"
                    ]
                  }
                }
              }
            ]
          },
          {
            "type": "object",
            "required": [
              "message",
              "expire_in",
              "type"
            ],
            "properties": {
              "expire_in": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              },
              "message": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "Code"
                ]
              }
            }
          }
        ]
      },
      "ManufacturerResponse": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": "string"
          }
        }
      },
      "MatchOp": {
        "type": "string",
        "description": "How a [`FilterExpr::Group`] joins its children.",
        "enum": [
          "all",
          "any"
        ]
      },
      "MeResponse": {
        "type": "object",
        "description": "The authenticated caller's account plus the metadata carried by their\ncurrent access token, so a client can show \"signed in as / expires at\"\nwithout decoding the JWT itself (GH #37).",
        "required": [
          "user",
          "issued_at",
          "expires_at",
          "token_type"
        ],
        "properties": {
          "expires_at": {
            "type": "integer",
            "format": "int64",
            "description": "Token expiry, unix seconds."
          },
          "issued_at": {
            "type": "integer",
            "format": "int64",
            "description": "Token issued-at, unix seconds."
          },
          "token_type": {
            "type": "string",
            "description": "Token kind: `access` or `refresh` (always `access` here)."
          },
          "user": {
            "$ref": "#/components/schemas/UserResponse",
            "description": "The caller's user record (permissions, profile)."
          }
        }
      },
      "MessageResponse": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "ModelResponse": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "manufacturer_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "MonitorEventCount": {
        "type": "object",
        "description": "Event count per monitor (for console view)",
        "required": [
          "monitor_id",
          "count"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "monitor_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "MonitorPermissionResponse": {
        "type": "object",
        "required": [
          "id",
          "monitor_id",
          "user_id",
          "permission"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "monitor_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "permission": {
            "type": "string"
          },
          "user_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "MonitorPipelineResponse": {
        "type": "object",
        "description": "A monitor's stored zm-next processing plugin graph (the \"free graph\").",
        "required": [
          "monitor_id",
          "version",
          "graph",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "description": "RFC 3339 timestamps."
          },
          "graph": {
            "type": "object",
            "description": "The processing plugin graph document: `{ \"plugins\": [ {id,kind,cfg,children}, ... ] }`."
          },
          "monitor_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "updated_at": {
            "type": "string"
          },
          "version": {
            "type": "integer",
            "format": "int32",
            "description": "Document/schema version.",
            "minimum": 0
          }
        }
      },
      "MonitorPresetResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "type",
          "controllable",
          "default_rate",
          "default_scale"
        ],
        "properties": {
          "channel": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "control_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "control_device": {
            "type": [
              "string",
              "null"
            ]
          },
          "control_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "controllable": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "default_rate": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "default_scale": {
            "type": "string"
          },
          "device": {
            "type": [
              "string",
              "null"
            ]
          },
          "format": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "height": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "host": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "max_fps": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "method": {
            "type": [
              "string",
              "null"
            ]
          },
          "model_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": "string"
          },
          "palette": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "path": {
            "type": [
              "string",
              "null"
            ]
          },
          "port": {
            "type": [
              "string",
              "null"
            ]
          },
          "protocol": {
            "type": [
              "string",
              "null"
            ]
          },
          "sub_path": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "$ref": "#/components/schemas/MonitorType"
          },
          "width": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "MonitorResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "deleted",
          "enabled",
          "storage_id",
          "type",
          "function",
          "capturing",
          "decoding_enabled",
          "decoding",
          "rtsp2_web_enabled",
          "rtsp2_web_type",
          "janus_enabled",
          "janus_audio_enabled",
          "restream",
          "triggers",
          "event_start_command",
          "event_end_command",
          "onvif_url",
          "onvif_events_path",
          "onvif_username",
          "onvif_options",
          "onvif_event_listener",
          "use_amcrest_api",
          "device",
          "channel",
          "format",
          "port",
          "sub_path",
          "width",
          "height",
          "colours",
          "palette",
          "orientation",
          "deinterlacing",
          "wall_clock_timestamps",
          "go2rtc_enabled",
          "stream_channel",
          "save_jpe_gs",
          "video_writer",
          "record_audio",
          "recording_source",
          "event_prefix",
          "label_x",
          "label_y",
          "label_size",
          "image_buffer_count",
          "max_image_buffer_count",
          "warmup_count",
          "pre_event_count",
          "post_event_count",
          "stream_replay_buffer",
          "alarm_frame_count",
          "section_length",
          "section_length_warn",
          "event_close_mode",
          "min_section_length",
          "frame_skip",
          "motion_frame_skip",
          "analysis_update_delay",
          "fps_report_interval",
          "ref_blend_perc",
          "alarm_ref_blend_perc",
          "controllable",
          "track_motion",
          "return_location",
          "modect_during_ptz",
          "default_rate",
          "default_scale",
          "default_codec",
          "signal_check_points",
          "signal_check_colour",
          "web_colour",
          "exif",
          "zone_count",
          "rtsp_server",
          "rtsp_stream_name",
          "soap_wsa_compl",
          "importance",
          "mqtt_enabled",
          "mqtt_subscriptions",
          "startup_delay",
          "analysing",
          "analysis_source",
          "analysis_image",
          "analysis_image_opacity",
          "object_detection",
          "object_detection_model",
          "object_detection_object_threshold",
          "object_detection_nms_threshold",
          "what_display",
          "recording"
        ],
        "properties": {
          "alarm_frame_count": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "alarm_max_fps": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "alarm_ref_blend_perc": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "analysing": {
            "type": "string"
          },
          "analysis_fps_limit": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "analysis_image": {
            "type": "string"
          },
          "analysis_image_opacity": {
            "type": "integer",
            "format": "int32",
            "description": "Alpha applied when compositing the analysis image over the frame (0-255).",
            "minimum": 0
          },
          "analysis_source": {
            "type": "string"
          },
          "analysis_update_delay": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "auto_stop_timeout": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "brightness": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "capturing": {
            "type": "string"
          },
          "channel": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "colour": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "colours": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "contrast": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "control_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "control_device": {
            "type": [
              "string",
              "null"
            ]
          },
          "control_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "controllable": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "decoder": {
            "type": [
              "string",
              "null"
            ]
          },
          "decoder_hw_accel_device": {
            "type": [
              "string",
              "null"
            ]
          },
          "decoder_hw_accel_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "decoding": {
            "type": "string"
          },
          "decoding_enabled": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "default_codec": {
            "type": "string"
          },
          "default_player": {
            "type": [
              "string",
              "null"
            ]
          },
          "default_rate": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "default_scale": {
            "type": "string"
          },
          "deinterlacing": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "deleted": {
            "type": "boolean"
          },
          "device": {
            "type": "string"
          },
          "enabled": {
            "type": "integer",
            "format": "int32",
            "description": "Whether the monitor is enabled (ZoneMinder's `Monitors.Enabled`).",
            "minimum": 0
          },
          "encoder": {
            "type": [
              "string",
              "null"
            ]
          },
          "encoder_hw_accel_device": {
            "type": [
              "string",
              "null"
            ]
          },
          "encoder_hw_accel_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "encoder_parameters": {
            "type": [
              "string",
              "null"
            ]
          },
          "event_close_mode": {
            "type": "string"
          },
          "event_end_command": {
            "type": "string"
          },
          "event_prefix": {
            "type": "string"
          },
          "event_start_command": {
            "type": "string"
          },
          "exif": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "format": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "fps_report_interval": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "frame_skip": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "function": {
            "type": "string"
          },
          "go2rtc_enabled": {
            "type": "integer",
            "format": "int32"
          },
          "height": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "host": {
            "type": [
              "string",
              "null"
            ]
          },
          "hue": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "image_buffer_count": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "importance": {
            "type": "string"
          },
          "janus_audio_enabled": {
            "type": "integer",
            "format": "int32"
          },
          "janus_enabled": {
            "type": "integer",
            "format": "int32"
          },
          "janus_profile_override": {
            "type": [
              "string",
              "null"
            ]
          },
          "janus_rtsp_session_timeout": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "label_format": {
            "type": [
              "string",
              "null"
            ]
          },
          "label_size": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "label_x": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "label_y": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "latitude": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "linked_monitors": {
            "type": [
              "string",
              "null"
            ]
          },
          "longitude": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "manufacturer_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_fps": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "max_image_buffer_count": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "method": {
            "type": [
              "string",
              "null"
            ]
          },
          "min_section_length": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "modect_during_ptz": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "model_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "motion_frame_skip": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "mqtt_enabled": {
            "type": "integer",
            "format": "int32"
          },
          "mqtt_subscriptions": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "object_detection": {
            "type": "string",
            "description": "Per-monitor object detection: the detector in use (`none` when off)."
          },
          "object_detection_model": {
            "type": "string",
            "description": "Name of the AI model used for object detection."
          },
          "object_detection_nms_threshold": {
            "type": "number",
            "format": "float",
            "description": "Non-maximum-suppression threshold (0.0-1.0)."
          },
          "object_detection_object_threshold": {
            "type": "number",
            "format": "float",
            "description": "Object confidence threshold (0.0-1.0)."
          },
          "onvif_alarm_text": {
            "type": [
              "string",
              "null"
            ]
          },
          "onvif_event_listener": {
            "type": "integer",
            "format": "int32"
          },
          "onvif_events_path": {
            "type": "string"
          },
          "onvif_options": {
            "type": "string"
          },
          "onvif_url": {
            "type": "string"
          },
          "onvif_username": {
            "type": "string"
          },
          "options": {
            "type": [
              "string",
              "null"
            ]
          },
          "orientation": {
            "type": "string"
          },
          "output_codec": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "output_container": {
            "type": [
              "string",
              "null"
            ]
          },
          "palette": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "path": {
            "type": [
              "string",
              "null"
            ]
          },
          "port": {
            "type": "string"
          },
          "post_event_count": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "pre_event_count": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "protocol": {
            "type": [
              "string",
              "null"
            ]
          },
          "record_audio": {
            "type": "integer",
            "format": "int32"
          },
          "recording": {
            "type": "string"
          },
          "recording_source": {
            "type": "string"
          },
          "ref_blend_perc": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "refresh": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "restream": {
            "type": "integer",
            "format": "int32"
          },
          "return_delay": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "return_location": {
            "type": "integer",
            "format": "int32"
          },
          "rtsp2_web_enabled": {
            "type": "integer",
            "format": "int32"
          },
          "rtsp2_web_type": {
            "type": "string"
          },
          "rtsp_describe": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "rtsp_server": {
            "type": "integer",
            "format": "int32"
          },
          "rtsp_stream_name": {
            "type": "string"
          },
          "rtsp_user": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "save_jpe_gs": {
            "type": "integer",
            "format": "int32"
          },
          "second_path": {
            "type": [
              "string",
              "null"
            ]
          },
          "section_length": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "section_length_warn": {
            "type": "integer",
            "format": "int32"
          },
          "sequence": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "server_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "signal_check_colour": {
            "type": "string"
          },
          "signal_check_points": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "soap_wsa_compl": {
            "type": "integer",
            "format": "int32"
          },
          "startup_delay": {
            "type": "integer",
            "format": "int32"
          },
          "storage_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "stream_channel": {
            "type": "string",
            "description": "Stream source channel. Replaces the old `RTSP2WebStream` column, which\nZoneMinder renamed to `StreamChannel` in 1.37.79."
          },
          "stream_replay_buffer": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "sub_path": {
            "type": "string"
          },
          "track_delay": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "track_motion": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "triggers": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "use_amcrest_api": {
            "type": "integer",
            "format": "int32"
          },
          "user": {
            "type": [
              "string",
              "null"
            ]
          },
          "v4l_captures_per_frame": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "v4l_multi_buffer": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "video_writer": {
            "type": "integer",
            "format": "int32"
          },
          "wall_clock_timestamps": {
            "type": "integer",
            "format": "int32"
          },
          "warmup_count": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "web_colour": {
            "type": "string"
          },
          "what_display": {
            "type": "string",
            "description": "What the live view renders: video, audio visualization, or both."
          },
          "width": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "zone_count": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "MonitorStatusResponse": {
        "type": "object",
        "required": [
          "monitor_id",
          "status",
          "capture_fps",
          "analysis_fps",
          "capture_bandwidth",
          "updated_on"
        ],
        "properties": {
          "analysis_fps": {
            "type": "string"
          },
          "capture_bandwidth": {
            "type": "integer",
            "format": "int32"
          },
          "capture_fps": {
            "type": "string"
          },
          "monitor_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "status": {
            "type": "string"
          },
          "updated_on": {
            "type": "string"
          }
        }
      },
      "MonitorType": {
        "type": "string",
        "enum": [
          "Local",
          "Remote",
          "File",
          "Ffmpeg",
          "Libvlc",
          "cURL",
          "WebSite",
          "VNC"
        ]
      },
      "MontageLayoutResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "user_id"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": "string"
          },
          "positions": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "NaiveDateTimeWrapper": {
        "type": "string",
        "description": "Local wall-clock time with no offset, as stored by ZoneMinder",
        "example": "2025-04-24T12:34:56"
      },
      "ObjectTypeResponse": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "human": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Orientation": {
        "type": "string",
        "enum": [
          "ROTATE_0",
          "ROTATE_90",
          "ROTATE_180",
          "ROTATE_270",
          "FLIP_HORI",
          "FLIP_VERT"
        ]
      },
      "OutputContainer": {
        "type": "string",
        "enum": [
          "auto",
          "mp4",
          "mkv",
          "webm"
        ]
      },
      "PaginatedAiDatasetsResponse": {
        "type": "object",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiDatasetResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedAiModelsResponse": {
        "type": "object",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiModelResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedAiObjectClassesResponse": {
        "type": "object",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiObjectClassResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedConfigsResponse": {
        "type": "object",
        "description": "Paginated response for configs",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConfigResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedControlPresetsResponse": {
        "type": "object",
        "description": "Paginated response for control presets",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ControlPresetResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedControlsResponse": {
        "type": "object",
        "description": "Paginated response for controls",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ControlResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedDevicesResponse": {
        "type": "object",
        "description": "Paginated response for devices",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeviceResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedEventDataResponse": {
        "type": "object",
        "description": "Paginated response for event data",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventDataResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedEventSummariesResponse": {
        "type": "object",
        "description": "Paginated response for event summaries",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventSummaryResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedEventsResponse": {
        "type": "object",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedEventsTagsResponse": {
        "type": "object",
        "description": "Paginated response for event-tag associations",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventTagResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedFiltersResponse": {
        "type": "object",
        "description": "Paginated response for filters",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FilterResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedFramesResponse": {
        "type": "object",
        "description": "Paginated response for frames",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FrameResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedGroupMonitorsResponse": {
        "type": "object",
        "description": "Paginated response for group-monitor associations",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupMonitorResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedGroupPermissionsResponse": {
        "type": "object",
        "description": "Paginated response for group permissions",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupPermissionResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedGroupsResponse": {
        "type": "object",
        "description": "Paginated response for groups",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedLogsResponse": {
        "type": "object",
        "description": "Paginated response for log entries",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "description": "Current page number (1-indexed)",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LogResponse"
            },
            "description": "List of log entries"
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "description": "Last page number",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "description": "Number of logs per page",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total number of matching logs",
            "minimum": 0
          }
        }
      },
      "PaginatedManufacturersResponse": {
        "type": "object",
        "description": "Paginated response for manufacturers",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ManufacturerResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedModelsResponse": {
        "type": "object",
        "description": "Paginated response for models",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ModelResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedMonitorPermissionsResponse": {
        "type": "object",
        "description": "Paginated response for monitor permissions",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitorPermissionResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedMonitorPresetsResponse": {
        "type": "object",
        "description": "Paginated response for monitor presets",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitorPresetResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedMonitorStatusesResponse": {
        "type": "object",
        "description": "Paginated response for monitor statuses",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitorStatusResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedMonitorsResponse": {
        "type": "object",
        "description": "Paginated response for monitors",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MonitorResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedMontageLayoutsResponse": {
        "type": "object",
        "description": "Paginated response for montage layouts",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MontageLayoutResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedObjectTypesResponse": {
        "type": "object",
        "description": "Paginated response for object types",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ObjectTypeResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedReportsResponse": {
        "type": "object",
        "description": "Paginated response for reports",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedServerStatsResponse": {
        "type": "object",
        "description": "Paginated response for server stats",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServerStatResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedServersResponse": {
        "type": "object",
        "description": "Paginated response for servers",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServerResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedSessionsResponse": {
        "type": "object",
        "description": "Paginated response for sessions",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SessionResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedSnapshotEventsResponse": {
        "type": "object",
        "description": "Paginated response for snapshot-event associations",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SnapshotEventResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedSnapshotsResponse": {
        "type": "object",
        "description": "Paginated response for snapshots",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SnapshotResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedStatesResponse": {
        "type": "object",
        "description": "Paginated response for states",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StateResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedStatsResponse": {
        "type": "object",
        "description": "Paginated response for stats",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StatResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedStorageResponse": {
        "type": "object",
        "description": "Paginated response for storage",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StorageResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedTagsResponse": {
        "type": "object",
        "description": "Paginated response for tags",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TagResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedTriggersX10Response": {
        "type": "object",
        "description": "Paginated response for X10 triggers",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TriggerX10Response"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedUserPreferencesResponse": {
        "type": "object",
        "description": "Paginated response for user preferences",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserPreferenceResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedUsersResponse": {
        "type": "object",
        "description": "Paginated response for users",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedZonePresetsResponse": {
        "type": "object",
        "description": "Paginated response for zone presets",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ZonePresetResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PaginatedZonesResponse": {
        "type": "object",
        "description": "Paginated response for zones",
        "required": [
          "items",
          "total",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "current_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ZoneResponse"
            }
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "PanTiltCapabilities": {
        "type": "object",
        "description": "Pan/Tilt specific capabilities",
        "required": [
          "can_pan",
          "can_tilt",
          "can_move",
          "can_move_diag",
          "can_move_map",
          "can_move_abs",
          "can_move_rel",
          "can_move_con",
          "pan_range",
          "pan_step",
          "pan_speed",
          "pan_turbo",
          "tilt_range",
          "tilt_step",
          "tilt_speed",
          "tilt_turbo"
        ],
        "properties": {
          "can_move": {
            "type": "boolean",
            "description": "Can move at all"
          },
          "can_move_abs": {
            "type": "boolean",
            "description": "Supports absolute positioning"
          },
          "can_move_con": {
            "type": "boolean",
            "description": "Supports continuous movement"
          },
          "can_move_diag": {
            "type": "boolean",
            "description": "Supports diagonal movement"
          },
          "can_move_map": {
            "type": "boolean",
            "description": "Supports map-based movement (click-to-move)"
          },
          "can_move_rel": {
            "type": "boolean",
            "description": "Supports relative movements"
          },
          "can_pan": {
            "type": "boolean",
            "description": "Can pan (horizontal movement)"
          },
          "can_tilt": {
            "type": "boolean",
            "description": "Can tilt (vertical movement)"
          },
          "pan_range": {
            "$ref": "#/components/schemas/AxisRange",
            "description": "Pan range limits"
          },
          "pan_speed": {
            "$ref": "#/components/schemas/AxisSpeed",
            "description": "Pan speed limits"
          },
          "pan_step": {
            "$ref": "#/components/schemas/AxisStep",
            "description": "Pan step limits"
          },
          "pan_turbo": {
            "$ref": "#/components/schemas/TurboSpeed",
            "description": "Turbo pan speed"
          },
          "tilt_range": {
            "$ref": "#/components/schemas/AxisRange",
            "description": "Tilt range limits"
          },
          "tilt_speed": {
            "$ref": "#/components/schemas/AxisSpeed",
            "description": "Tilt speed limits"
          },
          "tilt_step": {
            "$ref": "#/components/schemas/AxisStep",
            "description": "Tilt step limits"
          },
          "tilt_turbo": {
            "$ref": "#/components/schemas/TurboSpeed",
            "description": "Turbo tilt speed"
          }
        }
      },
      "PowerCapabilities": {
        "type": "object",
        "description": "Power control capabilities",
        "required": [
          "can_wake",
          "can_sleep",
          "can_reset",
          "can_reboot"
        ],
        "properties": {
          "can_reboot": {
            "type": "boolean"
          },
          "can_reset": {
            "type": "boolean"
          },
          "can_sleep": {
            "type": "boolean"
          },
          "can_wake": {
            "type": "boolean"
          }
        }
      },
      "PresetCapabilities": {
        "type": "object",
        "description": "Preset capabilities",
        "required": [
          "has_presets",
          "num_presets",
          "has_home_preset",
          "can_set_presets"
        ],
        "properties": {
          "can_set_presets": {
            "type": "boolean",
            "description": "Can set/save presets"
          },
          "has_home_preset": {
            "type": "boolean",
            "description": "Has a home preset"
          },
          "has_presets": {
            "type": "boolean",
            "description": "Has preset support"
          },
          "num_presets": {
            "type": "integer",
            "format": "int32",
            "description": "Number of presets supported",
            "minimum": 0
          }
        }
      },
      "ProcessState": {
        "type": "string",
        "description": "State of a managed daemon process.",
        "enum": [
          "stopped",
          "starting",
          "running",
          "stopping",
          "failed",
          "restarting"
        ]
      },
      "PtzAbsoluteRequest": {
        "type": "object",
        "description": "Request for absolute positioning",
        "properties": {
          "pan": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Pan position"
          },
          "tilt": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Tilt position"
          },
          "zoom": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Zoom position"
          }
        }
      },
      "PtzCapabilities": {
        "type": "object",
        "description": "Complete PTZ capabilities for a camera",
        "required": [
          "control_id",
          "name",
          "power",
          "pan_tilt",
          "zoom",
          "focus",
          "iris",
          "gain",
          "white_balance",
          "presets",
          "scan"
        ],
        "properties": {
          "control_id": {
            "type": "integer",
            "format": "int32",
            "description": "Control ID from database",
            "minimum": 0
          },
          "focus": {
            "$ref": "#/components/schemas/AxisCapabilities",
            "description": "Focus capabilities"
          },
          "gain": {
            "$ref": "#/components/schemas/AxisCapabilities",
            "description": "Gain capabilities"
          },
          "iris": {
            "$ref": "#/components/schemas/AxisCapabilities",
            "description": "Iris capabilities"
          },
          "name": {
            "type": "string",
            "description": "Control name"
          },
          "pan_tilt": {
            "$ref": "#/components/schemas/PanTiltCapabilities",
            "description": "Pan/Tilt capabilities"
          },
          "power": {
            "$ref": "#/components/schemas/PowerCapabilities",
            "description": "Power control"
          },
          "presets": {
            "$ref": "#/components/schemas/PresetCapabilities",
            "description": "Preset capabilities"
          },
          "protocol": {
            "type": [
              "string",
              "null"
            ],
            "description": "Protocol name (e.g., \"onvif\", \"Dahua\", etc.)"
          },
          "scan": {
            "$ref": "#/components/schemas/ScanCapabilities",
            "description": "Scan capabilities"
          },
          "white_balance": {
            "$ref": "#/components/schemas/AxisCapabilities",
            "description": "White balance capabilities"
          },
          "zoom": {
            "$ref": "#/components/schemas/AxisCapabilities",
            "description": "Zoom capabilities"
          }
        }
      },
      "PtzCapabilitiesResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PtzCapabilities",
            "description": "Full capabilities"
          },
          {
            "type": "object",
            "required": [
              "monitor_id",
              "control_id",
              "name"
            ],
            "properties": {
              "control_id": {
                "type": "integer",
                "format": "int32",
                "description": "Control ID",
                "minimum": 0
              },
              "monitor_id": {
                "type": "integer",
                "format": "int32",
                "description": "Monitor ID",
                "minimum": 0
              },
              "name": {
                "type": "string",
                "description": "Control name"
              },
              "protocol": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Protocol name"
              }
            }
          }
        ],
        "description": "Response for capabilities query"
      },
      "PtzCommandResponse": {
        "type": "object",
        "description": "Response for PTZ command execution",
        "required": [
          "success",
          "message"
        ],
        "properties": {
          "message": {
            "type": "string",
            "description": "Human-readable message"
          },
          "success": {
            "type": "boolean",
            "description": "Whether the command succeeded"
          }
        }
      },
      "PtzFocusRequest": {
        "type": "object",
        "description": "Request for focus operations",
        "properties": {
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Duration in milliseconds",
            "minimum": 0
          },
          "speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Focus speed (0-100 percent)",
            "minimum": 0
          }
        }
      },
      "PtzMoveRequest": {
        "type": "object",
        "description": "Request for continuous movement",
        "properties": {
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Duration in milliseconds (optional, for timed movements)",
            "minimum": 0
          },
          "pan_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Pan speed (0-100 percent)",
            "minimum": 0
          },
          "tilt_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Tilt speed (0-100 percent)",
            "minimum": 0
          }
        }
      },
      "PtzPositionResponse": {
        "type": "object",
        "description": "Current PTZ position",
        "properties": {
          "pan": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Pan position"
          },
          "tilt": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Tilt position"
          },
          "zoom": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Zoom position"
          }
        }
      },
      "PtzPresetRequest": {
        "type": "object",
        "description": "Request for preset operations",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional name for the preset (when setting). The character set is\nrestricted to keep names safe to log, store, and pass downstream as\na single argv element to zmcontrol.pl: NUL truncates C strings,\nnewlines enable log injection, and slashes have no business in a\npreset label. The first character may not be `-` either, since a\nleading hyphen makes the value indistinguishable from a flag to the\nPerl Getopt::Long parser on the receiving end. Any printable,\nnon-control, non-slash character is OK after that, including Unicode\nletters (so non-Latin names still work)."
          }
        }
      },
      "PtzProtocolInfo": {
        "type": "object",
        "description": "Information about a single protocol",
        "required": [
          "name",
          "is_native"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional description"
          },
          "is_native": {
            "type": "boolean",
            "description": "Whether this is a native Rust implementation"
          },
          "name": {
            "type": "string",
            "description": "Protocol name"
          }
        }
      },
      "PtzProtocolListResponse": {
        "type": "object",
        "description": "Response for protocol list",
        "required": [
          "protocols",
          "native_protocols",
          "perl_fallback_enabled"
        ],
        "properties": {
          "native_protocols": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of native (Rust) protocol names"
          },
          "perl_fallback_enabled": {
            "type": "boolean",
            "description": "Whether Perl fallback is enabled"
          },
          "protocols": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PtzProtocolInfo"
            },
            "description": "List of available protocols"
          }
        }
      },
      "PtzRelativeRequest": {
        "type": "object",
        "description": "Request for relative movement",
        "properties": {
          "pan_delta": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Pan delta"
          },
          "tilt_delta": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Tilt delta"
          },
          "zoom_delta": {
            "type": [
              "number",
              "null"
            ],
            "format": "double",
            "description": "Zoom delta"
          }
        }
      },
      "PtzStatusResponse": {
        "type": "object",
        "description": "Response for PTZ status query",
        "required": [
          "monitor_id",
          "available",
          "is_native",
          "capabilities"
        ],
        "properties": {
          "available": {
            "type": "boolean",
            "description": "Whether PTZ control is available"
          },
          "capabilities": {
            "$ref": "#/components/schemas/PtzCapabilities",
            "description": "Full capabilities"
          },
          "is_native": {
            "type": "boolean",
            "description": "Whether using native Rust implementation"
          },
          "monitor_id": {
            "type": "integer",
            "format": "int32",
            "description": "Monitor ID",
            "minimum": 0
          },
          "position": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PtzPositionResponse",
                "description": "Current position (if available)"
              }
            ]
          },
          "protocol": {
            "type": [
              "string",
              "null"
            ],
            "description": "Protocol name"
          }
        }
      },
      "PtzZoomRequest": {
        "type": "object",
        "description": "Request for zoom operations",
        "properties": {
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Duration in milliseconds",
            "minimum": 0
          },
          "speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Zoom speed (0-100 percent)",
            "minimum": 0
          }
        }
      },
      "Recording": {
        "type": "string",
        "enum": [
          "None",
          "OnMotion",
          "Always"
        ]
      },
      "RecordingSource": {
        "type": "string",
        "enum": [
          "Primary",
          "Secondary",
          "Both"
        ]
      },
      "RefreshTokenRequest": {
        "type": "object",
        "required": [
          "token"
        ],
        "properties": {
          "token": {
            "type": "string"
          }
        }
      },
      "ReportResponse": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "created_by": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "User who created the report. Set by the server from the authenticated\ncaller, never accepted from the request.",
            "minimum": 0
          },
          "end_date_time": {
            "type": [
              "string",
              "null"
            ]
          },
          "filter_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "interval": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Report interval in seconds (e.g. 604800 = 7 days).",
            "minimum": 0
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "start_date_time": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Resource": {
        "type": "object",
        "required": [
          "details",
          "resource_type"
        ],
        "properties": {
          "details": {
            "type": "array",
            "items": {
              "type": "array",
              "items": false,
              "prefixItems": [
                {
                  "type": "string"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          "resource_type": {
            "$ref": "#/components/schemas/ResourceType"
          }
        }
      },
      "ResourceType": {
        "type": "string",
        "enum": [
          "User",
          "File",
          "Session",
          "Message",
          "Monitor",
          "Config",
          "EventTag",
          "EventSummary",
          "Event"
        ]
      },
      "Rtsp2WebType": {
        "type": "string",
        "enum": [
          "HLS",
          "MSE",
          "WebRTC"
        ]
      },
      "ScanCapabilities": {
        "type": "object",
        "description": "Auto-scan capabilities",
        "required": [
          "can_auto_scan",
          "num_scan_paths"
        ],
        "properties": {
          "can_auto_scan": {
            "type": "boolean"
          },
          "num_scan_paths": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "SchemeWrapper": {
        "type": "string",
        "example": "Deep"
      },
      "SearchCitation": {
        "type": "object",
        "description": "One retrieved event in a search response — the verifiable ground truth.",
        "required": [
          "event_id",
          "ts",
          "score",
          "snippet",
          "url"
        ],
        "properties": {
          "event_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "score": {
            "type": "number",
            "format": "float",
            "description": "Relevance score (reranker score when reranking is on, else the RRF score;\nhigher is better)."
          },
          "snippet": {
            "type": "string",
            "description": "Snippet of the indexed description text."
          },
          "ts": {
            "type": "integer",
            "format": "int64",
            "description": "Event time, epoch seconds."
          },
          "url": {
            "type": "string",
            "description": "API path to the full event."
          }
        }
      },
      "SearchQueryParams": {
        "type": "object",
        "description": "Query parameters for `GET /api/v3/search`.",
        "required": [
          "q"
        ],
        "properties": {
          "class": {
            "type": [
              "string",
              "null"
            ],
            "description": "Comma-separated object/class pre-filter (e.g. `person,car`).",
            "example": "person,car"
          },
          "from": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Inclusive lower time bound, epoch seconds.",
            "example": "1700000000"
          },
          "k": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Number of results to return (1–50, default 10).",
            "example": "10",
            "minimum": 0
          },
          "monitor_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Restrict to a single monitor (still subject to the caller's ACL).",
            "example": "1",
            "minimum": 0
          },
          "q": {
            "type": "string",
            "description": "The natural-language query.",
            "example": "a person near the front door at night"
          },
          "to": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Inclusive upper time bound, epoch seconds.",
            "example": "1700003600"
          }
        }
      },
      "SearchResponse": {
        "type": "object",
        "description": "Response for `GET /api/v3/search`.",
        "required": [
          "citations",
          "backend"
        ],
        "properties": {
          "answer": {
            "type": [
              "string",
              "null"
            ],
            "description": "Grounded NL answer when the router LLM is reachable; else `null` and the\nclient renders the citations directly."
          },
          "backend": {
            "type": "string",
            "description": "Resolved vector backend (diagnostic): `mariadb` | `sqlite` | `none`."
          },
          "citations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchCitation"
            },
            "description": "The retrieved events."
          },
          "count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Exact count from the SQL count tool for \"how many …\" queries; else `null`.",
            "minimum": 0
          }
        }
      },
      "ServerResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "status",
          "zmstats",
          "zmaudit",
          "zmtrigger",
          "zmeventnotification"
        ],
        "properties": {
          "hostname": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "latitude": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "longitude": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "name": {
            "type": "string"
          },
          "path_to_api": {
            "type": [
              "string",
              "null"
            ]
          },
          "path_to_index": {
            "type": [
              "string",
              "null"
            ]
          },
          "path_to_zms": {
            "type": [
              "string",
              "null"
            ]
          },
          "port": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "protocol": {
            "type": [
              "string",
              "null"
            ]
          },
          "state_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "status": {
            "type": "string"
          },
          "zmaudit": {
            "type": "integer",
            "format": "int32"
          },
          "zmeventnotification": {
            "type": "integer",
            "format": "int32"
          },
          "zmstats": {
            "type": "integer",
            "format": "int32",
            "description": "Per-daemon enable flags (0/1). ZoneMinder's `Servers` table has no\n`zmtelemetry` column, so only these four are exposed."
          },
          "zmtrigger": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ServerStatResponse": {
        "type": "object",
        "required": [
          "id",
          "time_stamp"
        ],
        "properties": {
          "cpu_idle_percent": {
            "type": [
              "string",
              "null"
            ]
          },
          "cpu_load": {
            "type": [
              "string",
              "null"
            ]
          },
          "cpu_nice_percent": {
            "type": [
              "string",
              "null"
            ]
          },
          "cpu_system_percent": {
            "type": [
              "string",
              "null"
            ]
          },
          "cpu_usage_percent": {
            "type": [
              "string",
              "null"
            ]
          },
          "cpu_user_percent": {
            "type": [
              "string",
              "null"
            ]
          },
          "free_mem": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "free_swap": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "server_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "time_stamp": {
            "type": "string"
          },
          "total_mem": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "total_swap": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "ServiceStatusResponse": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string"
          }
        }
      },
      "SessionResponse": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "access": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "data": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          }
        }
      },
      "SimilarQueryParams": {
        "type": "object",
        "description": "Query parameters for `GET /api/v3/events/{id}/similar`.",
        "properties": {
          "k": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Number of results to return (1–50, default 10).",
            "example": "10",
            "minimum": 0
          }
        }
      },
      "SimilarResponse": {
        "type": "object",
        "description": "Response for `GET /api/v3/events/{id}/similar`.",
        "required": [
          "citations",
          "backend"
        ],
        "properties": {
          "backend": {
            "type": "string",
            "description": "Resolved vector backend (diagnostic)."
          },
          "citations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchCitation"
            },
            "description": "Events nearest the source event's embedding."
          }
        }
      },
      "SnapshotEventResponse": {
        "type": "object",
        "required": [
          "id",
          "snapshot_id",
          "event_id"
        ],
        "properties": {
          "event_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "snapshot_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "SnapshotResponse": {
        "type": "object",
        "required": [
          "id"
        ],
        "properties": {
          "created_by": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "created_on": {
            "type": [
              "string",
              "null"
            ],
            "example": "2025-01-15T10:30:00"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "SortDirection": {
        "type": "string",
        "description": "Sort direction",
        "enum": [
          "asc",
          "desc"
        ]
      },
      "StartDaemonRequest": {
        "type": "object",
        "description": "Request to start a daemon.",
        "properties": {
          "args": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Optional additional arguments"
          }
        }
      },
      "StartLiveRequest": {
        "type": "object",
        "description": "Request to start a live stream",
        "properties": {
          "enable_hls": {
            "type": "boolean",
            "description": "Enable HLS output"
          },
          "enable_webrtc": {
            "type": "boolean",
            "description": "Enable WebRTC output"
          }
        }
      },
      "StartLiveResponse": {
        "type": "object",
        "description": "Response for starting a live stream",
        "required": [
          "monitor_id",
          "status"
        ],
        "properties": {
          "hls_playlist": {
            "type": [
              "string",
              "null"
            ]
          },
          "monitor_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "status": {
            "type": "string"
          },
          "webrtc_signaling": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "StatResponse": {
        "type": "object",
        "required": [
          "id",
          "monitor_id",
          "zone_id",
          "event_id",
          "frame_id",
          "pixel_diff",
          "alarm_pixels",
          "filter_pixels",
          "blob_pixels",
          "blobs",
          "min_blob_size",
          "max_blob_size",
          "min_x",
          "max_x",
          "min_y",
          "max_y",
          "score"
        ],
        "properties": {
          "alarm_pixels": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "blob_pixels": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "blobs": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "event_id": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "filter_pixels": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "frame_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "max_blob_size": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "max_x": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "max_y": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "min_blob_size": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "min_x": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "min_y": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "monitor_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "pixel_diff": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "score": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "zone_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "StateResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "definition",
          "is_active"
        ],
        "properties": {
          "definition": {
            "type": "string"
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "is_active": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": "string"
          }
        }
      },
      "StorageResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "path",
          "type",
          "scheme",
          "do_delete",
          "enabled"
        ],
        "properties": {
          "disk_space": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Configured capacity in bytes (`Storages.DiskSpace`), if set."
          },
          "do_delete": {
            "type": "integer",
            "format": "int32"
          },
          "enabled": {
            "type": "integer",
            "format": "int32"
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "scheme": {
            "type": "string"
          },
          "server_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "type": {
            "type": "string"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "StreamEndpoints": {
        "type": "object",
        "required": [
          "webrtc",
          "webrtc_api",
          "hls",
          "mjpeg"
        ],
        "properties": {
          "hls": {
            "type": "string"
          },
          "mjpeg": {
            "type": "string"
          },
          "webrtc": {
            "type": "string"
          },
          "webrtc_api": {
            "type": "string"
          }
        }
      },
      "SystemStatsResponse": {
        "type": "object",
        "description": "Response containing system statistics.",
        "required": [
          "cpu_load",
          "cpu_usage_percent",
          "total_mem",
          "free_mem",
          "total_swap",
          "free_swap",
          "total_disk",
          "used_disk",
          "free_disk",
          "disk_usage_percent"
        ],
        "properties": {
          "cpu_load": {
            "type": "number",
            "format": "double",
            "description": "CPU load average (1 minute)"
          },
          "cpu_usage_percent": {
            "type": "number",
            "format": "double",
            "description": "CPU usage percentage"
          },
          "db_connections": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Database connections currently held by the pool (the legacy header's\n`DB: n/max`). `None` when the pool cannot be inspected.",
            "minimum": 0
          },
          "db_max_connections": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Configured maximum size of the database connection pool.",
            "minimum": 0
          },
          "disk_usage_percent": {
            "type": "number",
            "format": "double",
            "description": "Disk usage percentage"
          },
          "free_disk": {
            "type": "integer",
            "format": "int64",
            "description": "Free disk space in bytes",
            "minimum": 0
          },
          "free_mem": {
            "type": "integer",
            "format": "int64",
            "description": "Free memory in bytes",
            "minimum": 0
          },
          "free_swap": {
            "type": "integer",
            "format": "int64",
            "description": "Free swap in bytes",
            "minimum": 0
          },
          "total_disk": {
            "type": "integer",
            "format": "int64",
            "description": "Total disk space in bytes (root filesystem)",
            "minimum": 0
          },
          "total_mem": {
            "type": "integer",
            "format": "int64",
            "description": "Total memory in bytes",
            "minimum": 0
          },
          "total_swap": {
            "type": "integer",
            "format": "int64",
            "description": "Total swap in bytes",
            "minimum": 0
          },
          "used_disk": {
            "type": "integer",
            "format": "int64",
            "description": "Used disk space in bytes",
            "minimum": 0
          }
        }
      },
      "SystemStatusResponse": {
        "type": "object",
        "description": "Response containing system-wide status.",
        "required": [
          "running",
          "daemons"
        ],
        "properties": {
          "daemons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DaemonStatusResponse"
            },
            "description": "Status of all managed daemons"
          },
          "running": {
            "type": "boolean",
            "description": "Whether the daemon controller is running"
          },
          "stats": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SystemStatsResponse",
                "description": "System statistics"
              }
            ]
          }
        }
      },
      "TagDetailResponse": {
        "type": "object",
        "description": "Tag detail response with paginated events",
        "required": [
          "id",
          "name",
          "events",
          "total_events",
          "per_page",
          "current_page",
          "last_page"
        ],
        "properties": {
          "create_date": {
            "type": [
              "string",
              "null"
            ],
            "example": "2025-01-15T10:30:00Z"
          },
          "current_page": {
            "type": "integer",
            "format": "int64",
            "example": 1,
            "minimum": 0
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventSummary"
            }
          },
          "id": {
            "type": "integer",
            "format": "int64",
            "example": 1,
            "minimum": 0
          },
          "last_page": {
            "type": "integer",
            "format": "int64",
            "example": 5,
            "minimum": 0
          },
          "name": {
            "type": "string",
            "example": "Important"
          },
          "per_page": {
            "type": "integer",
            "format": "int64",
            "example": 20,
            "minimum": 0
          },
          "total_events": {
            "type": "integer",
            "format": "int64",
            "example": 100,
            "minimum": 0
          }
        }
      },
      "TagResponse": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "create_date": {
            "type": [
              "string",
              "null"
            ],
            "example": "2025-01-15T10:30:00Z"
          },
          "event_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Number of events with this tag",
            "minimum": 0
          },
          "id": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "name": {
            "type": "string"
          }
        }
      },
      "TagSummary": {
        "type": "object",
        "description": "Lightweight tag summary for embedding in EventResponse",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64",
            "example": 1,
            "minimum": 0
          },
          "name": {
            "type": "string",
            "example": "Important"
          }
        }
      },
      "TokenInfoRequest": {
        "type": "object",
        "required": [
          "token"
        ],
        "properties": {
          "token": {
            "type": "string"
          }
        }
      },
      "TokenResponse": {
        "type": "object",
        "required": [
          "token_type",
          "access_token",
          "refresh_token",
          "expire_in"
        ],
        "properties": {
          "access_token": {
            "type": "string"
          },
          "expire_in": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "refresh_token": {
            "type": "string"
          },
          "token_type": {
            "type": "string"
          }
        }
      },
      "TokenType": {
        "type": "string",
        "description": "Which of the two token kinds a JWT is. Access and refresh tokens are\notherwise structurally identical `UserClaims`, separated only by the key\npair that signs them; `typ` makes the distinction explicit so a\nmisconfiguration that pointed both key paths at the same pair could not\nsilently let a refresh token act as an access token (or vice versa).",
        "enum": [
          "access",
          "refresh"
        ]
      },
      "TriggerX10Response": {
        "type": "object",
        "required": [
          "monitor_id"
        ],
        "properties": {
          "activation": {
            "type": [
              "string",
              "null"
            ]
          },
          "alarm_input": {
            "type": [
              "string",
              "null"
            ]
          },
          "alarm_output": {
            "type": [
              "string",
              "null"
            ]
          },
          "monitor_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "TurboSpeed": {
        "type": "object",
        "description": "Turbo speed configuration for pan/tilt",
        "required": [
          "has_turbo"
        ],
        "properties": {
          "has_turbo": {
            "type": "boolean"
          },
          "speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          }
        }
      },
      "UpdateAiDatasetRequest": {
        "type": "object",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "num_classes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "version": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateAiModelRequest": {
        "type": "object",
        "properties": {
          "dataset_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Set to re-point the model at another dataset. `null` clears it.",
            "minimum": 0
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "enabled": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "framework": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Framework"
              }
            ]
          },
          "model_path": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "version": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateAiObjectClassRequest": {
        "type": "object",
        "properties": {
          "class_index": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "class_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "dataset_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateConfigRequest": {
        "type": "object",
        "required": [
          "value"
        ],
        "properties": {
          "value": {
            "type": "string"
          }
        }
      },
      "UpdateControlPresetRequest": {
        "type": "object",
        "properties": {
          "label": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateControlRequest": {
        "type": "object",
        "properties": {
          "can_auto_focus": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_auto_gain": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_auto_iris": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_auto_scan": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_auto_white": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_auto_zoom": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_focus": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_focus_abs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_focus_con": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_focus_rel": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_gain": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_gain_abs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_gain_con": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_gain_rel": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_iris": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_iris_abs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_iris_con": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_iris_rel": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_move": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_move_abs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_move_con": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_move_diag": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_move_map": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_move_rel": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_pan": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_reboot": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_reset": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_set_presets": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_sleep": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_tilt": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_wake": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_white": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_white_abs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_white_con": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_white_rel": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_zoom": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_zoom_abs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_zoom_con": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "can_zoom_rel": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_focus_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_gain_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_home_preset": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_iris_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_pan_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_presets": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_tilt_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_turbo_pan": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_turbo_tilt": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_white_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "has_zoom_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_focus_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_focus_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_focus_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_gain_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_gain_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_gain_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_iris_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_iris_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_iris_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_pan_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "max_pan_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "max_pan_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "max_tilt_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "max_tilt_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "max_tilt_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "max_white_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_white_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_white_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_zoom_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_zoom_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_zoom_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_focus_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_focus_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_focus_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_gain_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_gain_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_gain_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_iris_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_iris_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_iris_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_pan_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min_pan_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min_pan_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min_tilt_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min_tilt_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min_tilt_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min_white_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_white_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_white_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_zoom_range": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_zoom_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_zoom_step": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "num_presets": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "num_scan_paths": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "protocol": {
            "type": [
              "string",
              "null"
            ]
          },
          "turbo_pan_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "turbo_tilt_speed": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MonitorType"
              }
            ]
          }
        }
      },
      "UpdateDeviceRequest": {
        "type": "object",
        "properties": {
          "key_string": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DeviceType"
              }
            ]
          }
        }
      },
      "UpdateEventDataRequest": {
        "type": "object",
        "properties": {
          "data": {
            "type": [
              "string",
              "null"
            ],
            "example": "{\"detections\": []}"
          }
        }
      },
      "UpdateFilterRequest": {
        "type": "object",
        "description": "Patch a saved event filter. Every field is optional; only the ones provided\nare changed.",
        "properties": {
          "auto_archive": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_copy": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_copy_to": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_delete": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_email": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_execute": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_execute_cmd": {
            "type": [
              "string",
              "null"
            ]
          },
          "auto_message": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_move": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_move_to": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_unarchive": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_upload": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_video": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "background": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "concurrent": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "email_body": {
            "type": [
              "string",
              "null"
            ]
          },
          "email_format": {
            "type": [
              "string",
              "null"
            ],
            "description": "`Individual` or `Summary`."
          },
          "email_server": {
            "type": [
              "string",
              "null"
            ]
          },
          "email_subject": {
            "type": [
              "string",
              "null"
            ]
          },
          "email_to": {
            "type": [
              "string",
              "null"
            ]
          },
          "execute_interval": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "filter": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/FilterQuery",
                "description": "Structured filter AST; when present it is translated to `query_json`."
              }
            ]
          },
          "lock_rows": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "query_json": {
            "type": [
              "string",
              "null"
            ]
          },
          "update_disk_space": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "user_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "UpdateFrameRequest": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "score": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Motion detection score",
            "minimum": 0
          },
          "type": {
            "type": "string",
            "description": "Frame type (Normal, Bulk, Alarm)"
          }
        }
      },
      "UpdateGroupPermissionRequest": {
        "type": "object",
        "properties": {
          "permission": {
            "type": [
              "string",
              "null"
            ],
            "example": "Edit"
          }
        }
      },
      "UpdateGroupRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "parent_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Re-parent the group. Omit to leave the parent unchanged; `null` clears\nit (top-level group); a group id nests under that group. Self-parenting\nand cycles are rejected (GH #28).",
            "minimum": 0
          }
        }
      },
      "UpdateManufacturerRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateModelRequest": {
        "type": "object",
        "properties": {
          "manufacturer_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateMonitorPermissionRequest": {
        "type": "object",
        "properties": {
          "permission": {
            "type": [
              "string",
              "null"
            ],
            "example": "Edit"
          }
        }
      },
      "UpdateMonitorPresetRequest": {
        "type": "object",
        "properties": {
          "channel": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "control_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "control_device": {
            "type": [
              "string",
              "null"
            ]
          },
          "control_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "controllable": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "default_rate": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "default_scale": {
            "type": [
              "string",
              "null"
            ]
          },
          "device": {
            "type": [
              "string",
              "null"
            ]
          },
          "format": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "height": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "host": {
            "type": [
              "string",
              "null"
            ]
          },
          "max_fps": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "method": {
            "type": [
              "string",
              "null"
            ]
          },
          "model_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "palette": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "path": {
            "type": [
              "string",
              "null"
            ]
          },
          "port": {
            "type": [
              "string",
              "null"
            ]
          },
          "protocol": {
            "type": [
              "string",
              "null"
            ]
          },
          "sub_path": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MonitorType"
              }
            ]
          },
          "width": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "UpdateMonitorRequest": {
        "type": "object",
        "properties": {
          "alarm_frame_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "alarm_max_fps": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "alarm_ref_blend_perc": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "analysing": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Analysing"
              }
            ]
          },
          "analysis_fps_limit": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "analysis_image": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AnalysisImage"
              }
            ]
          },
          "analysis_image_opacity": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Alpha applied when compositing the analysis image over the frame.",
            "minimum": 0
          },
          "analysis_source": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AnalysisSource"
              }
            ]
          },
          "analysis_update_delay": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "auto_stop_timeout": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "brightness": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "capturing": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Capturing"
              }
            ]
          },
          "channel": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "colour": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "colours": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "contrast": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "control_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "control_device": {
            "type": [
              "string",
              "null"
            ]
          },
          "control_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "controllable": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "decoder": {
            "type": [
              "string",
              "null"
            ]
          },
          "decoder_hw_accel_device": {
            "type": [
              "string",
              "null"
            ]
          },
          "decoder_hw_accel_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "decoding": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Decoding"
              }
            ]
          },
          "decoding_enabled": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "default_codec": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DefaultCodec"
              }
            ]
          },
          "default_rate": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "default_scale": {
            "type": [
              "string",
              "null"
            ]
          },
          "deinterlacing": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "deleted": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "device": {
            "type": [
              "string",
              "null"
            ]
          },
          "enabled": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Enable/disable the monitor (ZoneMinder's `Monitors.Enabled`).",
            "minimum": 0
          },
          "encoder": {
            "type": [
              "string",
              "null"
            ]
          },
          "encoder_parameters": {
            "type": [
              "string",
              "null"
            ]
          },
          "event_close_mode": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/EventCloseMode"
              }
            ]
          },
          "event_end_command": {
            "type": [
              "string",
              "null"
            ]
          },
          "event_prefix": {
            "type": [
              "string",
              "null"
            ]
          },
          "event_start_command": {
            "type": [
              "string",
              "null"
            ]
          },
          "exif": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "format": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "fps_report_interval": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "frame_skip": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "function": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Function"
              }
            ]
          },
          "height": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "host": {
            "type": [
              "string",
              "null"
            ]
          },
          "hue": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "image_buffer_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "importance": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Importance"
              }
            ]
          },
          "janus_audio_enabled": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "janus_enabled": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "janus_profile_override": {
            "type": [
              "string",
              "null"
            ]
          },
          "janus_rtsp_session_timeout": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "label_format": {
            "type": [
              "string",
              "null"
            ]
          },
          "label_size": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "label_x": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "label_y": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "latitude": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "linked_monitors": {
            "type": [
              "string",
              "null"
            ]
          },
          "longitude": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "manufacturer_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_fps": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "max_image_buffer_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "method": {
            "type": [
              "string",
              "null"
            ]
          },
          "min_section_length": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "modect_during_ptz": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "model_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "motion_frame_skip": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "mqtt_enabled": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "mqtt_subscriptions": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "object_detection": {
            "type": [
              "string",
              "null"
            ],
            "description": "Detector to use, or `none` to disable object detection."
          },
          "object_detection_model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the AI model used for object detection."
          },
          "object_detection_nms_threshold": {
            "type": [
              "number",
              "null"
            ],
            "format": "float",
            "description": "Non-maximum-suppression threshold (0.0-1.0)."
          },
          "object_detection_object_threshold": {
            "type": [
              "number",
              "null"
            ],
            "format": "float",
            "description": "Object confidence threshold (0.0-1.0)."
          },
          "onvif_alarm_text": {
            "type": [
              "string",
              "null"
            ]
          },
          "onvif_event_listener": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "onvif_events_path": {
            "type": [
              "string",
              "null"
            ]
          },
          "onvif_options": {
            "type": [
              "string",
              "null"
            ]
          },
          "onvif_password": {
            "type": [
              "string",
              "null"
            ]
          },
          "onvif_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "onvif_username": {
            "type": [
              "string",
              "null"
            ]
          },
          "options": {
            "type": [
              "string",
              "null"
            ]
          },
          "orientation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Orientation"
              }
            ]
          },
          "output_codec": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "output_container": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OutputContainer"
              }
            ]
          },
          "palette": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "pass": {
            "type": [
              "string",
              "null"
            ]
          },
          "path": {
            "type": [
              "string",
              "null"
            ]
          },
          "port": {
            "type": [
              "string",
              "null"
            ]
          },
          "post_event_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "pre_event_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "protocol": {
            "type": [
              "string",
              "null"
            ]
          },
          "record_audio": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Boolean. The old `min = -1` accepted a value the column has no meaning for."
          },
          "recording": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Recording"
              }
            ]
          },
          "recording_source": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/RecordingSource"
              }
            ]
          },
          "ref_blend_perc": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "refresh": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "restream": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "return_delay": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "return_location": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "rtsp2_web_enabled": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "rtsp2_web_type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Rtsp2WebType"
              }
            ]
          },
          "rtsp_describe": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "rtsp_server": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "rtsp_stream_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "rtsp_user": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "save_jpe_gs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "`Monitors.SaveJPEGs` is a two-bit mask, not a flag: bit 0 saves\ncaptured frames and bit 1 saves analysis images, so 3 means both — and\n3 is the column default, which the old `max = 1` rejected (GH #39)."
          },
          "second_path": {
            "type": [
              "string",
              "null"
            ]
          },
          "section_length": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "section_length_warn": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "sequence": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "server_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "signal_check_colour": {
            "type": [
              "string",
              "null"
            ]
          },
          "signal_check_points": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "soap_wsa_compl": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "startup_delay": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "storage_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "stream_replay_buffer": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "sub_path": {
            "type": [
              "string",
              "null"
            ]
          },
          "track_delay": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "track_motion": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "triggers": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/MonitorType"
              }
            ]
          },
          "use_amcrest_api": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "user": {
            "type": [
              "string",
              "null"
            ]
          },
          "v4l_captures_per_frame": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "v4l_multi_buffer": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "video_writer": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "0 disabled, 1 encode, 2 camera passthrough."
          },
          "warmup_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "web_colour": {
            "type": [
              "string",
              "null"
            ]
          },
          "width": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "zone_count": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          }
        }
      },
      "UpdateMonitorStatusRequest": {
        "type": "object",
        "required": [
          "capture_fps",
          "analysis_fps"
        ],
        "properties": {
          "analysis_fps": {
            "type": "string",
            "example": "14.8"
          },
          "capture_bandwidth": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "example": 1024000
          },
          "capture_fps": {
            "type": "string",
            "example": "15.5"
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "example": "Connected"
          }
        }
      },
      "UpdateMontageLayoutRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "positions": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "UpdateObjectTypeRequest": {
        "type": "object",
        "properties": {
          "human": {
            "type": [
              "string",
              "null"
            ],
            "example": "Person"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "example": "person"
          }
        }
      },
      "UpdateReportRequest": {
        "type": "object",
        "required": [
          "start_date_time",
          "end_date_time"
        ],
        "properties": {
          "end_date_time": {
            "type": "string",
            "example": "2025-01-08T00:00:00Z"
          },
          "filter_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "example": 1,
            "minimum": 0
          },
          "interval": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "Report interval in seconds (e.g. 604800 = 7 days).",
            "example": 604800,
            "minimum": 0
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "example": "Weekly Security Report",
            "maxLength": 30
          },
          "start_date_time": {
            "type": "string",
            "example": "2025-01-01T00:00:00Z"
          }
        }
      },
      "UpdateServerRequest": {
        "type": "object",
        "properties": {
          "hostname": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "port": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateSessionRequest": {
        "type": "object",
        "properties": {
          "access": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "data": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateSnapshotRequest": {
        "type": "object",
        "properties": {
          "created_by": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "created_on": {
            "type": [
              "string",
              "null"
            ],
            "example": "2025-01-15T10:30:00"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateStatRequest": {
        "type": "object",
        "properties": {
          "alarm_pixels": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "blob_pixels": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "blobs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "event_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "minimum": 0
          },
          "filter_pixels": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "frame_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_blob_size": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_x": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_y": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_blob_size": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_x": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_y": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "monitor_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "pixel_diff": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "score": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "zone_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          }
        }
      },
      "UpdateStateRequest": {
        "type": "object",
        "properties": {
          "definition": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateStorageRequest": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "path": {
            "type": [
              "string",
              "null"
            ]
          },
          "scheme": {
            "type": [
              "string",
              "null"
            ]
          },
          "server_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "type": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateTagRequest": {
        "type": "object",
        "properties": {
          "create_date": {
            "type": [
              "string",
              "null"
            ],
            "example": "2025-01-15T10:30:00Z"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateTriggerX10Request": {
        "type": "object",
        "properties": {
          "activation": {
            "type": [
              "string",
              "null"
            ]
          },
          "alarm_input": {
            "type": [
              "string",
              "null"
            ]
          },
          "alarm_output": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateUserPreferenceRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "value": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateUserRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/UserPermissionsInput"
          },
          {
            "type": "object",
            "properties": {
              "api_enabled": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32",
                "minimum": 0
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "enabled": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32",
                "minimum": 0
              },
              "home_view": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "language": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "max_bandwidth": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "password": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "New password (re-hashed with bcrypt; never stored in plaintext)."
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "token_min_expiry": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64",
                "description": "Set the token-revocation floor (unix seconds). Setting it to \"now\"\nrevokes all of the user's outstanding tokens (admin revoke-all).",
                "minimum": 0
              }
            }
          }
        ],
        "description": "Partial update: every field is optional and only provided fields change."
      },
      "UpdateZonePresetRequest": {
        "type": "object",
        "properties": {
          "check_method": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "type": [
              "string",
              "null"
            ]
          },
          "units": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdateZoneRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "polygon": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UserClaims": {
        "type": "object",
        "required": [
          "iat",
          "exp",
          "typ",
          "user",
          "uid"
        ],
        "properties": {
          "exp": {
            "type": "integer",
            "format": "int64"
          },
          "iat": {
            "type": "integer",
            "format": "int64"
          },
          "perms": {
            "$ref": "#/components/schemas/UserPermissions"
          },
          "typ": {
            "$ref": "#/components/schemas/TokenType"
          },
          "uid": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "user": {
            "type": "string"
          }
        }
      },
      "UserPermissions": {
        "type": "object",
        "description": "A snapshot of a user's per-feature permission levels, embedded in the JWT.",
        "required": [
          "stream",
          "events",
          "control",
          "monitors",
          "groups",
          "devices",
          "snapshots",
          "system"
        ],
        "properties": {
          "control": {
            "$ref": "#/components/schemas/Level"
          },
          "devices": {
            "$ref": "#/components/schemas/Level"
          },
          "events": {
            "$ref": "#/components/schemas/Level"
          },
          "groups": {
            "$ref": "#/components/schemas/Level"
          },
          "monitors": {
            "$ref": "#/components/schemas/Level"
          },
          "snapshots": {
            "$ref": "#/components/schemas/Level"
          },
          "stream": {
            "$ref": "#/components/schemas/Level"
          },
          "system": {
            "$ref": "#/components/schemas/Level"
          }
        }
      },
      "UserPermissionsInput": {
        "type": "object",
        "description": "The eight ZoneMinder per-feature permission levels. Each is optional so a\nrequest can set only the ones it cares about.\n\nValues are the same names `UserResponse` reports: `None` / `View` / `Edit`\n(`Stream` has no `Edit`; `Monitors` also accepts `Create`). They are taken\nas strings and parsed, because the generated entity enums do not derive\n`ToSchema` and `src/entity/` is a generated artifact we don't hand-edit.",
        "properties": {
          "control": {
            "type": [
              "string",
              "null"
            ]
          },
          "devices": {
            "type": [
              "string",
              "null"
            ]
          },
          "events": {
            "type": [
              "string",
              "null"
            ],
            "example": "Edit"
          },
          "groups": {
            "type": [
              "string",
              "null"
            ]
          },
          "monitors": {
            "type": [
              "string",
              "null"
            ]
          },
          "snapshots": {
            "type": [
              "string",
              "null"
            ]
          },
          "stream": {
            "type": [
              "string",
              "null"
            ],
            "example": "View"
          },
          "system": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UserPreferenceResponse": {
        "type": "object",
        "required": [
          "id",
          "user_id"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "user_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "value": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UserResponse": {
        "type": "object",
        "required": [
          "id",
          "username",
          "name",
          "email",
          "phone",
          "enabled",
          "api_enabled",
          "home_view",
          "system",
          "stream",
          "events",
          "control",
          "monitors",
          "groups",
          "devices",
          "snapshots"
        ],
        "properties": {
          "api_enabled": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "control": {
            "type": "string"
          },
          "devices": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "enabled": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "events": {
            "type": "string"
          },
          "groups": {
            "type": "string"
          },
          "home_view": {
            "type": "string"
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "language": {
            "type": [
              "string",
              "null"
            ]
          },
          "max_bandwidth": {
            "type": [
              "string",
              "null"
            ]
          },
          "monitors": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "snapshots": {
            "type": "string"
          },
          "stream": {
            "type": "string"
          },
          "system": {
            "type": "string"
          },
          "username": {
            "type": "string"
          }
        }
      },
      "VersionResponse": {
        "type": "object",
        "required": [
          "version",
          "api_version",
          "db_version"
        ],
        "properties": {
          "api_version": {
            "type": "string",
            "description": "API version"
          },
          "db_version": {
            "type": "string",
            "description": "Database version"
          },
          "version": {
            "type": "string",
            "description": "ZoneMinder version"
          }
        }
      },
      "WebRtcSignalingMessage": {
        "oneOf": [
          {
            "type": "object",
            "description": "Server offer to client",
            "required": [
              "session_id",
              "sdp",
              "type"
            ],
            "properties": {
              "sdp": {
                "type": "string"
              },
              "session_id": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "offer"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Client answer to server",
            "required": [
              "session_id",
              "sdp",
              "type"
            ],
            "properties": {
              "sdp": {
                "type": "string"
              },
              "session_id": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "answer"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "ICE candidate exchange",
            "required": [
              "session_id",
              "candidate",
              "type"
            ],
            "properties": {
              "candidate": {
                "type": "string"
              },
              "sdpMLineIndex": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32",
                "minimum": 0
              },
              "sdpMid": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "session_id": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "icecandidate"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Session ready notification",
            "required": [
              "session_id",
              "monitor_id",
              "has_audio",
              "type"
            ],
            "properties": {
              "has_audio": {
                "type": "boolean",
                "description": "Whether the session carries an audio track (G.711 pass-through\nor AAC transcoded to Opus) alongside the video track"
              },
              "monitor_id": {
                "type": "integer",
                "format": "int32",
                "minimum": 0
              },
              "session_id": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "ready"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Error message",
            "required": [
              "message",
              "type"
            ],
            "properties": {
              "message": {
                "type": "string"
              },
              "type": {
                "type": "string",
                "enum": [
                  "error"
                ]
              }
            }
          },
          {
            "type": "object",
            "description": "Ping/Pong for keepalive",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "ping"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "pong"
                ]
              }
            }
          }
        ],
        "description": "WebRTC signaling message types.\n\nThis is the *actual* wire format exchanged over the\n`/api/v3/live/{monitor_id}/webrtc/ws` WebSocket (text frames, JSON). The\ndiscriminator is the `type` field, lowercased: `offer`, `answer`,\n`icecandidate`, `ready`, `error`, `ping`, `pong`."
      },
      "WebRtcStartupView": {
        "type": "object",
        "description": "Server-side WebRTC startup timing surfaced on `/live/{id}/stats`. All `*_ms`\nare from WS connect and nest: `get_source_ms ≤ offer_ms ≤ ice_connected_ms ≤\nconnected_ms ≤ first_rtp_ms`.",
        "required": [
          "warm_start"
        ],
        "properties": {
          "connected_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "connect → peer Connected (ICE+DTLS). `connected_ms − ice_connected_ms` is\nthe DTLS handshake (the structural ~1.1s offerer-passive cost on a LAN).",
            "minimum": 0
          },
          "first_rtp_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "connect → first video RTP written.",
            "minimum": 0
          },
          "get_source_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "connect → get_source returned (reader acquire/restart cost).",
            "minimum": 0
          },
          "ice_connected_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "connect → ICE-connected (first usable candidate pair).",
            "minimum": 0
          },
          "offer_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "connect → SDP offer sent. With trickle ICE this no longer waits on ICE\ngathering / STUN, so it collapses toward the floor.",
            "minimum": 0
          },
          "warm_start": {
            "type": "boolean",
            "description": "Reader was already hot at connect (no reader spin-up on the offer path)."
          }
        }
      },
      "ZonePresetResponse": {
        "type": "object",
        "required": [
          "id",
          "name",
          "type",
          "units",
          "check_method"
        ],
        "properties": {
          "check_method": {
            "type": "string"
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "units": {
            "type": "string"
          }
        }
      },
      "ZoneResponse": {
        "type": "object",
        "required": [
          "id",
          "monitor_id",
          "name",
          "type",
          "units",
          "num_coords",
          "coords",
          "area",
          "check_method",
          "overload_frames",
          "extend_alarm_frames"
        ],
        "properties": {
          "alarm_rgb": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "area": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "check_method": {
            "type": "string"
          },
          "coords": {
            "type": "string"
          },
          "extend_alarm_frames": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "filter_x": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "filter_y": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "max_alarm_pixels": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "max_blob_pixels": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "max_blobs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "max_filter_pixels": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "max_pixel_threshold": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_alarm_pixels": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "min_blob_pixels": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "min_blobs": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "min_filter_pixels": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "min_pixel_threshold": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "minimum": 0
          },
          "monitor_id": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "name": {
            "type": "string"
          },
          "num_coords": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "overload_frames": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "type": {
            "type": "string"
          },
          "units": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "jwt": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "tags": [
    {
      "name": "Auth",
      "description": "Authentication endpoints"
    },
    {
      "name": "Config",
      "description": "Config management endpoints"
    },
    {
      "name": "Control Presets",
      "description": "Monitor control presets"
    },
    {
      "name": "Controls",
      "description": "PTZ control configurations"
    },
    {
      "name": "Daemons",
      "description": "Daemon process control (replaces zmdc.pl)"
    },
    {
      "name": "Devices",
      "description": "X10 device controllers"
    },
    {
      "name": "Event Data",
      "description": "Event binary data storage"
    },
    {
      "name": "Event Playback",
      "description": "Event video playback and thumbnails"
    },
    {
      "name": "Events",
      "description": "Event management endpoints"
    },
    {
      "name": "Events Tags",
      "description": "Event-tag associations"
    },
    {
      "name": "Filters",
      "description": "Event filter endpoints"
    },
    {
      "name": "Frames",
      "description": "Individual frames within events"
    },
    {
      "name": "Groups",
      "description": "Group management endpoints"
    },
    {
      "name": "Groups Monitors",
      "description": "Group-monitor associations"
    },
    {
      "name": "Groups Permissions",
      "description": "Group permission management"
    },
    {
      "name": "Live Streaming",
      "description": "Live video streaming (HLS, WebRTC)"
    },
    {
      "name": "Logs",
      "description": "Log endpoints"
    },
    {
      "name": "Manufacturers",
      "description": "Camera manufacturers"
    },
    {
      "name": "Models",
      "description": "Camera models"
    },
    {
      "name": "Monitor Presets",
      "description": "Monitor configuration presets"
    },
    {
      "name": "Monitor Status",
      "description": "Real-time monitor status information"
    },
    {
      "name": "Monitors",
      "description": "Monitor management endpoints"
    },
    {
      "name": "Monitors Permissions",
      "description": "Monitor permission management"
    },
    {
      "name": "Montage Layouts",
      "description": "UI montage layouts"
    },
    {
      "name": "Object Types",
      "description": "Object detection type definitions"
    },
    {
      "name": "PTZ",
      "description": "Pan-Tilt-Zoom camera control"
    },
    {
      "name": "Reports",
      "description": "Report definitions and templates"
    },
    {
      "name": "Search",
      "description": "Natural-language / semantic event search"
    },
    {
      "name": "Server",
      "description": "Server information endpoints"
    },
    {
      "name": "Server Stats",
      "description": "Server performance statistics"
    },
    {
      "name": "Servers",
      "description": "Server info endpoints"
    },
    {
      "name": "Sessions",
      "description": "ZoneMinder PHP web-UI login sessions — **not** API tokens. This API authenticates with JWTs from /auth/login; nothing here mints or revokes an API credential. Rows expire automatically under ZM_COOKIE_LIFETIME."
    },
    {
      "name": "Snapshots",
      "description": "System snapshots"
    },
    {
      "name": "Snapshots Events",
      "description": "Snapshot-event associations"
    },
    {
      "name": "States",
      "description": "Monitor states"
    },
    {
      "name": "Stats",
      "description": "Event statistics"
    },
    {
      "name": "Storage",
      "description": "Storage endpoints"
    },
    {
      "name": "System",
      "description": "System-level control (replaces zmpkg.pl)"
    },
    {
      "name": "Tags",
      "description": "Event tags"
    },
    {
      "name": "TriggersX10",
      "description": "X10 alarm triggers"
    },
    {
      "name": "User Preferences",
      "description": "User preference settings"
    },
    {
      "name": "Users",
      "description": "User management endpoints"
    },
    {
      "name": "Zone Presets",
      "description": "Zone preset endpoints"
    },
    {
      "name": "Zones",
      "description": "Zone management endpoints"
    }
  ]
}
