{
  "openapi": "3.1.0",
  "info": {
    "title": "NINA Control REST API",
    "version": "1.4.0",
    "description": "Single-rig server and host gateway. Read docs/API.md for physical-completion semantics and upstream capability limits."
  },
  "servers": [
    {
      "url": "http://127.0.0.1:18700",
      "description": "Platform / standalone host"
    },
    {
      "url": "http://127.0.0.1:18701",
      "description": "Host local gateway"
    }
  ],
  "security": [
    {
      "ApiToken": []
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "Liveness only",
        "security": [],
        "responses": {
          "200": {
            "description": "Alive",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/session": {
      "post": {
        "summary": "Validate supplied Bearer token",
        "security": [
          {
            "ApiToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Authenticated; does not create an anonymous session",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/mount": {
      "get": {
        "summary": "Latest host telemetry, freshness and connectivity",
        "responses": {
          "200": {
            "description": "Telemetry",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/mount/capabilities": {
      "get": {
        "summary": "Actual driver capabilities and limitations",
        "responses": {
          "200": {
            "description": "Capabilities",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/targets": {
      "get": {
        "summary": "Query host NINA catalogue",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Catalogue results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "source": {
                      "type": "string"
                    },
                    "epoch": {
                      "type": "string",
                      "const": "J2000",
                      "default": "J2000"
                    },
                    "targets": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Target"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/commands": {
      "post": {
        "summary": "Queue an asynchronous command",
        "description": "Mutating actions require Idempotency-Key. Same key and body return the same command. A 202 is not completion.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Required except for read actions",
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommandRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Queued command",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Command"
                }
              }
            },
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/commands/{id}": {
      "get": {
        "summary": "Read command status and result",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Command",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Command"
                }
              }
            }
          },
          "404": {
            "description": "Command not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/heartbeat": {
      "post": {
        "summary": "Register session and send telemetry",
        "security": [
          {
            "AgentToken": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "session_id",
                  "mode",
                  "mount"
                ],
                "properties": {
                  "session_id": {
                    "type": "string",
                    "minLength": 16,
                    "maxLength": 100
                  },
                  "mode": {
                    "type": "string"
                  },
                  "mount": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/next": {
      "post": {
        "summary": "Claim one command; null if none",
        "security": [
          {
            "AgentToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Agent-Session",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/commands/{id}": {
      "post": {
        "summary": "Report execution outcome",
        "security": [
          {
            "AgentToken": []
          }
        ],
        "parameters": [
          {
            "name": "X-Agent-Session",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "state"
                ],
                "properties": {
                  "state": {
                    "type": "string",
                    "enum": [
                      "running",
                      "succeeded",
                      "failed",
                      "unknown"
                    ]
                  },
                  "result": {},
                  "error": {
                    "$ref": "#/components/schemas/ErrorDetail"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/camera": {
      "get": {
        "summary": "camera status",
        "responses": {
          "200": {
            "description": "Live device info",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/filterwheel": {
      "get": {
        "summary": "filterwheel status",
        "responses": {
          "200": {
            "description": "Live device info",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/focuser": {
      "get": {
        "summary": "focuser status",
        "responses": {
          "200": {
            "description": "Live device info",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/guider": {
      "get": {
        "summary": "guider status",
        "responses": {
          "200": {
            "description": "Live device info",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/guidecamera": {
      "get": {
        "summary": "guidecamera status",
        "responses": {
          "200": {
            "description": "Live device info",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/equipment": {
      "get": {
        "summary": "All NINA equipment info",
        "responses": {
          "200": {
            "description": "Equipment",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sequences": {
      "get": {
        "summary": "List host sequence library",
        "responses": {
          "200": {
            "description": "Library",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create native sequence in host library",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "document": {
                    "type": "object",
                    "description": "Native NINA saved advanced-sequence JSON; not /sequence/json or /sequence/state output"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Asynchronous command; poll returned id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Command"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sequences/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[0-9a-f]{32}$"
          }
        }
      ],
      "get": {
        "summary": "Read native document and revision",
        "responses": {
          "200": {
            "description": "Sequence record",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update name/document with revision check",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "document": {
                    "type": "object",
                    "description": "Native NINA saved advanced-sequence JSON; not /sequence/json or /sequence/state output"
                  }
                },
                "required": [
                  "revision"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Asynchronous command; poll returned id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Command"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Update name/document with revision check",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "document": {
                    "type": "object",
                    "description": "Native NINA saved advanced-sequence JSON; not /sequence/json or /sequence/state output"
                  }
                },
                "required": [
                  "revision"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Asynchronous command; poll returned id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Command"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete library entry; loaded NINA copy unchanged",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647
                  }
                },
                "required": [
                  "revision"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Asynchronous command; poll returned id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Command"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/sequences/{id}/load": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[0-9a-f]{32}$"
          }
        }
      ],
      "post": {
        "summary": "Load saved native document into NINA; does not start",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "revision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647
                  }
                },
                "required": [
                  "revision"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Asynchronous command; poll returned id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Command"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid origin/host",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "501": {
            "description": "Not supported",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Upstream error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Host unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/console/schema": {
      "get": {
        "summary": "Imaging optional-device form schemas",
        "responses": {
          "200": {
            "description": "Action parameter schemas"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiToken": {
        "type": "http",
        "scheme": "bearer"
      },
      "AgentToken": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "CommandRequest": {
        "oneOf": [
          {
            "title": "application.imaging",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "application.imaging"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "application.logs",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "application.logs"
              },
              "params": {
                "type": "object",
                "properties": {
                  "lineCount": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 500
                  },
                  "level": {
                    "type": "string",
                    "enum": [
                      "TRACE",
                      "DEBUG",
                      "INFO",
                      "WARNING",
                      "ERROR"
                    ]
                  }
                },
                "required": [
                  "lineCount"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "application.plugins",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "application.plugins"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "application.screenshot",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "application.screenshot"
              },
              "params": {
                "type": "object",
                "properties": {
                  "quality": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 95
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "camera.abort",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "camera.abort"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "camera.binning",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "camera.binning"
              },
              "params": {
                "type": "object",
                "properties": {
                  "binning": {
                    "type": "string",
                    "pattern": "^[1-9][0-9]?x[1-9][0-9]?$"
                  }
                },
                "required": [
                  "binning"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "camera.capture",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "camera.capture"
              },
              "params": {
                "type": "object",
                "properties": {
                  "duration_s": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 86400
                  },
                  "gain": {
                    "type": "integer",
                    "minimum": -1,
                    "maximum": 2147483647
                  },
                  "image_type": {
                    "type": "string",
                    "enum": [
                      "LIGHT",
                      "DARK",
                      "BIAS",
                      "FLAT",
                      "SNAPSHOT"
                    ]
                  },
                  "save": {
                    "type": "boolean"
                  },
                  "target_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [
                  "duration_s"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "camera.connect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "camera.connect"
              },
              "params": {
                "type": "object",
                "properties": {
                  "device_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "camera.cool",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "camera.cool"
              },
              "params": {
                "type": "object",
                "properties": {
                  "temperature_c": {
                    "type": "number",
                    "minimum": -100,
                    "maximum": 50
                  },
                  "minutes": {
                    "type": "number",
                    "minimum": -1,
                    "maximum": 240
                  },
                  "cancel": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "temperature_c"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "camera.devices",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "camera.devices"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "camera.dew_heater",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "camera.dew_heater"
              },
              "params": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "enabled"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "camera.disconnect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "camera.disconnect"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "camera.info",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "camera.info"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "camera.readout",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "camera.readout"
              },
              "params": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  }
                },
                "required": [
                  "mode"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "camera.readout_image",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "camera.readout_image"
              },
              "params": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  }
                },
                "required": [
                  "mode"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "camera.readout_snapshot",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "camera.readout_snapshot"
              },
              "params": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  }
                },
                "required": [
                  "mode"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "camera.rescan",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "camera.rescan"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "camera.statistics",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "camera.statistics"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "camera.usb_limit",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "camera.usb_limit"
              },
              "params": {
                "type": "object",
                "properties": {
                  "limit": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  }
                },
                "required": [
                  "limit"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "camera.warm",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "camera.warm"
              },
              "params": {
                "type": "object",
                "properties": {
                  "minutes": {
                    "type": "number",
                    "minimum": -1,
                    "maximum": 240
                  },
                  "cancel": {
                    "type": "boolean"
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "dome.close",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "dome.close"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "dome.connect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "dome.connect"
              },
              "params": {
                "type": "object",
                "properties": {
                  "device_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "dome.devices",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "dome.devices"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "dome.disconnect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "dome.disconnect"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "dome.follow",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "dome.follow"
              },
              "params": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "enabled"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "dome.home",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "dome.home"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "dome.info",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "dome.info"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "dome.open",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "dome.open"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "dome.park",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "dome.park"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "dome.rescan",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "dome.rescan"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "dome.set_park",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "dome.set_park"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "dome.slew",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "dome.slew"
              },
              "params": {
                "type": "object",
                "properties": {
                  "azimuth": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 360
                  }
                },
                "required": [
                  "azimuth"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "dome.stop",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "dome.stop"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "dome.sync",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "dome.sync"
              },
              "params": {
                "type": "object",
                "properties": {
                  "azimuth": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 360
                  }
                },
                "required": [
                  "azimuth"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "equipment.info",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "equipment.info"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "filterwheel.change",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "filterwheel.change"
              },
              "params": {
                "type": "object",
                "properties": {
                  "filter_id": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  }
                },
                "required": [
                  "filter_id"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "filterwheel.connect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "filterwheel.connect"
              },
              "params": {
                "type": "object",
                "properties": {
                  "device_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "filterwheel.devices",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "filterwheel.devices"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "filterwheel.disconnect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "filterwheel.disconnect"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "filterwheel.filter_info",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "filterwheel.filter_info"
              },
              "params": {
                "type": "object",
                "properties": {
                  "filter_id": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  }
                },
                "required": [
                  "filter_id"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "filterwheel.info",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "filterwheel.info"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "filterwheel.rescan",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "filterwheel.rescan"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "flatdevice.brightness",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "flatdevice.brightness"
              },
              "params": {
                "type": "object",
                "properties": {
                  "brightness": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 65535
                  }
                },
                "required": [
                  "brightness"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "flatdevice.connect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "flatdevice.connect"
              },
              "params": {
                "type": "object",
                "properties": {
                  "device_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "flatdevice.cover",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "flatdevice.cover"
              },
              "params": {
                "type": "object",
                "properties": {
                  "closed": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "closed"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "flatdevice.devices",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "flatdevice.devices"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "flatdevice.disconnect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "flatdevice.disconnect"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "flatdevice.info",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "flatdevice.info"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "flatdevice.light",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "flatdevice.light"
              },
              "params": {
                "type": "object",
                "properties": {
                  "on": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "on"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "flatdevice.rescan",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "flatdevice.rescan"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "focuser.autofocus",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "focuser.autofocus"
              },
              "params": {
                "type": "object",
                "properties": {
                  "cancel": {
                    "type": "boolean"
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "focuser.connect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "focuser.connect"
              },
              "params": {
                "type": "object",
                "properties": {
                  "device_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "focuser.devices",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "focuser.devices"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "focuser.disconnect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "focuser.disconnect"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "focuser.info",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "focuser.info"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "focuser.last_autofocus",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "focuser.last_autofocus"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "focuser.move",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "focuser.move"
              },
              "params": {
                "type": "object",
                "properties": {
                  "position": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  }
                },
                "required": [
                  "position"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "focuser.rescan",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "focuser.rescan"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "focuser.stop",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "focuser.stop"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "framing.info",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "framing.info"
              },
              "params": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "framing.set",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "framing.set"
              },
              "params": {
                "type": "object",
                "properties": {
                  "ra_deg": {
                    "type": "number",
                    "minimum": 0,
                    "exclusiveMaximum": 360
                  },
                  "dec_deg": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90
                  },
                  "epoch": {
                    "type": "string",
                    "const": "J2000",
                    "default": "J2000"
                  },
                  "rotation_deg": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 360,
                    "default": 0
                  },
                  "survey_image": {
                    "type": "boolean",
                    "default": true
                  }
                },
                "additionalProperties": false,
                "required": [
                  "ra_deg",
                  "dec_deg"
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "title": "framing.source",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "framing.source"
              },
              "params": {
                "type": "object",
                "properties": {
                  "source": {
                    "type": "string",
                    "enum": [
                      "NASA",
                      "SKYSERVER",
                      "STSCI",
                      "ESO",
                      "HIPS2FITS",
                      "SKYATLAS",
                      "FILE",
                      "CACHE"
                    ]
                  }
                },
                "additionalProperties": false,
                "required": [
                  "source"
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "title": "guidecamera.capture",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "guidecamera.capture"
              },
              "params": {
                "type": "object",
                "properties": {
                  "exposure_ms": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3600000
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "guidecamera.connect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "guidecamera.connect"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "guidecamera.disconnect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "guidecamera.disconnect"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "guidecamera.exposure",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "guidecamera.exposure"
              },
              "params": {
                "type": "object",
                "properties": {
                  "exposure_ms": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3600000
                  }
                },
                "required": [
                  "exposure_ms"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "guidecamera.info",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "guidecamera.info"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "guidecamera.loop",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "guidecamera.loop"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "guidecamera.star_image",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "guidecamera.star_image"
              },
              "params": {
                "type": "object",
                "properties": {
                  "size": {
                    "type": "integer",
                    "minimum": 15,
                    "maximum": 512
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "guidecamera.stop",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "guidecamera.stop"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "guider.clear_calibration",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "guider.clear_calibration"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "guider.connect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "guider.connect"
              },
              "params": {
                "type": "object",
                "properties": {
                  "device_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "guider.devices",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "guider.devices"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "guider.disconnect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "guider.disconnect"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "guider.graph",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "guider.graph"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "guider.info",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "guider.info"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "guider.rescan",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "guider.rescan"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "guider.start",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "guider.start"
              },
              "params": {
                "type": "object",
                "properties": {
                  "calibrate": {
                    "type": "boolean"
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "guider.stop",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "guider.stop"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "image.history",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "image.history"
              },
              "params": {
                "type": "object",
                "properties": {
                  "all": {
                    "type": "boolean"
                  },
                  "index": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  },
                  "count": {
                    "type": "boolean"
                  },
                  "imageType": {
                    "type": "string",
                    "enum": [
                      "LIGHT",
                      "DARK",
                      "FLAT",
                      "BIAS",
                      "SNAPSHOT"
                    ]
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "image.preview",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "image.preview"
              },
              "params": {
                "type": "object",
                "properties": {
                  "index": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  },
                  "quality": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 95
                  },
                  "autoPrepare": {
                    "type": "boolean"
                  },
                  "factor": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "blackClipping": {
                    "type": "number",
                    "minimum": -100,
                    "maximum": 100
                  },
                  "unlinked": {
                    "type": "boolean"
                  },
                  "debayer": {
                    "type": "boolean"
                  },
                  "bayerPattern": {
                    "type": "string",
                    "enum": [
                      "Monochrome",
                      "Color",
                      "RGGB",
                      "CMYG",
                      "CMYG2",
                      "LRGB",
                      "BGGR",
                      "GBRG",
                      "GRBG",
                      "GRGB",
                      "GBGR",
                      "RGBG",
                      "BGRG"
                    ]
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "image.solve",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "image.solve"
              },
              "params": {
                "type": "object",
                "properties": {
                  "index": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  },
                  "imageType": {
                    "type": "string",
                    "enum": [
                      "LIGHT",
                      "DARK",
                      "FLAT",
                      "BIAS",
                      "SNAPSHOT"
                    ]
                  }
                },
                "required": [
                  "index"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "image.solve_prepared",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "image.solve_prepared"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "imaging.capture_solve",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "imaging.capture_solve"
              },
              "params": {
                "type": "object",
                "properties": {
                  "duration_s": {
                    "type": "number",
                    "minimum": 0.001,
                    "maximum": 120
                  },
                  "gain": {
                    "type": "integer",
                    "minimum": -1,
                    "maximum": 2147483647
                  },
                  "save": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "duration_s"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "mount.capabilities",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "mount.capabilities"
              },
              "params": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "mount.connect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "mount.connect"
              },
              "params": {
                "type": "object",
                "properties": {
                  "device_id": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "mount.devices",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "mount.devices"
              },
              "params": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "mount.disconnect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "mount.disconnect"
              },
              "params": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "mount.flip",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "mount.flip"
              },
              "params": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "mount.goto",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "mount.goto"
              },
              "params": {
                "type": "object",
                "properties": {
                  "ra_deg": {
                    "type": "number",
                    "minimum": 0,
                    "exclusiveMaximum": 360
                  },
                  "dec_deg": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90
                  },
                  "epoch": {
                    "type": "string",
                    "const": "J2000",
                    "default": "J2000"
                  },
                  "tracking": {
                    "type": "string",
                    "enum": [
                      "sidereal",
                      "lunar",
                      "solar",
                      "king"
                    ],
                    "default": "sidereal"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "ra_deg",
                  "dec_deg"
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "title": "mount.home",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "mount.home"
              },
              "params": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "mount.info",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "mount.info"
              },
              "params": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "mount.jog",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "mount.jog"
              },
              "params": {
                "type": "object",
                "properties": {
                  "direction": {
                    "type": "string",
                    "enum": [
                      "north",
                      "south",
                      "east",
                      "west"
                    ]
                  },
                  "rate_deg_s": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 10
                  },
                  "duration_ms": {
                    "type": "number",
                    "minimum": 100,
                    "maximum": 1500,
                    "default": 500
                  }
                },
                "additionalProperties": false,
                "required": [
                  "direction",
                  "rate_deg_s"
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "title": "mount.park",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "mount.park"
              },
              "params": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "mount.rescan",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "mount.rescan"
              },
              "params": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "mount.set_park",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "mount.set_park"
              },
              "params": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "mount.stop",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "mount.stop"
              },
              "params": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "mount.sync",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "mount.sync"
              },
              "params": {
                "type": "object",
                "properties": {
                  "ra_deg": {
                    "type": "number",
                    "minimum": 0,
                    "exclusiveMaximum": 360
                  },
                  "dec_deg": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90
                  },
                  "epoch": {
                    "type": "string",
                    "const": "J2000",
                    "default": "J2000"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "ra_deg",
                  "dec_deg"
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "title": "mount.tracking",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "mount.tracking"
              },
              "params": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "sidereal",
                      "lunar",
                      "solar",
                      "king",
                      "stopped"
                    ]
                  }
                },
                "additionalProperties": false,
                "required": [
                  "mode"
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "title": "mount.unpark",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "mount.unpark"
              },
              "params": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "rotator.connect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "rotator.connect"
              },
              "params": {
                "type": "object",
                "properties": {
                  "device_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "rotator.devices",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "rotator.devices"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "rotator.disconnect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "rotator.disconnect"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "rotator.info",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "rotator.info"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "rotator.mechanical",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "rotator.mechanical"
              },
              "params": {
                "type": "object",
                "properties": {
                  "position": {
                    "type": "number",
                    "minimum": -360,
                    "maximum": 360
                  }
                },
                "required": [
                  "position"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "rotator.move",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "rotator.move"
              },
              "params": {
                "type": "object",
                "properties": {
                  "position": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 360
                  }
                },
                "required": [
                  "position"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "rotator.range",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "rotator.range"
              },
              "params": {
                "type": "object",
                "properties": {
                  "range": {
                    "type": "string",
                    "enum": [
                      "full",
                      "half",
                      "quarter"
                    ]
                  },
                  "rangeStartPosition": {
                    "type": "number",
                    "minimum": -360,
                    "maximum": 360
                  }
                },
                "required": [
                  "range"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "rotator.rescan",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "rotator.rescan"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "rotator.reverse",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "rotator.reverse"
              },
              "params": {
                "type": "object",
                "properties": {
                  "reverseDirection": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "reverseDirection"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "rotator.stop",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "rotator.stop"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "safetymonitor.connect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "safetymonitor.connect"
              },
              "params": {
                "type": "object",
                "properties": {
                  "device_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "safetymonitor.devices",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "safetymonitor.devices"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "safetymonitor.disconnect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "safetymonitor.disconnect"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "safetymonitor.info",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "safetymonitor.info"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "safetymonitor.rescan",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "safetymonitor.rescan"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "sequence.available",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "sequence.available"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "sequence.create",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "sequence.create"
              },
              "params": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "document": {
                    "type": "object",
                    "description": "Native NINA saved advanced-sequence JSON; not /sequence/json or /sequence/state output"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "sequence.current",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "sequence.current"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "sequence.delete",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "sequence.delete"
              },
              "params": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{32}$"
                  },
                  "revision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647
                  }
                },
                "required": [
                  "id",
                  "revision"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "sequence.edit_live",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "sequence.edit_live"
              },
              "params": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string",
                    "maxLength": 500,
                    "pattern": "^(Start|Imaging|End|GlobalTriggers)-[A-Za-z0-9_-]+$"
                  },
                  "value": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1000
                  }
                },
                "required": [
                  "path",
                  "value"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "sequence.generate",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "sequence.generate"
              },
              "params": {
                "type": "object",
                "properties": {
                  "plan": {
                    "type": "object"
                  }
                },
                "required": [
                  "plan"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "sequence.get",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "sequence.get"
              },
              "params": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{32}$"
                  }
                },
                "required": [
                  "id"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "sequence.list",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "sequence.list"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "sequence.load",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "sequence.load"
              },
              "params": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{32}$"
                  },
                  "revision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647
                  }
                },
                "required": [
                  "id",
                  "revision"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "sequence.load_file",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "sequence.load_file"
              },
              "params": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "sequence.reset",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "sequence.reset"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "sequence.set_target",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "sequence.set_target"
              },
              "params": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "ra_deg": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 360,
                    "exclusiveMaximum": 360
                  },
                  "dec_deg": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90
                  },
                  "rotation_deg": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 360
                  },
                  "index": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2147483647
                  }
                },
                "required": [
                  "name",
                  "ra_deg",
                  "dec_deg",
                  "rotation_deg",
                  "index"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "sequence.skip",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "sequence.skip"
              },
              "params": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "CurrentItems",
                      "ToEnd",
                      "ToImaging"
                    ]
                  }
                },
                "required": [
                  "type"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "sequence.start",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "sequence.start"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "sequence.state",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "sequence.state"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "sequence.stop",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "sequence.stop"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "sequence.update",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "sequence.update"
              },
              "params": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{32}$"
                  },
                  "revision": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 2147483647
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "document": {
                    "type": "object",
                    "description": "Native NINA saved advanced-sequence JSON; not /sequence/json or /sequence/state output"
                  }
                },
                "required": [
                  "id",
                  "revision"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "switch.connect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "switch.connect"
              },
              "params": {
                "type": "object",
                "properties": {
                  "device_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "switch.devices",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "switch.devices"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "switch.disconnect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "switch.disconnect"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "switch.info",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "switch.info"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "switch.rescan",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "switch.rescan"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "switch.set",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "switch.set"
              },
              "params": {
                "type": "object",
                "properties": {
                  "index": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 32767
                  },
                  "value": {
                    "type": "number",
                    "minimum": -1000000000.0,
                    "maximum": 1000000000.0
                  }
                },
                "required": [
                  "index",
                  "value"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "target.search",
            "type": "object",
            "required": [
              "action",
              "params"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "target.search"
              },
              "params": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100,
                    "default": 20
                  }
                },
                "additionalProperties": false,
                "required": [
                  "query"
                ]
              }
            },
            "additionalProperties": false
          },
          {
            "title": "weather.connect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "weather.connect"
              },
              "params": {
                "type": "object",
                "properties": {
                  "device_id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "weather.devices",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "weather.devices"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "weather.disconnect",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "weather.disconnect"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "weather.info",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "weather.info"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          {
            "title": "weather.rescan",
            "type": "object",
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "const": "weather.rescan"
              },
              "params": {
                "type": "object",
                "properties": {},
                "required": [],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          }
        ]
      },
      "Command": {
        "type": "object",
        "required": [
          "id",
          "action",
          "params",
          "state",
          "created",
          "expires",
          "updated"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "action": {
            "type": "string",
            "enum": [
              "application.imaging",
              "application.logs",
              "application.plugins",
              "application.screenshot",
              "camera.abort",
              "camera.binning",
              "camera.capture",
              "camera.connect",
              "camera.cool",
              "camera.devices",
              "camera.dew_heater",
              "camera.disconnect",
              "camera.info",
              "camera.readout",
              "camera.readout_image",
              "camera.readout_snapshot",
              "camera.rescan",
              "camera.statistics",
              "camera.usb_limit",
              "camera.warm",
              "dome.close",
              "dome.connect",
              "dome.devices",
              "dome.disconnect",
              "dome.follow",
              "dome.home",
              "dome.info",
              "dome.open",
              "dome.park",
              "dome.rescan",
              "dome.set_park",
              "dome.slew",
              "dome.stop",
              "dome.sync",
              "equipment.info",
              "filterwheel.change",
              "filterwheel.connect",
              "filterwheel.devices",
              "filterwheel.disconnect",
              "filterwheel.filter_info",
              "filterwheel.info",
              "filterwheel.rescan",
              "flatdevice.brightness",
              "flatdevice.connect",
              "flatdevice.cover",
              "flatdevice.devices",
              "flatdevice.disconnect",
              "flatdevice.info",
              "flatdevice.light",
              "flatdevice.rescan",
              "focuser.autofocus",
              "focuser.connect",
              "focuser.devices",
              "focuser.disconnect",
              "focuser.info",
              "focuser.last_autofocus",
              "focuser.move",
              "focuser.rescan",
              "focuser.stop",
              "framing.info",
              "framing.set",
              "framing.source",
              "guidecamera.capture",
              "guidecamera.connect",
              "guidecamera.disconnect",
              "guidecamera.exposure",
              "guidecamera.info",
              "guidecamera.loop",
              "guidecamera.star_image",
              "guidecamera.stop",
              "guider.clear_calibration",
              "guider.connect",
              "guider.devices",
              "guider.disconnect",
              "guider.graph",
              "guider.info",
              "guider.rescan",
              "guider.start",
              "guider.stop",
              "image.history",
              "image.preview",
              "image.solve",
              "image.solve_prepared",
              "imaging.capture_solve",
              "mount.capabilities",
              "mount.connect",
              "mount.devices",
              "mount.disconnect",
              "mount.flip",
              "mount.goto",
              "mount.home",
              "mount.info",
              "mount.jog",
              "mount.park",
              "mount.rescan",
              "mount.set_park",
              "mount.stop",
              "mount.sync",
              "mount.tracking",
              "mount.unpark",
              "rotator.connect",
              "rotator.devices",
              "rotator.disconnect",
              "rotator.info",
              "rotator.mechanical",
              "rotator.move",
              "rotator.range",
              "rotator.rescan",
              "rotator.reverse",
              "rotator.stop",
              "safetymonitor.connect",
              "safetymonitor.devices",
              "safetymonitor.disconnect",
              "safetymonitor.info",
              "safetymonitor.rescan",
              "sequence.available",
              "sequence.create",
              "sequence.current",
              "sequence.delete",
              "sequence.edit_live",
              "sequence.generate",
              "sequence.get",
              "sequence.list",
              "sequence.load",
              "sequence.load_file",
              "sequence.reset",
              "sequence.set_target",
              "sequence.skip",
              "sequence.start",
              "sequence.state",
              "sequence.stop",
              "sequence.update",
              "switch.connect",
              "switch.devices",
              "switch.disconnect",
              "switch.info",
              "switch.rescan",
              "switch.set",
              "target.search",
              "weather.connect",
              "weather.devices",
              "weather.disconnect",
              "weather.info",
              "weather.rescan"
            ]
          },
          "params": {
            "type": "object"
          },
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "dispatched",
              "running",
              "succeeded",
              "failed",
              "expired",
              "unknown"
            ]
          },
          "created": {
            "type": "number",
            "description": "Unix seconds"
          },
          "expires": {
            "type": "number",
            "description": "Unix seconds"
          },
          "updated": {
            "type": "number",
            "description": "Unix seconds"
          },
          "result": {},
          "error": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ErrorDetail"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "ErrorDetail": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          }
        },
        "required": [
          "code",
          "message"
        ]
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorDetail"
          }
        }
      },
      "Target": {
        "type": "object",
        "required": [
          "id",
          "name",
          "ra_deg",
          "dec_deg",
          "epoch",
          "source"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "ra_deg": {
            "type": "number",
            "minimum": 0,
            "exclusiveMaximum": 360
          },
          "dec_deg": {
            "type": "number",
            "minimum": -90,
            "maximum": 90
          },
          "epoch": {
            "type": "string",
            "const": "J2000",
            "default": "J2000"
          },
          "aliases": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "source": {
            "type": "string"
          },
          "type": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    }
  }
}