{
  "components": {
    "schemas": {
      "APIError": {
        "properties": {
          "detail": {
            "type": "string"
          }
        },
        "required": [
          "detail"
        ],
        "type": "object"
      },
      "AdminDeviceCreatedResponse": {
        "properties": {
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "status"
        ],
        "title": "AdminDeviceCreatedResponse",
        "type": "object"
      },
      "AdminDeviceResponse": {
        "properties": {
          "device_type": {
            "title": "Device Type",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "ip_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip Address"
          },
          "last_seen": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Seen"
          },
          "mac_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mac Address"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "revision": {
            "title": "Revision",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "revision",
          "id",
          "name",
          "ip_address",
          "mac_address",
          "device_type",
          "status",
          "last_seen"
        ],
        "title": "AdminDeviceResponse",
        "type": "object"
      },
      "AdminGatewayCatalogResponse": {
        "properties": {
          "activation_mode": {
            "enum": [
              "sms",
              "wifi"
            ],
            "title": "Activation Mode",
            "type": "string"
          },
          "availability": {
            "enum": [
              "available",
              "busy",
              "cleanup_pending",
              "unconfigured"
            ],
            "title": "Availability",
            "type": "string"
          },
          "can_start": {
            "title": "Can Start",
            "type": "boolean"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "group_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Id"
          },
          "iccid": {
            "anyOf": [
              {
                "pattern": "^[0-9]{18,22}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Iccid"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "imei": {
            "anyOf": [
              {
                "pattern": "^[0-9]{15}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Imei"
          },
          "last_seen": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Seen"
          },
          "mac_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mac Address"
          },
          "phone_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Number"
          },
          "revision": {
            "default": "",
            "title": "Revision",
            "type": "string"
          },
          "serial_number": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Serial Number"
          },
          "start_block_reason": {
            "anyOf": [
              {
                "enum": [
                  "permission_required",
                  "personal_profile_required",
                  "gateway_unconfigured",
                  "gateway_busy",
                  "gateway_cleanup_pending",
                  "technician_busy",
                  "technician_cleanup_pending"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Block Reason"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "vpn_ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vpn Ip"
          }
        },
        "required": [
          "availability",
          "can_start",
          "start_block_reason",
          "id",
          "mac_address",
          "phone_number",
          "activation_mode",
          "status",
          "vpn_ip",
          "last_seen",
          "created_at"
        ],
        "title": "AdminGatewayCatalogResponse",
        "type": "object"
      },
      "AdminGatewayDetailResponse": {
        "properties": {
          "activation_mode": {
            "enum": [
              "sms",
              "wifi"
            ],
            "title": "Activation Mode",
            "type": "string"
          },
          "availability": {
            "enum": [
              "available",
              "busy",
              "cleanup_pending",
              "unconfigured"
            ],
            "title": "Availability",
            "type": "string"
          },
          "can_start": {
            "title": "Can Start",
            "type": "boolean"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "group_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Id"
          },
          "iccid": {
            "anyOf": [
              {
                "pattern": "^[0-9]{18,22}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Iccid"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "imei": {
            "anyOf": [
              {
                "pattern": "^[0-9]{15}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Imei"
          },
          "last_seen": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Seen"
          },
          "mac_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mac Address"
          },
          "metadata": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Metadata"
          },
          "phone_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Number"
          },
          "revision": {
            "default": "",
            "title": "Revision",
            "type": "string"
          },
          "serial_number": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Serial Number"
          },
          "start_block_reason": {
            "anyOf": [
              {
                "enum": [
                  "permission_required",
                  "personal_profile_required",
                  "gateway_unconfigured",
                  "gateway_busy",
                  "gateway_cleanup_pending",
                  "technician_busy",
                  "technician_cleanup_pending"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Block Reason"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "vpn_ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vpn Ip"
          }
        },
        "required": [
          "availability",
          "can_start",
          "start_block_reason",
          "id",
          "mac_address",
          "phone_number",
          "activation_mode",
          "status",
          "vpn_ip",
          "last_seen",
          "created_at",
          "metadata"
        ],
        "title": "AdminGatewayDetailResponse",
        "type": "object"
      },
      "AdminGatewaySummaryResponse": {
        "properties": {
          "activation_mode": {
            "enum": [
              "sms",
              "wifi"
            ],
            "title": "Activation Mode",
            "type": "string"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "group_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Id"
          },
          "iccid": {
            "anyOf": [
              {
                "pattern": "^[0-9]{18,22}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Iccid"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "imei": {
            "anyOf": [
              {
                "pattern": "^[0-9]{15}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Imei"
          },
          "last_seen": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Seen"
          },
          "mac_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mac Address"
          },
          "phone_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Number"
          },
          "revision": {
            "default": "",
            "title": "Revision",
            "type": "string"
          },
          "serial_number": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Serial Number"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "vpn_ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vpn Ip"
          }
        },
        "required": [
          "id",
          "mac_address",
          "phone_number",
          "activation_mode",
          "status",
          "vpn_ip",
          "last_seen",
          "created_at"
        ],
        "title": "AdminGatewaySummaryResponse",
        "type": "object"
      },
      "AdminSessionCloseResponse": {
        "properties": {
          "ended_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "status": {
            "enum": [
              "REQUESTED",
              "ACTIVE",
              "CLOSED",
              "EXPIRED",
              "FAILED"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "ended_at"
        ],
        "title": "AdminSessionCloseResponse",
        "type": "object"
      },
      "AdminSessionListResponse": {
        "properties": {
          "activation_mode": {
            "enum": [
              "sms",
              "wifi"
            ],
            "title": "Activation Mode",
            "type": "string"
          },
          "activation_received_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activation Received At"
          },
          "cleaned_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cleaned At"
          },
          "cleanup_pending": {
            "title": "Cleanup Pending",
            "type": "boolean"
          },
          "diagnostics": {
            "$ref": "#/components/schemas/DiagnosticsResponse"
          },
          "ended_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "gateway_display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Display Name"
          },
          "gateway_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Id"
          },
          "gateway_mac_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Mac Address"
          },
          "gateway_ready_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Ready At"
          },
          "gateway_vpn_ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Vpn Ip"
          },
          "group_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Id"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "observation_valid_until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Observation Valid Until"
          },
          "requested_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requested At"
          },
          "status": {
            "enum": [
              "REQUESTED",
              "ACTIVE",
              "CLOSED",
              "EXPIRED",
              "FAILED"
            ],
            "title": "Status",
            "type": "string"
          },
          "support_started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Support Started At"
          },
          "technician_full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Technician Full Name"
          },
          "technician_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Technician Id"
          },
          "technician_manageable": {
            "title": "Technician Manageable",
            "type": "boolean"
          },
          "technician_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Technician Username"
          },
          "technician_vpn_ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Technician Vpn Ip"
          }
        },
        "required": [
          "id",
          "technician_id",
          "gateway_id",
          "status",
          "activation_mode",
          "activation_received_at",
          "gateway_ready_at",
          "requested_at",
          "support_started_at",
          "ended_at",
          "expires_at",
          "cleaned_at",
          "cleanup_pending",
          "gateway_display_name",
          "gateway_mac_address",
          "technician_username",
          "technician_full_name",
          "technician_manageable",
          "technician_vpn_ip",
          "gateway_vpn_ip",
          "observation_valid_until",
          "diagnostics"
        ],
        "title": "AdminSessionListResponse",
        "type": "object"
      },
      "AdminSessionResponse": {
        "properties": {
          "activation_mode": {
            "enum": [
              "sms",
              "wifi"
            ],
            "title": "Activation Mode",
            "type": "string"
          },
          "activation_received_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activation Received At"
          },
          "cleaned_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cleaned At"
          },
          "ended_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At"
          },
          "error_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Reason"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "gateway_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Id"
          },
          "gateway_ready_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Ready At"
          },
          "group_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Id"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "requested_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requested At"
          },
          "result": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result"
          },
          "status": {
            "enum": [
              "REQUESTED",
              "ACTIVE",
              "CLOSED",
              "EXPIRED",
              "FAILED"
            ],
            "title": "Status",
            "type": "string"
          },
          "support_started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Support Started At"
          },
          "technician_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Technician Id"
          }
        },
        "required": [
          "id",
          "technician_id",
          "gateway_id",
          "status",
          "activation_mode",
          "activation_received_at",
          "gateway_ready_at",
          "requested_at",
          "support_started_at",
          "ended_at",
          "expires_at",
          "cleaned_at",
          "result",
          "error_reason"
        ],
        "title": "AdminSessionResponse",
        "type": "object"
      },
      "AuditLogResponse": {
        "properties": {
          "details": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Details"
          },
          "event_type": {
            "title": "Event Type",
            "type": "string"
          },
          "gateway_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Id"
          },
          "group_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Id"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "ip_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip Address"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "timestamp": {
            "format": "date-time",
            "title": "Timestamp",
            "type": "string"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id"
          }
        },
        "required": [
          "id",
          "event_type",
          "group_id",
          "timestamp",
          "user_id",
          "session_id",
          "gateway_id",
          "ip_address",
          "details"
        ],
        "title": "AuditLogResponse",
        "type": "object"
      },
      "AuthenticationModeRequest": {
        "additionalProperties": false,
        "properties": {
          "auth_mode": {
            "enum": [
              "local",
              "sso"
            ],
            "title": "Auth Mode",
            "type": "string"
          },
          "password": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 8,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Password"
          }
        },
        "required": [
          "auth_mode"
        ],
        "title": "AuthenticationModeRequest",
        "type": "object"
      },
      "AuthorityStatus": {
        "properties": {
          "can_issue_clients": {
            "default": false,
            "title": "Can Issue Clients",
            "type": "boolean"
          },
          "crl_next_update": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Crl Next Update"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "issuance_deadline": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Issuance Deadline"
          },
          "renewal_due": {
            "default": false,
            "title": "Renewal Due",
            "type": "boolean"
          },
          "role": {
            "enum": [
              "root",
              "issuing",
              "retiring"
            ],
            "title": "Role",
            "type": "string"
          }
        },
        "required": [
          "id",
          "role",
          "expires_at",
          "crl_next_update"
        ],
        "title": "AuthorityStatus",
        "type": "object"
      },
      "BackupCommand": {
        "additionalProperties": false,
        "properties": {
          "action": {
            "enum": [
              "verify",
              "restore",
              "delete"
            ],
            "title": "Action",
            "type": "string"
          },
          "confirmation": {
            "default": "",
            "maxLength": 100,
            "title": "Confirmation",
            "type": "string"
          }
        },
        "required": [
          "action"
        ],
        "title": "BackupCommand",
        "type": "object"
      },
      "BackupCopySummary": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "tested_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tested At"
          }
        },
        "required": [
          "id",
          "created_at",
          "tested_at"
        ],
        "title": "BackupCopySummary",
        "type": "object"
      },
      "BackupEntry": {
        "properties": {
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "protected": {
            "title": "Protected",
            "type": "boolean"
          },
          "size": {
            "title": "Size",
            "type": "integer"
          },
          "state": {
            "title": "State",
            "type": "string"
          },
          "tested_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tested At"
          },
          "verified_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verified At"
          }
        },
        "required": [
          "id",
          "created_at",
          "size",
          "state",
          "verified_at",
          "tested_at",
          "protected"
        ],
        "title": "BackupEntry",
        "type": "object"
      },
      "BackupJobResponse": {
        "properties": {
          "backup_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Backup Id"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "phase": {
            "title": "Phase",
            "type": "string"
          },
          "state": {
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "backup_id",
          "state",
          "phase",
          "created_at",
          "finished_at",
          "error"
        ],
        "title": "BackupJobResponse",
        "type": "object"
      },
      "BackupOperationSummary": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "kind": {
            "enum": [
              "create",
              "import",
              "verify",
              "restore",
              "delete"
            ],
            "title": "Kind",
            "type": "string"
          },
          "state": {
            "enum": [
              "queued",
              "uploading",
              "running",
              "succeeded",
              "failed"
            ],
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "kind",
          "state",
          "created_at",
          "finished_at"
        ],
        "title": "BackupOperationSummary",
        "type": "object"
      },
      "BackupReauthentication": {
        "additionalProperties": false,
        "properties": {
          "emergency_code": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Emergency Code"
          },
          "password": {
            "maxLength": 1024,
            "minLength": 1,
            "title": "Password",
            "type": "string"
          }
        },
        "required": [
          "password"
        ],
        "title": "BackupReauthentication",
        "type": "object"
      },
      "BackupRetention": {
        "additionalProperties": false,
        "properties": {
          "count": {
            "maximum": 100.0,
            "minimum": 1.0,
            "title": "Count",
            "type": "integer"
          }
        },
        "required": [
          "count"
        ],
        "title": "BackupRetention",
        "type": "object"
      },
      "BackupStatus": {
        "properties": {
          "backups": {
            "items": {
              "$ref": "#/components/schemas/BackupEntry"
            },
            "title": "Backups",
            "type": "array"
          },
          "coordinator_online": {
            "title": "Coordinator Online",
            "type": "boolean"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "jobs": {
            "items": {
              "$ref": "#/components/schemas/BackupJobResponse"
            },
            "title": "Jobs",
            "type": "array"
          },
          "maximum_bytes": {
            "title": "Maximum Bytes",
            "type": "integer"
          },
          "needs_reauthentication": {
            "title": "Needs Reauthentication",
            "type": "boolean"
          },
          "retention": {
            "title": "Retention",
            "type": "integer"
          },
          "sso_provider_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sso Provider Id"
          }
        },
        "required": [
          "enabled",
          "coordinator_online",
          "needs_reauthentication",
          "sso_provider_id",
          "maximum_bytes",
          "retention",
          "backups",
          "jobs"
        ],
        "title": "BackupStatus",
        "type": "object"
      },
      "BackupSummary": {
        "properties": {
          "active_operation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BackupOperationSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "coordinator_observed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Coordinator Observed At"
          },
          "coordinator_state": {
            "default": "unknown",
            "enum": [
              "online",
              "offline",
              "unknown"
            ],
            "title": "Coordinator State",
            "type": "string"
          },
          "copies": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Copies"
          },
          "last_operation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BackupOperationSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_test": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BackupTestSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "latest_backup": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BackupCopySummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "observed_at": {
            "format": "date-time",
            "title": "Observed At",
            "type": "string"
          },
          "state": {
            "enum": [
              "not_configured",
              "unavailable",
              "available"
            ],
            "title": "State",
            "type": "string"
          },
          "valid_for_seconds": {
            "maximum": 30.0,
            "minimum": 0.0,
            "title": "Valid For Seconds",
            "type": "number"
          }
        },
        "required": [
          "state",
          "observed_at",
          "valid_for_seconds"
        ],
        "title": "BackupSummary",
        "type": "object"
      },
      "BackupTestSummary": {
        "properties": {
          "backup_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Backup Id"
          },
          "finished_at": {
            "format": "date-time",
            "title": "Finished At",
            "type": "string"
          },
          "state": {
            "enum": [
              "succeeded",
              "failed"
            ],
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "backup_id",
          "finished_at",
          "state"
        ],
        "title": "BackupTestSummary",
        "type": "object"
      },
      "CentralComponent": {
        "properties": {
          "build": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Build"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "observed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Observed At"
          },
          "state": {
            "enum": [
              "ok",
              "error",
              "idle",
              "unknown"
            ],
            "title": "State",
            "type": "string"
          },
          "valid_for_seconds": {
            "maximum": 90.0,
            "minimum": 0.0,
            "title": "Valid For Seconds",
            "type": "number"
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          }
        },
        "required": [
          "name",
          "version",
          "observed_at",
          "state",
          "valid_for_seconds"
        ],
        "title": "CentralComponent",
        "type": "object"
      },
      "CertificateResponse": {
        "properties": {
          "crl_applied_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Crl Applied At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "not_after": {
            "format": "date-time",
            "title": "Not After",
            "type": "string"
          },
          "not_before": {
            "format": "date-time",
            "title": "Not Before",
            "type": "string"
          },
          "revoked_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          },
          "serial": {
            "title": "Serial",
            "type": "string"
          },
          "state": {
            "enum": [
              "candidate",
              "active",
              "revoked"
            ],
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "id",
          "serial",
          "not_before",
          "not_after",
          "state",
          "revoked_at",
          "crl_applied_at"
        ],
        "title": "CertificateResponse",
        "type": "object"
      },
      "CertificateStatus": {
        "properties": {
          "days_remaining": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Days Remaining"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "fingerprint_sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fingerprint Sha256"
          },
          "name": {
            "enum": [
              "https",
              "openvpn",
              "openvpn_ca"
            ],
            "title": "Name",
            "type": "string"
          },
          "observed_at": {
            "format": "date-time",
            "title": "Observed At",
            "type": "string"
          },
          "state": {
            "enum": [
              "not_configured",
              "missing",
              "unreadable",
              "valid",
              "expiring",
              "expired",
              "not_yet_valid"
            ],
            "title": "State",
            "type": "string"
          },
          "valid_for_seconds": {
            "maximum": 30.0,
            "minimum": 0.0,
            "title": "Valid For Seconds",
            "type": "number"
          },
          "valid_from": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Valid From"
          }
        },
        "required": [
          "name",
          "state",
          "observed_at",
          "valid_for_seconds"
        ],
        "title": "CertificateStatus",
        "type": "object"
      },
      "Component": {
        "additionalProperties": false,
        "properties": {
          "architecture": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[\\w .()+,:@-]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Architecture"
          },
          "build": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[\\w .()+,:@-]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Build"
          },
          "iccid": {
            "anyOf": [
              {
                "pattern": "^[0-9]{18,22}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Iccid"
          },
          "imei": {
            "anyOf": [
              {
                "pattern": "^[0-9]{15}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Imei"
          },
          "interface": {
            "anyOf": [
              {
                "pattern": "^[a-zA-Z0-9_.-]{1,15}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Interface"
          },
          "kernel": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[\\w .()+,:@-]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kernel"
          },
          "mac_address": {
            "anyOf": [
              {
                "pattern": "^(?:[0-9A-F]{2}:){5}[0-9A-F]{2}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mac Address"
          },
          "manufacturer": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[\\w .()+,:@-]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Manufacturer"
          },
          "model": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[\\w .()+,:@-]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model"
          },
          "origin": {
            "default": "detected",
            "enum": [
              "detected",
              "configured",
              "build"
            ],
            "title": "Origin",
            "type": "string"
          },
          "revision": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[\\w .()+,:@-]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revision"
          },
          "state": {
            "enum": [
              "reported",
              "not_applicable",
              "unsupported",
              "collection_failed"
            ],
            "title": "State",
            "type": "string"
          },
          "version": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[\\w .()+,:@-]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          }
        },
        "required": [
          "state"
        ],
        "title": "Component",
        "type": "object"
      },
      "ComponentView": {
        "additionalProperties": false,
        "properties": {
          "last_success": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Component"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_success_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Success At"
          },
          "latest": {
            "$ref": "#/components/schemas/Component"
          },
          "observed_at": {
            "format": "date-time",
            "title": "Observed At",
            "type": "string"
          }
        },
        "required": [
          "latest",
          "observed_at"
        ],
        "title": "ComponentView",
        "type": "object"
      },
      "CurrentUserResponse": {
        "properties": {
          "auth_mode": {
            "default": "local",
            "enum": [
              "local",
              "sso"
            ],
            "title": "Auth Mode",
            "type": "string"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "email_two_step": {
            "default": false,
            "title": "Email Two Step",
            "type": "boolean"
          },
          "email_two_step_required": {
            "default": false,
            "title": "Email Two Step Required",
            "type": "boolean"
          },
          "email_verified": {
            "default": false,
            "title": "Email Verified",
            "type": "boolean"
          },
          "full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          },
          "group_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Group Ids",
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_admin": {
            "title": "Is Admin",
            "type": "boolean"
          },
          "last_login": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Login"
          },
          "permissions": {
            "items": {
              "type": "string"
            },
            "title": "Permissions",
            "type": "array"
          },
          "revision": {
            "default": "",
            "title": "Revision",
            "type": "string"
          },
          "username": {
            "title": "Username",
            "type": "string"
          }
        },
        "required": [
          "id",
          "username",
          "email",
          "full_name",
          "is_admin",
          "last_login",
          "permissions",
          "group_ids"
        ],
        "title": "CurrentUserResponse",
        "type": "object"
      },
      "DeviceCreateRequest": {
        "additionalProperties": false,
        "properties": {
          "device_type": {
            "default": "OTHER",
            "enum": [
              "PLC",
              "HMI",
              "SERVER",
              "OTHER"
            ],
            "title": "Device Type",
            "type": "string"
          },
          "gateway_id": {
            "format": "uuid",
            "title": "Gateway Id",
            "type": "string"
          },
          "ip_address": {
            "title": "Ip Address",
            "type": "string"
          },
          "mac_address": {
            "pattern": "^[0-9A-Fa-f]{2}([:-][0-9A-Fa-f]{2}){5}$",
            "title": "Mac Address",
            "type": "string"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name",
          "ip_address",
          "mac_address",
          "gateway_id"
        ],
        "title": "DeviceCreateRequest",
        "type": "object"
      },
      "DeviceInput": {
        "additionalProperties": false,
        "properties": {
          "device_type": {
            "default": "OTHER",
            "enum": [
              "PLC",
              "HMI",
              "SERVER",
              "OTHER"
            ],
            "title": "Device Type",
            "type": "string"
          },
          "ip_address": {
            "title": "Ip Address",
            "type": "string"
          },
          "mac_address": {
            "pattern": "^[0-9A-Fa-f]{2}([:-][0-9A-Fa-f]{2}){5}$",
            "title": "Mac Address",
            "type": "string"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name",
          "ip_address",
          "mac_address"
        ],
        "title": "DeviceInput",
        "type": "object"
      },
      "DeviceResponse": {
        "properties": {
          "device_type": {
            "title": "Device Type",
            "type": "string"
          },
          "gateway_id": {
            "format": "uuid",
            "title": "Gateway Id",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "ip_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip Address"
          },
          "last_seen": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Seen"
          },
          "mac_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mac Address"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "revision": {
            "title": "Revision",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "revision",
          "id",
          "gateway_id",
          "name",
          "ip_address",
          "mac_address",
          "device_type",
          "status",
          "last_seen"
        ],
        "title": "DeviceResponse",
        "type": "object"
      },
      "DiagnosticStep": {
        "properties": {
          "action": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Action"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "observed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Observed At"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source"
          },
          "status": {
            "enum": [
              "ok",
              "waiting",
              "error",
              "unknown",
              "not_applicable"
            ],
            "title": "Status",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "status",
          "message"
        ],
        "title": "DiagnosticStep",
        "type": "object"
      },
      "DiagnosticsResponse": {
        "properties": {
          "generated_at": {
            "format": "date-time",
            "title": "Generated At",
            "type": "string"
          },
          "history_complete": {
            "title": "History Complete",
            "type": "boolean"
          },
          "session_id": {
            "format": "uuid",
            "title": "Session Id",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/DiagnosticStep"
            },
            "title": "Steps",
            "type": "array"
          }
        },
        "required": [
          "session_id",
          "status",
          "generated_at",
          "history_complete",
          "steps"
        ],
        "title": "DiagnosticsResponse",
        "type": "object"
      },
      "EmailChallengeResponse": {
        "properties": {
          "challenge_required": {
            "const": true,
            "default": true,
            "title": "Challenge Required"
          },
          "challenge_token": {
            "title": "Challenge Token",
            "type": "string"
          },
          "destination": {
            "title": "Destination",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "resend_after": {
            "default": 60,
            "title": "Resend After",
            "type": "integer"
          }
        },
        "required": [
          "challenge_token",
          "destination",
          "expires_at"
        ],
        "title": "EmailChallengeResponse",
        "type": "object"
      },
      "EmailComplete": {
        "additionalProperties": false,
        "properties": {
          "completed": {
            "const": true,
            "title": "Completed"
          }
        },
        "required": [
          "completed"
        ],
        "title": "EmailComplete",
        "type": "object"
      },
      "EmailProof": {
        "additionalProperties": false,
        "properties": {
          "challenge_token": {
            "maxLength": 128,
            "minLength": 32,
            "title": "Challenge Token",
            "type": "string"
          },
          "code": {
            "pattern": "^[0-9]{6}$",
            "title": "Code",
            "type": "string"
          }
        },
        "required": [
          "challenge_token",
          "code"
        ],
        "title": "EmailProof",
        "type": "object"
      },
      "EmailRecovery": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "maxLength": 255,
            "title": "Email",
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "title": "EmailRecovery",
        "type": "object"
      },
      "EmailResend": {
        "additionalProperties": false,
        "properties": {
          "challenge_token": {
            "maxLength": 128,
            "minLength": 32,
            "title": "Challenge Token",
            "type": "string"
          }
        },
        "required": [
          "challenge_token"
        ],
        "title": "EmailResend",
        "type": "object"
      },
      "EmailStart": {
        "additionalProperties": false,
        "properties": {
          "action": {
            "enum": [
              "enable",
              "disable",
              "change"
            ],
            "title": "Action",
            "type": "string"
          },
          "email": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "password": {
            "maxLength": 128,
            "minLength": 1,
            "title": "Password",
            "type": "string"
          }
        },
        "required": [
          "action",
          "password"
        ],
        "title": "EmailStart",
        "type": "object"
      },
      "EmailStatus": {
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "required": {
            "title": "Required",
            "type": "boolean"
          },
          "smtp_configured": {
            "title": "Smtp Configured",
            "type": "boolean"
          },
          "verified": {
            "title": "Verified",
            "type": "boolean"
          }
        },
        "required": [
          "enabled",
          "required",
          "verified",
          "email",
          "smtp_configured"
        ],
        "title": "EmailStatus",
        "type": "object"
      },
      "EnrollmentApproval": {
        "additionalProperties": false,
        "properties": {
          "group_id": {
            "format": "uuid",
            "title": "Group Id",
            "type": "string"
          }
        },
        "required": [
          "group_id"
        ],
        "title": "EnrollmentApproval",
        "type": "object"
      },
      "EnrollmentBlock": {
        "additionalProperties": false,
        "properties": {
          "reason": {
            "maxLength": 500,
            "minLength": 1,
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "title": "EnrollmentBlock",
        "type": "object"
      },
      "EnrollmentJob": {
        "properties": {
          "can_download": {
            "title": "Can Download",
            "type": "boolean"
          },
          "configuration_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Configuration Version"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "state": {
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "id",
          "state",
          "expires_at",
          "configuration_version",
          "can_download",
          "error_code"
        ],
        "title": "EnrollmentJob",
        "type": "object"
      },
      "EnrollmentManualRequest": {
        "additionalProperties": false,
        "properties": {
          "expected_certificate_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Certificate Id"
          },
          "group_id": {
            "format": "uuid",
            "title": "Group Id",
            "type": "string"
          }
        },
        "required": [
          "group_id"
        ],
        "title": "EnrollmentManualRequest",
        "type": "object"
      },
      "EnrollmentResponse": {
        "additionalProperties": false,
        "properties": {
          "activation_mode": {
            "anyOf": [
              {
                "enum": [
                  "sms",
                  "wifi"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activation Mode"
          },
          "approved_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approved At"
          },
          "blocked_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Blocked Reason"
          },
          "can_resume": {
            "title": "Can Resume",
            "type": "boolean"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "configuration_version": {
            "title": "Configuration Version",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "delivery_mode": {
            "enum": [
              "automatic",
              "manual"
            ],
            "title": "Delivery Mode",
            "type": "string"
          },
          "display_name": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "external_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Reference"
          },
          "gateway_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Id"
          },
          "group_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Id"
          },
          "iccid": {
            "anyOf": [
              {
                "pattern": "^[0-9]{18,22}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Iccid"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "imei": {
            "anyOf": [
              {
                "pattern": "^[0-9]{15}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Imei"
          },
          "job": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EnrollmentJob"
              },
              {
                "type": "null"
              }
            ]
          },
          "mac_address": {
            "anyOf": [
              {
                "pattern": "^[0-9A-Fa-f]{2}([:-][0-9A-Fa-f]{2}){5}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mac Address"
          },
          "missing_fields": {
            "items": {
              "type": "string"
            },
            "title": "Missing Fields",
            "type": "array"
          },
          "phone_number": {
            "anyOf": [
              {
                "pattern": "^\\+[1-9]\\d{9,14}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Number"
          },
          "revision": {
            "title": "Revision",
            "type": "string"
          },
          "serial_number": {
            "title": "Serial Number",
            "type": "string"
          },
          "state": {
            "enum": [
              "prepared",
              "awaiting_approval",
              "awaiting_data",
              "approved",
              "preparing",
              "ready",
              "completed",
              "blocked",
              "manual"
            ],
            "title": "State",
            "type": "string"
          },
          "vpn_ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vpn Ip"
          }
        },
        "required": [
          "id",
          "gateway_id",
          "vpn_ip",
          "serial_number",
          "external_reference",
          "group_id",
          "state",
          "delivery_mode",
          "configuration_version",
          "revision",
          "created_at",
          "approved_at",
          "completed_at",
          "blocked_reason",
          "can_resume",
          "missing_fields",
          "job"
        ],
        "title": "EnrollmentResponse",
        "type": "object"
      },
      "EnrollmentUpdateRequest": {
        "additionalProperties": false,
        "properties": {
          "activation_mode": {
            "anyOf": [
              {
                "enum": [
                  "sms",
                  "wifi"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activation Mode"
          },
          "display_name": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "external_reference": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "External Reference"
          },
          "iccid": {
            "anyOf": [
              {
                "pattern": "^[0-9]{18,22}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Iccid"
          },
          "imei": {
            "anyOf": [
              {
                "pattern": "^[0-9]{15}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Imei"
          },
          "mac_address": {
            "anyOf": [
              {
                "pattern": "^[0-9A-Fa-f]{2}([:-][0-9A-Fa-f]{2}){5}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mac Address"
          },
          "phone_number": {
            "anyOf": [
              {
                "pattern": "^\\+[1-9]\\d{9,14}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Number"
          },
          "serial_number": {
            "anyOf": [
              {
                "maxLength": 100,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Serial Number"
          }
        },
        "title": "EnrollmentUpdateRequest",
        "type": "object"
      },
      "ExpirationResponse": {
        "properties": {
          "expired": {
            "title": "Expired",
            "type": "integer"
          }
        },
        "required": [
          "expired"
        ],
        "title": "ExpirationResponse",
        "type": "object"
      },
      "GatewayCatalogResponse": {
        "properties": {
          "activation_mode": {
            "enum": [
              "sms",
              "wifi"
            ],
            "title": "Activation Mode",
            "type": "string"
          },
          "availability": {
            "enum": [
              "available",
              "busy",
              "cleanup_pending",
              "unconfigured"
            ],
            "title": "Availability",
            "type": "string"
          },
          "can_start": {
            "title": "Can Start",
            "type": "boolean"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "group_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Id"
          },
          "iccid": {
            "anyOf": [
              {
                "pattern": "^[0-9]{18,22}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Iccid"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "imei": {
            "anyOf": [
              {
                "pattern": "^[0-9]{15}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Imei"
          },
          "last_seen": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Seen"
          },
          "mac_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mac Address"
          },
          "phone_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Number"
          },
          "serial_number": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Serial Number"
          },
          "start_block_reason": {
            "anyOf": [
              {
                "enum": [
                  "permission_required",
                  "personal_profile_required",
                  "gateway_unconfigured",
                  "gateway_busy",
                  "gateway_cleanup_pending",
                  "technician_busy",
                  "technician_cleanup_pending"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Block Reason"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "vpn_ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vpn Ip"
          }
        },
        "required": [
          "availability",
          "can_start",
          "start_block_reason",
          "id",
          "phone_number",
          "activation_mode",
          "mac_address",
          "status",
          "vpn_ip",
          "last_seen"
        ],
        "title": "GatewayCatalogResponse",
        "type": "object"
      },
      "GatewayCurrentSession": {
        "properties": {
          "activation_mode": {
            "enum": [
              "sms",
              "wifi"
            ],
            "title": "Activation Mode",
            "type": "string"
          },
          "activation_received_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activation Received At"
          },
          "cleanup_pending": {
            "title": "Cleanup Pending",
            "type": "boolean"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "status": {
            "enum": [
              "REQUESTED",
              "ACTIVE",
              "CLOSED",
              "EXPIRED",
              "FAILED"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "activation_mode",
          "activation_received_at",
          "expires_at",
          "cleanup_pending"
        ],
        "title": "GatewayCurrentSession",
        "type": "object"
      },
      "GatewayDetailResponse": {
        "properties": {
          "activation_mode": {
            "enum": [
              "sms",
              "wifi"
            ],
            "title": "Activation Mode",
            "type": "string"
          },
          "availability": {
            "enum": [
              "available",
              "busy",
              "cleanup_pending",
              "unconfigured"
            ],
            "title": "Availability",
            "type": "string"
          },
          "can_start": {
            "title": "Can Start",
            "type": "boolean"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "current_session": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GatewayCurrentSession"
              },
              {
                "type": "null"
              }
            ]
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "group_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Id"
          },
          "iccid": {
            "anyOf": [
              {
                "pattern": "^[0-9]{18,22}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Iccid"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "imei": {
            "anyOf": [
              {
                "pattern": "^[0-9]{15}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Imei"
          },
          "last_seen": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Seen"
          },
          "mac_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mac Address"
          },
          "phone_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Number"
          },
          "revision": {
            "title": "Revision",
            "type": "string"
          },
          "serial_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Serial Number"
          },
          "start_block_reason": {
            "anyOf": [
              {
                "enum": [
                  "permission_required",
                  "personal_profile_required",
                  "gateway_unconfigured",
                  "gateway_busy",
                  "gateway_cleanup_pending",
                  "technician_busy",
                  "technician_cleanup_pending"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Block Reason"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "vpn_ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vpn Ip"
          }
        },
        "required": [
          "availability",
          "can_start",
          "start_block_reason",
          "serial_number",
          "id",
          "phone_number",
          "activation_mode",
          "mac_address",
          "status",
          "vpn_ip",
          "last_seen",
          "revision",
          "created_at",
          "current_session"
        ],
        "title": "GatewayDetailResponse",
        "type": "object"
      },
      "GatewayGroupRequest": {
        "additionalProperties": false,
        "properties": {
          "group_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Id"
          }
        },
        "required": [
          "group_id"
        ],
        "title": "GatewayGroupRequest",
        "type": "object"
      },
      "GatewayProvisionRequest": {
        "additionalProperties": false,
        "properties": {
          "activation_mode": {
            "default": "sms",
            "enum": [
              "sms",
              "wifi"
            ],
            "title": "Activation Mode",
            "type": "string"
          },
          "display_name": {
            "maxLength": 100,
            "minLength": 1,
            "pattern": ".*\\S.*",
            "title": "Display Name",
            "type": "string"
          },
          "gateway_id": {
            "format": "uuid",
            "title": "Gateway Id",
            "type": "string"
          },
          "group_id": {
            "format": "uuid",
            "title": "Group Id",
            "type": "string"
          },
          "iccid": {
            "anyOf": [
              {
                "pattern": "^[0-9]{18,22}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Iccid"
          },
          "imei": {
            "anyOf": [
              {
                "pattern": "^[0-9]{15}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Imei"
          },
          "mac_address": {
            "anyOf": [
              {
                "pattern": "^[0-9A-Fa-f]{2}([:-][0-9A-Fa-f]{2}){5}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mac Address"
          },
          "phone_number": {
            "anyOf": [
              {
                "pattern": "^\\+[1-9]\\d{9,14}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Number"
          },
          "serial_number": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Serial Number"
          }
        },
        "required": [
          "gateway_id",
          "group_id",
          "display_name"
        ],
        "title": "GatewayProvisionRequest",
        "type": "object"
      },
      "GatewayUpdateRequest": {
        "additionalProperties": false,
        "description": "Inventario delegabile; configurazione operativa riservata a HQ.",
        "minProperties": 1,
        "properties": {
          "activation_mode": {
            "anyOf": [
              {
                "enum": [
                  "sms",
                  "wifi"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activation Mode"
          },
          "display_name": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "iccid": {
            "anyOf": [
              {
                "pattern": "^[0-9]{18,22}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Iccid"
          },
          "imei": {
            "anyOf": [
              {
                "pattern": "^[0-9]{15}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Imei"
          },
          "mac_address": {
            "anyOf": [
              {
                "pattern": "^[0-9A-Fa-f]{2}([:-][0-9A-Fa-f]{2}){5}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mac Address"
          },
          "phone_number": {
            "anyOf": [
              {
                "pattern": "^\\+[1-9]\\d{9,14}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Number"
          },
          "serial_number": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Serial Number"
          }
        },
        "title": "GatewayUpdateRequest",
        "type": "object"
      },
      "GroupCreateRequest": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "GroupCreateRequest",
        "type": "object"
      },
      "GroupResponse": {
        "additionalProperties": false,
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "revision": {
            "default": "",
            "title": "Revision",
            "type": "string"
          }
        },
        "required": [
          "name",
          "id",
          "created_at"
        ],
        "title": "GroupResponse",
        "type": "object"
      },
      "GroupUpdateRequest": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "name": {
            "maxLength": 100,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "GroupUpdateRequest",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "HistoryPoint": {
        "properties": {
          "at": {
            "format": "date-time",
            "title": "At",
            "type": "string"
          },
          "cpu": {
            "$ref": "#/components/schemas/MetricAggregate"
          },
          "disk": {
            "$ref": "#/components/schemas/MetricAggregate"
          },
          "first_observed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Observed At"
          },
          "last_observed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Observed At"
          },
          "memory": {
            "$ref": "#/components/schemas/MetricAggregate"
          },
          "samples": {
            "title": "Samples",
            "type": "integer"
          }
        },
        "required": [
          "at",
          "first_observed_at",
          "last_observed_at",
          "samples",
          "cpu",
          "memory",
          "disk"
        ],
        "title": "HistoryPoint",
        "type": "object"
      },
      "IdentityLinkRequest": {
        "additionalProperties": false,
        "properties": {
          "provider_id": {
            "pattern": "^[a-z][a-z0-9_-]{0,63}$",
            "title": "Provider Id",
            "type": "string"
          },
          "subject": {
            "maxLength": 255,
            "minLength": 1,
            "title": "Subject",
            "type": "string"
          }
        },
        "required": [
          "provider_id",
          "subject"
        ],
        "title": "IdentityLinkRequest",
        "type": "object"
      },
      "IdentityResponse": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "issuer": {
            "title": "Issuer",
            "type": "string"
          },
          "provider_id": {
            "title": "Provider Id",
            "type": "string"
          },
          "subject": {
            "title": "Subject",
            "type": "string"
          },
          "user_id": {
            "format": "uuid",
            "title": "User Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "provider_id",
          "issuer",
          "subject",
          "created_at"
        ],
        "title": "IdentityResponse",
        "type": "object"
      },
      "JobResponse": {
        "properties": {
          "can_activate": {
            "title": "Can Activate",
            "type": "boolean"
          },
          "can_download": {
            "title": "Can Download",
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "downloaded_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Downloaded At"
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Code"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "enum": [
              "gateway",
              "technician"
            ],
            "title": "Kind",
            "type": "string"
          },
          "peer_id": {
            "format": "uuid",
            "title": "Peer Id",
            "type": "string"
          },
          "state": {
            "enum": [
              "queued",
              "ready",
              "active",
              "cancelled",
              "failed",
              "expired"
            ],
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "peer_id",
          "state",
          "created_at",
          "expires_at",
          "downloaded_at",
          "error_code",
          "can_download",
          "can_activate"
        ],
        "title": "JobResponse",
        "type": "object"
      },
      "LogParameters": {
        "additionalProperties": false,
        "properties": {
          "dropped": {
            "anyOf": [
              {
                "maximum": 1000000.0,
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dropped"
          },
          "exit_code": {
            "anyOf": [
              {
                "maximum": 255.0,
                "minimum": -255.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Exit Code"
          },
          "http_status": {
            "anyOf": [
              {
                "maximum": 599.0,
                "minimum": 100.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Http Status"
          }
        },
        "title": "LogParameters",
        "type": "object"
      },
      "LoginRequest": {
        "properties": {
          "emergency_code": {
            "anyOf": [
              {
                "maxLength": 64,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Emergency Code"
          },
          "password": {
            "maxLength": 128,
            "minLength": 8,
            "title": "Password",
            "type": "string"
          },
          "username": {
            "maxLength": 50,
            "minLength": 3,
            "title": "Username",
            "type": "string"
          }
        },
        "required": [
          "username",
          "password"
        ],
        "title": "LoginRequest",
        "type": "object"
      },
      "LoginResponse": {
        "properties": {
          "access_token": {
            "title": "Access Token",
            "type": "string"
          },
          "token_type": {
            "default": "bearer",
            "title": "Token Type",
            "type": "string"
          },
          "user_id": {
            "title": "User Id",
            "type": "string"
          },
          "username": {
            "title": "Username",
            "type": "string"
          }
        },
        "required": [
          "access_token",
          "user_id",
          "username"
        ],
        "title": "LoginResponse",
        "type": "object"
      },
      "LogoutResponse": {
        "properties": {
          "message": {
            "title": "Message",
            "type": "string"
          },
          "provider_logout_urls": {
            "items": {
              "type": "string"
            },
            "title": "Provider Logout Urls",
            "type": "array"
          }
        },
        "required": [
          "message"
        ],
        "title": "LogoutResponse",
        "type": "object"
      },
      "MessageResponse": {
        "properties": {
          "message": {
            "title": "Message",
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "title": "MessageResponse",
        "type": "object"
      },
      "MetricAggregate": {
        "properties": {
          "mean": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mean"
          },
          "peak": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Peak"
          },
          "samples": {
            "title": "Samples",
            "type": "integer"
          }
        },
        "required": [
          "mean",
          "peak",
          "samples"
        ],
        "title": "MetricAggregate",
        "type": "object"
      },
      "PKIStatus": {
        "properties": {
          "authorities": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/AuthorityStatus"
            },
            "title": "Authorities",
            "type": "array"
          },
          "crl_valid": {
            "default": false,
            "title": "Crl Valid",
            "type": "boolean"
          },
          "observed_at": {
            "format": "date-time",
            "title": "Observed At",
            "type": "string"
          },
          "state": {
            "enum": [
              "not_configured",
              "ok",
              "error"
            ],
            "title": "State",
            "type": "string"
          },
          "valid_for_seconds": {
            "default": 30,
            "title": "Valid For Seconds",
            "type": "integer"
          }
        },
        "required": [
          "state",
          "observed_at"
        ],
        "title": "PKIStatus",
        "type": "object"
      },
      "PasswordChangeRequest": {
        "additionalProperties": false,
        "properties": {
          "current_password": {
            "maxLength": 128,
            "minLength": 8,
            "title": "Current Password",
            "type": "string"
          },
          "new_password": {
            "maxLength": 128,
            "minLength": 8,
            "title": "New Password",
            "type": "string"
          }
        },
        "required": [
          "current_password",
          "new_password"
        ],
        "title": "PasswordChangeRequest",
        "type": "object"
      },
      "Permission": {
        "enum": [
          "connect",
          "users.manage",
          "groups.manage",
          "gateways.manage",
          "gateways.provision",
          "sessions.manage",
          "audit.read",
          "telemetry.read",
          "logs.read"
        ],
        "title": "Permission",
        "type": "string"
      },
      "ProfileRequest": {
        "additionalProperties": false,
        "properties": {
          "expected_certificate_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expected Certificate Id"
          }
        },
        "required": [
          "expected_certificate_id"
        ],
        "title": "ProfileRequest",
        "type": "object"
      },
      "ProfileUpdateRequest": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "full_name": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          }
        },
        "title": "ProfileUpdateRequest",
        "type": "object"
      },
      "ProvisioningState": {
        "properties": {
          "certificate": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CertificateResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "cleanup_pending": {
            "title": "Cleanup Pending",
            "type": "boolean"
          },
          "enabled": {
            "title": "Enabled",
            "type": "boolean"
          },
          "enrollment_pending": {
            "default": false,
            "title": "Enrollment Pending",
            "type": "boolean"
          },
          "issuer_status": {
            "enum": [
              "ok",
              "error",
              "unknown",
              "stale"
            ],
            "title": "Issuer Status",
            "type": "string"
          },
          "issuer_updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Issuer Updated At"
          },
          "pending_job": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JobResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "recent_job": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/JobResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "registered_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Registered At"
          },
          "remote_renewal_requested": {
            "default": false,
            "title": "Remote Renewal Requested",
            "type": "boolean"
          },
          "remote_renewal_state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remote Renewal State"
          },
          "revocation_pending": {
            "title": "Revocation Pending",
            "type": "boolean"
          }
        },
        "required": [
          "certificate",
          "pending_job",
          "recent_job",
          "registered_at",
          "cleanup_pending",
          "revocation_pending",
          "enabled",
          "issuer_status",
          "issuer_updated_at"
        ],
        "title": "ProvisioningState",
        "type": "object"
      },
      "RegisterRequest": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          },
          "password": {
            "maxLength": 128,
            "minLength": 8,
            "title": "Password",
            "type": "string"
          },
          "username": {
            "maxLength": 50,
            "minLength": 3,
            "title": "Username",
            "type": "string"
          }
        },
        "required": [
          "username",
          "password"
        ],
        "title": "RegisterRequest",
        "type": "object"
      },
      "ResourceMetrics": {
        "additionalProperties": false,
        "properties": {
          "cpu_percent": {
            "anyOf": [
              {
                "maximum": 100.0,
                "minimum": 0.0,
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpu Percent"
          },
          "disk_available_bytes": {
            "anyOf": [
              {
                "maximum": 1.152921504606847e+18,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disk Available Bytes"
          },
          "disk_scope": {
            "const": "collector_filesystem",
            "default": "collector_filesystem",
            "title": "Disk Scope"
          },
          "disk_total_bytes": {
            "anyOf": [
              {
                "maximum": 1.152921504606847e+18,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disk Total Bytes"
          },
          "memory_available_bytes": {
            "anyOf": [
              {
                "maximum": 1.152921504606847e+18,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memory Available Bytes"
          },
          "memory_total_bytes": {
            "anyOf": [
              {
                "maximum": 1.152921504606847e+18,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Memory Total Bytes"
          },
          "scope": {
            "const": "linux_system",
            "default": "linux_system",
            "title": "Scope"
          },
          "uptime_seconds": {
            "anyOf": [
              {
                "maximum": 1000000000000.0,
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uptime Seconds"
          }
        },
        "title": "ResourceMetrics",
        "type": "object"
      },
      "RuntimeInfo": {
        "additionalProperties": false,
        "properties": {
          "build": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[\\w .()+,:@-]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Build"
          },
          "openvpn": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[\\w .()+,:@-]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Openvpn"
          },
          "python": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[\\w .()+,:@-]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Python"
          },
          "version": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 1,
                "pattern": "^[\\w .()+,:@-]+$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          }
        },
        "title": "RuntimeInfo",
        "type": "object"
      },
      "SSOExchangeRequest": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "maxLength": 128,
            "minLength": 32,
            "title": "Code",
            "type": "string"
          },
          "code_verifier": {
            "maxLength": 128,
            "minLength": 43,
            "pattern": "^[A-Za-z0-9._~-]+$",
            "title": "Code Verifier",
            "type": "string"
          }
        },
        "required": [
          "code",
          "code_verifier"
        ],
        "title": "SSOExchangeRequest",
        "type": "object"
      },
      "SSOProviderResponse": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "online_revocation": {
            "title": "Online Revocation",
            "type": "boolean"
          },
          "status": {
            "const": "wip",
            "default": "wip",
            "title": "Status"
          }
        },
        "required": [
          "id",
          "label",
          "online_revocation"
        ],
        "title": "SSOProviderResponse",
        "type": "object"
      },
      "SSOStartRequest": {
        "additionalProperties": false,
        "properties": {
          "code_challenge": {
            "pattern": "^[A-Za-z0-9_-]{43}$",
            "title": "Code Challenge",
            "type": "string"
          },
          "provider_id": {
            "pattern": "^[a-z][a-z0-9_-]{0,63}$",
            "title": "Provider Id",
            "type": "string"
          },
          "redirect_uri": {
            "maxLength": 1024,
            "title": "Redirect Uri",
            "type": "string"
          },
          "state": {
            "maxLength": 128,
            "minLength": 16,
            "pattern": "^[A-Za-z0-9_-]+$",
            "title": "State",
            "type": "string"
          }
        },
        "required": [
          "provider_id",
          "redirect_uri",
          "code_challenge",
          "state"
        ],
        "title": "SSOStartRequest",
        "type": "object"
      },
      "SSOStartResponse": {
        "properties": {
          "authorization_url": {
            "title": "Authorization Url",
            "type": "string"
          },
          "expires_in": {
            "title": "Expires In",
            "type": "integer"
          }
        },
        "required": [
          "authorization_url",
          "expires_in"
        ],
        "title": "SSOStartResponse",
        "type": "object"
      },
      "ServerStatus": {
        "properties": {
          "api_runtime": {
            "$ref": "#/components/schemas/RuntimeInfo"
          },
          "backup": {
            "$ref": "#/components/schemas/BackupSummary"
          },
          "certificates": {
            "items": {
              "$ref": "#/components/schemas/CertificateStatus"
            },
            "title": "Certificates",
            "type": "array"
          },
          "components": {
            "items": {
              "$ref": "#/components/schemas/CentralComponent"
            },
            "title": "Components",
            "type": "array"
          },
          "observed_at": {
            "format": "date-time",
            "title": "Observed At",
            "type": "string"
          },
          "pki": {
            "$ref": "#/components/schemas/PKIStatus"
          },
          "smtp": {
            "$ref": "#/components/schemas/SmtpStatus"
          }
        },
        "required": [
          "observed_at",
          "components",
          "api_runtime",
          "smtp",
          "certificates",
          "backup",
          "pki"
        ],
        "title": "ServerStatus",
        "type": "object"
      },
      "SessionCreateRequest": {
        "examples": [
          {
            "gateway_id": "11111111-1111-4111-8111-111111111111"
          }
        ],
        "oneOf": [
          {
            "properties": {
              "gateway_id": {
                "type": "string"
              },
              "phone_number": {
                "type": "null"
              }
            },
            "required": [
              "gateway_id"
            ]
          },
          {
            "properties": {
              "gateway_id": {
                "type": "null"
              },
              "phone_number": {
                "type": "string"
              }
            },
            "required": [
              "phone_number"
            ]
          }
        ],
        "properties": {
          "gateway_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Id"
          },
          "phone_number": {
            "anyOf": [
              {
                "pattern": "^\\+[1-9]\\d{9,14}$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone Number"
          }
        },
        "title": "SessionCreateRequest",
        "type": "object"
      },
      "SessionCreateResponse": {
        "properties": {
          "message": {
            "title": "Message",
            "type": "string"
          },
          "replayed": {
            "default": false,
            "title": "Replayed",
            "type": "boolean"
          },
          "session_id": {
            "title": "Session Id",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "session_id",
          "status",
          "message"
        ],
        "title": "SessionCreateResponse",
        "type": "object"
      },
      "SessionDetailResponse": {
        "properties": {
          "activation_mode": {
            "enum": [
              "sms",
              "wifi"
            ],
            "title": "Activation Mode",
            "type": "string"
          },
          "activation_received_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activation Received At"
          },
          "cleaned_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cleaned At"
          },
          "ended_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At"
          },
          "error_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Reason"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "gateway_connected_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Connected At"
          },
          "gateway_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Id"
          },
          "gateway_ready_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Ready At"
          },
          "gateway_vpn_ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Vpn Ip"
          },
          "group_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Id"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "network_ready_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Network Ready At"
          },
          "requested_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requested At"
          },
          "result": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result"
          },
          "sms_last_attempt_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sms Last Attempt At"
          },
          "sms_sent_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sms Sent At"
          },
          "sso_session_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sso Session Id"
          },
          "status": {
            "enum": [
              "REQUESTED",
              "ACTIVE",
              "CLOSED",
              "EXPIRED",
              "FAILED"
            ],
            "title": "Status",
            "type": "string"
          },
          "support_started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Support Started At"
          },
          "technician_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Technician Id"
          },
          "technician_vpn_ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Technician Vpn Ip"
          },
          "web_session_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Web Session Id"
          },
          "worker_seen_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Worker Seen At"
          }
        },
        "required": [
          "id",
          "technician_id",
          "gateway_id",
          "status",
          "activation_mode",
          "activation_received_at",
          "gateway_ready_at",
          "requested_at",
          "support_started_at",
          "ended_at",
          "expires_at",
          "cleaned_at",
          "result",
          "error_reason",
          "technician_vpn_ip",
          "gateway_vpn_ip",
          "sms_sent_at",
          "sms_last_attempt_at",
          "gateway_connected_at",
          "network_ready_at",
          "worker_seen_at"
        ],
        "title": "SessionDetailResponse",
        "type": "object"
      },
      "SessionEventResponse": {
        "properties": {
          "actor_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Actor Id"
          },
          "details": {
            "title": "Details",
            "type": "object"
          },
          "event_type": {
            "title": "Event Type",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "session_id": {
            "format": "uuid",
            "title": "Session Id",
            "type": "string"
          },
          "source": {
            "title": "Source",
            "type": "string"
          },
          "timestamp": {
            "format": "date-time",
            "title": "Timestamp",
            "type": "string"
          }
        },
        "required": [
          "id",
          "session_id",
          "timestamp",
          "source",
          "event_type",
          "actor_id",
          "details"
        ],
        "title": "SessionEventResponse",
        "type": "object"
      },
      "SessionListResponse": {
        "properties": {
          "activation_mode": {
            "enum": [
              "sms",
              "wifi"
            ],
            "title": "Activation Mode",
            "type": "string"
          },
          "activation_received_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activation Received At"
          },
          "cleaned_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cleaned At"
          },
          "cleanup_pending": {
            "title": "Cleanup Pending",
            "type": "boolean"
          },
          "ended_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "gateway_display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Display Name"
          },
          "gateway_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Id"
          },
          "gateway_mac_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Mac Address"
          },
          "gateway_ready_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Ready At"
          },
          "group_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Id"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "requested_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requested At"
          },
          "status": {
            "enum": [
              "REQUESTED",
              "ACTIVE",
              "CLOSED",
              "EXPIRED",
              "FAILED"
            ],
            "title": "Status",
            "type": "string"
          },
          "support_started_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Support Started At"
          },
          "technician_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Technician Id"
          }
        },
        "required": [
          "id",
          "technician_id",
          "gateway_id",
          "status",
          "activation_mode",
          "activation_received_at",
          "gateway_ready_at",
          "requested_at",
          "support_started_at",
          "ended_at",
          "expires_at",
          "cleaned_at",
          "cleanup_pending",
          "gateway_display_name",
          "gateway_mac_address"
        ],
        "title": "SessionListResponse",
        "type": "object"
      },
      "SmtpRequest": {
        "additionalProperties": false,
        "properties": {
          "mode": {
            "default": "connection",
            "enum": [
              "connection",
              "send"
            ],
            "title": "Mode",
            "type": "string"
          },
          "request_id": {
            "format": "uuid",
            "title": "Request Id",
            "type": "string"
          }
        },
        "required": [
          "request_id"
        ],
        "title": "SmtpRequest",
        "type": "object"
      },
      "SmtpResult": {
        "properties": {
          "code": {
            "enum": [
              "running",
              "connected",
              "accepted",
              "not_configured",
              "tls_failed",
              "authentication_failed",
              "recipient_rejected",
              "connection_failed",
              "timeout"
            ],
            "title": "Code",
            "type": "string"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "mode": {
            "enum": [
              "connection",
              "send"
            ],
            "title": "Mode",
            "type": "string"
          },
          "request_id": {
            "format": "uuid",
            "title": "Request Id",
            "type": "string"
          },
          "started_at": {
            "format": "date-time",
            "title": "Started At",
            "type": "string"
          }
        },
        "required": [
          "request_id",
          "mode",
          "code",
          "started_at",
          "finished_at"
        ],
        "title": "SmtpResult",
        "type": "object"
      },
      "SmtpStatus": {
        "properties": {
          "authentication": {
            "title": "Authentication",
            "type": "boolean"
          },
          "configured": {
            "title": "Configured",
            "type": "boolean"
          },
          "custom_ca": {
            "title": "Custom Ca",
            "type": "boolean"
          },
          "host": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Host"
          },
          "last_check": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SmtpResult"
              },
              {
                "type": "null"
              }
            ]
          },
          "port": {
            "title": "Port",
            "type": "integer"
          },
          "retry_after_seconds": {
            "title": "Retry After Seconds",
            "type": "integer"
          },
          "security": {
            "enum": [
              "plain",
              "tls",
              "starttls"
            ],
            "title": "Security",
            "type": "string"
          },
          "sender": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sender"
          },
          "test_recipient": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Test Recipient"
          }
        },
        "required": [
          "configured",
          "host",
          "port",
          "security",
          "sender",
          "authentication",
          "custom_ca",
          "test_recipient",
          "last_check",
          "retry_after_seconds"
        ],
        "title": "SmtpStatus",
        "type": "object"
      },
      "StatsResponse": {
        "properties": {
          "gateways_active": {
            "title": "Gateways Active",
            "type": "integer"
          },
          "gateways_total": {
            "title": "Gateways Total",
            "type": "integer"
          },
          "sessions_active": {
            "title": "Sessions Active",
            "type": "integer"
          },
          "sessions_closed": {
            "title": "Sessions Closed",
            "type": "integer"
          },
          "sessions_expired": {
            "title": "Sessions Expired",
            "type": "integer"
          },
          "sessions_failed": {
            "title": "Sessions Failed",
            "type": "integer"
          },
          "sessions_requested": {
            "title": "Sessions Requested",
            "type": "integer"
          },
          "sessions_total": {
            "title": "Sessions Total",
            "type": "integer"
          },
          "users_active": {
            "title": "Users Active",
            "type": "integer"
          },
          "users_admin": {
            "title": "Users Admin",
            "type": "integer"
          },
          "users_total": {
            "title": "Users Total",
            "type": "integer"
          }
        },
        "required": [
          "users_total",
          "users_active",
          "users_admin",
          "gateways_total",
          "gateways_active",
          "sessions_total",
          "sessions_active",
          "sessions_requested",
          "sessions_closed",
          "sessions_expired",
          "sessions_failed"
        ],
        "title": "StatsResponse",
        "type": "object"
      },
      "SystemView": {
        "additionalProperties": false,
        "properties": {
          "components": {
            "additionalProperties": {
              "$ref": "#/components/schemas/ComponentView"
            },
            "title": "Components",
            "type": "object"
          },
          "gateway_id": {
            "format": "uuid",
            "title": "Gateway Id",
            "type": "string"
          },
          "logs_supported": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Logs Supported"
          },
          "received_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Received At"
          }
        },
        "required": [
          "gateway_id"
        ],
        "title": "SystemView",
        "type": "object"
      },
      "TechnicalLogView": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "component": {
            "title": "Component",
            "type": "string"
          },
          "event_id": {
            "format": "uuid",
            "title": "Event Id",
            "type": "string"
          },
          "first_observed_at": {
            "format": "date-time",
            "title": "First Observed At",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "observed_at": {
            "format": "date-time",
            "title": "Observed At",
            "type": "string"
          },
          "occurrences": {
            "title": "Occurrences",
            "type": "integer"
          },
          "parameters": {
            "$ref": "#/components/schemas/LogParameters"
          },
          "received_at": {
            "format": "date-time",
            "title": "Received At",
            "type": "string"
          },
          "session_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          },
          "severity": {
            "title": "Severity",
            "type": "string"
          },
          "source": {
            "enum": [
              "agent",
              "worker",
              "api"
            ],
            "title": "Source",
            "type": "string"
          }
        },
        "required": [
          "id",
          "event_id",
          "observed_at",
          "first_observed_at",
          "received_at",
          "source",
          "component",
          "severity",
          "code",
          "message",
          "session_id",
          "occurrences",
          "parameters"
        ],
        "title": "TechnicalLogView",
        "type": "object"
      },
      "TelemetryHistory": {
        "properties": {
          "available_from": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Available From"
          },
          "available_until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Available Until"
          },
          "points": {
            "items": {
              "$ref": "#/components/schemas/HistoryPoint"
            },
            "title": "Points",
            "type": "array"
          },
          "resolution_seconds": {
            "title": "Resolution Seconds",
            "type": "integer"
          },
          "retention_days": {
            "title": "Retention Days",
            "type": "integer"
          },
          "since": {
            "format": "date-time",
            "title": "Since",
            "type": "string"
          },
          "until": {
            "format": "date-time",
            "title": "Until",
            "type": "string"
          }
        },
        "required": [
          "since",
          "until",
          "resolution_seconds",
          "retention_days",
          "available_from",
          "available_until",
          "points"
        ],
        "title": "TelemetryHistory",
        "type": "object"
      },
      "TelemetryView": {
        "properties": {
          "activation_mode": {
            "anyOf": [
              {
                "enum": [
                  "sms",
                  "wifi"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Activation Mode"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "freshness": {
            "enum": [
              "missing",
              "fresh",
              "stale"
            ],
            "title": "Freshness",
            "type": "string"
          },
          "gateway_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gateway Id"
          },
          "mac_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mac Address"
          },
          "metrics": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResourceMetrics"
              },
              {
                "type": "null"
              }
            ]
          },
          "observed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Observed At"
          },
          "received_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Received At"
          },
          "services": {
            "additionalProperties": {
              "enum": [
                "ok",
                "error",
                "idle",
                "unknown"
              ],
              "type": "string"
            },
            "title": "Services",
            "type": "object"
          },
          "valid_for_seconds": {
            "maximum": 90.0,
            "minimum": 0.0,
            "title": "Valid For Seconds",
            "type": "number"
          }
        },
        "required": [
          "freshness",
          "valid_for_seconds",
          "services"
        ],
        "title": "TelemetryView",
        "type": "object"
      },
      "UserCreateRequest": {
        "additionalProperties": false,
        "properties": {
          "auth_mode": {
            "default": "local",
            "enum": [
              "local",
              "sso"
            ],
            "title": "Auth Mode",
            "type": "string"
          },
          "email": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "full_name": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          },
          "group_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "maxItems": 200,
            "title": "Group Ids",
            "type": "array"
          },
          "is_admin": {
            "default": false,
            "title": "Is Admin",
            "type": "boolean"
          },
          "password": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 8,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Password"
          },
          "permissions": {
            "items": {
              "$ref": "#/components/schemas/Permission"
            },
            "title": "Permissions",
            "type": "array"
          },
          "username": {
            "maxLength": 50,
            "minLength": 3,
            "title": "Username",
            "type": "string"
          }
        },
        "required": [
          "username"
        ],
        "title": "UserCreateRequest",
        "type": "object"
      },
      "UserResponse": {
        "properties": {
          "auth_mode": {
            "default": "local",
            "enum": [
              "local",
              "sso"
            ],
            "title": "Auth Mode",
            "type": "string"
          },
          "created_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "email_two_step": {
            "default": false,
            "title": "Email Two Step",
            "type": "boolean"
          },
          "email_two_step_required": {
            "default": false,
            "title": "Email Two Step Required",
            "type": "boolean"
          },
          "email_verified": {
            "default": false,
            "title": "Email Verified",
            "type": "boolean"
          },
          "full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          },
          "group_ids": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Group Ids",
            "type": "array"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "is_active": {
            "title": "Is Active",
            "type": "boolean"
          },
          "is_admin": {
            "title": "Is Admin",
            "type": "boolean"
          },
          "last_login": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Login"
          },
          "permissions": {
            "items": {
              "type": "string"
            },
            "title": "Permissions",
            "type": "array"
          },
          "revision": {
            "default": "",
            "title": "Revision",
            "type": "string"
          },
          "username": {
            "title": "Username",
            "type": "string"
          }
        },
        "required": [
          "id",
          "username",
          "email",
          "full_name",
          "is_active",
          "is_admin",
          "permissions",
          "group_ids",
          "created_at",
          "last_login"
        ],
        "title": "UserResponse",
        "type": "object"
      },
      "UserUpdateRequest": {
        "additionalProperties": false,
        "properties": {
          "email": {
            "anyOf": [
              {
                "maxLength": 255,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "full_name": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Name"
          },
          "group_ids": {
            "anyOf": [
              {
                "items": {
                  "format": "uuid",
                  "type": "string"
                },
                "maxItems": 200,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Ids"
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Active"
          },
          "is_admin": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Admin"
          },
          "password": {
            "anyOf": [
              {
                "maxLength": 128,
                "minLength": 8,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Password"
          },
          "permissions": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/Permission"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Permissions"
          }
        },
        "title": "UserUpdateRequest",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      },
      "WebSSORequest": {
        "additionalProperties": false,
        "properties": {
          "provider_id": {
            "pattern": "^[a-z][a-z0-9_-]{0,63}$",
            "title": "Provider Id",
            "type": "string"
          },
          "reauthenticate": {
            "default": false,
            "title": "Reauthenticate",
            "type": "boolean"
          }
        },
        "required": [
          "provider_id"
        ],
        "title": "WebSSORequest",
        "type": "object"
      },
      "WebSessionResponse": {
        "properties": {
          "csrf_token": {
            "title": "Csrf Token",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/CurrentUserResponse"
          }
        },
        "required": [
          "user",
          "csrf_token",
          "expires_at"
        ],
        "title": "WebSessionResponse",
        "type": "object"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "bearerFormat": "JWT",
        "scheme": "bearer",
        "type": "http"
      },
      "PortalCookie": {
        "description": "Portal session cookie. Local HTTP development uses factoryvpn_portal.",
        "in": "cookie",
        "name": "__Host-factoryvpn_portal",
        "type": "apiKey"
      },
      "VerificationCookie": {
        "description": "Browser binding issued by /web/login for email verification, before a session exists. Local HTTP development uses factoryvpn_verification.",
        "in": "cookie",
        "name": "__Host-factoryvpn_verification",
        "type": "apiKey"
      }
    }
  },
  "externalDocs": {
    "description": "Integration and client development guide",
    "url": "https://vpn.ercoliconsulting.eu/developers.html"
  },
  "info": {
    "description": "HTTP API for customer clients and custom connectors. Authenticate with JSON at POST /api/v1/auth/login for local accounts, or use the SSO start/browser/exchange flow. When challenge_required is true, complete /auth/login/verify with the emailed code before receiving a JWT. During a mail outage, a deployment administrator can issue a single-use console code; supply it as emergency_code alongside the local username and password at login. This uses the normal token/session lifetime and does not verify email ownership. Pass the returned FactoryVPN JWT as a bearer token. Access is restricted to assigned resource groups. Delegated administration requires the operation's capability within those groups; global administrators manage the instance. The API controls sessions; machine traffic requires a separately provisioned OpenVPN client. Use your deployment's API origin, not the public documentation website. Worker and gateway machine operations are intentionally excluded.",
    "title": "FactoryVPN Customer API",
    "version": "0.9.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/v1/admin/audit": {
      "get": {
        "description": "\n\nRequires audit.read within the caller's assigned groups, or global administration.",
        "operationId": "list_audit_logs_api_v1_admin_audit_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "gateway_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Gateway Id"
            }
          },
          {
            "in": "query",
            "name": "session_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session Id"
            }
          },
          {
            "in": "query",
            "name": "group_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Group Id"
            }
          },
          {
            "in": "query",
            "name": "event_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 50,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Event Type"
            }
          },
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AuditLogResponse"
                  },
                  "title": "Response List Audit Logs Api V1 Admin Audit Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "List Audit Logs",
        "tags": [
          "Admin"
        ],
        "x-required-permission": "audit.read"
      }
    },
    "/api/v1/admin/audit.csv": {
      "get": {
        "description": "\n\nRequires audit.read within the caller's assigned groups, or global administration.",
        "operationId": "export_audit_api_v1_admin_audit_csv_get",
        "parameters": [
          {
            "in": "query",
            "name": "gateway_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Gateway Id"
            }
          },
          {
            "in": "query",
            "name": "session_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session Id"
            }
          },
          {
            "in": "query",
            "name": "group_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Group Id"
            }
          },
          {
            "in": "query",
            "name": "event_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 50,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Event Type"
            }
          },
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/csv": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "UTF-8 CSV attachment, limited to 10,000 authorized rows."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Export Audit",
        "tags": [
          "Admin"
        ],
        "x-required-permission": "audit.read"
      }
    },
    "/api/v1/admin/enrollments": {
      "get": {
        "description": "\n\nRequires an administrator account.",
        "operationId": "list_enrollments_api_v1_admin_enrollments_get",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 100,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "state",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "prepared",
                    "awaiting_approval",
                    "awaiting_data",
                    "approved",
                    "preparing",
                    "ready",
                    "completed",
                    "blocked",
                    "manual"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "State"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/EnrollmentResponse"
                  },
                  "title": "Response List Enrollments Api V1 Admin Enrollments Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "X-Total-Count": {
                "description": "Total rows after authorization and filters, before pagination.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "List Enrollments",
        "tags": [
          "Enrollment"
        ],
        "x-required-role": "admin"
      }
    },
    "/api/v1/admin/enrollments/{identifier}": {
      "get": {
        "description": "\n\nRequires an administrator account.",
        "operationId": "detail_api_v1_admin_enrollments__identifier__get",
        "parameters": [
          {
            "in": "path",
            "name": "identifier",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Identifier",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnrollmentResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Detail",
        "tags": [
          "Enrollment"
        ],
        "x-required-role": "admin"
      },
      "patch": {
        "description": "\n\nRequires an administrator account.",
        "operationId": "update_api_v1_admin_enrollments__identifier__patch",
        "parameters": [
          {
            "in": "path",
            "name": "identifier",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Identifier",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "if-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrollmentUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnrollmentResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Update",
        "tags": [
          "Enrollment"
        ],
        "x-required-role": "admin"
      }
    },
    "/api/v1/admin/enrollments/{identifier}/approve": {
      "post": {
        "description": "\n\nRequires an administrator account.",
        "operationId": "approve_api_v1_admin_enrollments__identifier__approve_post",
        "parameters": [
          {
            "in": "path",
            "name": "identifier",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Identifier",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "if-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrollmentApproval"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnrollmentResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Approve",
        "tags": [
          "Enrollment"
        ],
        "x-required-role": "admin"
      }
    },
    "/api/v1/admin/enrollments/{identifier}/block": {
      "post": {
        "description": "\n\nRequires an administrator account.",
        "operationId": "block_api_v1_admin_enrollments__identifier__block_post",
        "parameters": [
          {
            "in": "path",
            "name": "identifier",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Identifier",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "if-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrollmentBlock"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnrollmentResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Block",
        "tags": [
          "Enrollment"
        ],
        "x-required-role": "admin"
      }
    },
    "/api/v1/admin/enrollments/{identifier}/manual": {
      "post": {
        "description": "\n\nRequires an administrator account.",
        "operationId": "manual_api_v1_admin_enrollments__identifier__manual_post",
        "parameters": [
          {
            "in": "path",
            "name": "identifier",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Identifier",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Idempotency-Key",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "if-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrollmentManualRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Manual",
        "tags": [
          "Enrollment"
        ],
        "x-required-role": "admin"
      }
    },
    "/api/v1/admin/enrollments/{identifier}/resume": {
      "post": {
        "description": "\n\nRequires an administrator account.",
        "operationId": "resume_api_v1_admin_enrollments__identifier__resume_post",
        "parameters": [
          {
            "in": "path",
            "name": "identifier",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Identifier",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "if-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnrollmentResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Resume",
        "tags": [
          "Enrollment"
        ],
        "x-required-role": "admin"
      }
    },
    "/api/v1/admin/gateways": {
      "get": {
        "description": "\n\nRequires gateways.manage within the caller's assigned groups, or global administration.",
        "operationId": "list_gateways_api_v1_admin_gateways_get",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 100,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "group_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Group Id"
            }
          },
          {
            "in": "query",
            "name": "status_filter",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "PENDING",
                    "ACTIVE",
                    "INACTIVE"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status Filter"
            }
          },
          {
            "in": "query",
            "name": "activation_mode",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "sms",
                    "wifi"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Activation Mode"
            }
          },
          {
            "in": "query",
            "name": "availability",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "available",
                    "busy",
                    "cleanup_pending",
                    "unconfigured"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Availability"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AdminGatewayCatalogResponse"
                  },
                  "title": "Response List Gateways Api V1 Admin Gateways Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "X-Total-Count": {
                "description": "Total rows after authorization and filters, before pagination.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "List Gateways",
        "tags": [
          "Admin"
        ],
        "x-required-permission": "gateways.manage"
      }
    },
    "/api/v1/admin/gateways/{gateway_id}": {
      "delete": {
        "description": "\n\nRequires gateways.manage within the caller's assigned groups, or global administration.",
        "operationId": "delete_gateway_api_v1_admin_gateways__gateway_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "gateway_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Gateway Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "if-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Delete Gateway",
        "tags": [
          "Admin"
        ],
        "x-required-permission": "gateways.manage"
      },
      "get": {
        "description": "\n\nRequires gateways.manage within the caller's assigned groups, or global administration.",
        "operationId": "get_gateway_api_v1_admin_gateways__gateway_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "gateway_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Gateway Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminGatewayDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Get Gateway",
        "tags": [
          "Admin"
        ],
        "x-required-permission": "gateways.manage"
      },
      "patch": {
        "description": "Aggiorna inventario e configurazione operativa.\n\nMAC, modalità e telefono richiedono un amministratore globale, assenza di\nsessioni/pulizie pendenti e nuovo provisioning dopo la revoca dei materiali.\nLe correzioni di solo inventario mantengono i permessi delegati esistenti.\n\nRequires gateways.manage within the caller's assigned groups, or global administration.",
        "operationId": "update_gateway_api_v1_admin_gateways__gateway_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "gateway_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Gateway Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "if-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GatewayUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminGatewaySummaryResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Update Gateway",
        "tags": [
          "Admin"
        ],
        "x-required-permission": "gateways.manage"
      }
    },
    "/api/v1/admin/gateways/{gateway_id}/devices": {
      "get": {
        "description": "\n\nRequires gateways.manage within the caller's assigned groups, or global administration.",
        "operationId": "list_devices_api_v1_admin_gateways__gateway_id__devices_get",
        "parameters": [
          {
            "in": "path",
            "name": "gateway_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Gateway Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 100,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "device_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "PLC",
                    "HMI",
                    "SERVER",
                    "OTHER"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Device Type"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AdminDeviceResponse"
                  },
                  "title": "Response List Devices Api V1 Admin Gateways  Gateway Id  Devices Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "X-Total-Count": {
                "description": "Total rows after authorization and filters, before pagination.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "List Devices",
        "tags": [
          "Admin"
        ],
        "x-required-permission": "gateways.manage"
      },
      "post": {
        "description": "\n\nRequires gateways.manage within the caller's assigned groups, or global administration.",
        "operationId": "add_device_api_v1_admin_gateways__gateway_id__devices_post",
        "parameters": [
          {
            "in": "path",
            "name": "gateway_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Gateway Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "if-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminDeviceCreatedResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Add Device",
        "tags": [
          "Admin"
        ],
        "x-required-permission": "gateways.manage"
      }
    },
    "/api/v1/admin/gateways/{gateway_id}/devices/{device_id}": {
      "delete": {
        "description": "\n\nRequires gateways.manage within the caller's assigned groups, or global administration.",
        "operationId": "delete_device_api_v1_admin_gateways__gateway_id__devices__device_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "gateway_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Gateway Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "device_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Device Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "if-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Delete Device",
        "tags": [
          "Admin"
        ],
        "x-required-permission": "gateways.manage"
      },
      "put": {
        "description": "\n\nRequires gateways.manage within the caller's assigned groups, or global administration.",
        "operationId": "update_device_api_v1_admin_gateways__gateway_id__devices__device_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "gateway_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Gateway Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "device_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Device Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "if-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminDeviceResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Update Device",
        "tags": [
          "Admin"
        ],
        "x-required-permission": "gateways.manage"
      }
    },
    "/api/v1/admin/gateways/{gateway_id}/group": {
      "put": {
        "description": "\n\nRequires gateways.manage within the caller's assigned groups, or global administration.",
        "operationId": "assign_gateway_group_api_v1_admin_gateways__gateway_id__group_put",
        "parameters": [
          {
            "in": "path",
            "name": "gateway_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Gateway Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "if-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GatewayGroupRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminGatewaySummaryResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Assign Gateway Group",
        "tags": [
          "Admin"
        ],
        "x-required-permission": "gateways.manage"
      }
    },
    "/api/v1/admin/groups": {
      "get": {
        "description": "\n\nRequires groups.manage within the caller's assigned groups, or global administration.",
        "operationId": "list_groups_api_v1_admin_groups_get",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 100,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/GroupResponse"
                  },
                  "title": "Response List Groups Api V1 Admin Groups Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "List Groups",
        "tags": [
          "Groups"
        ],
        "x-required-permission": "groups.manage"
      },
      "post": {
        "description": "\n\nRequires groups.manage within the caller's assigned groups, or global administration.",
        "operationId": "create_group_api_v1_admin_groups_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GroupCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Create Group",
        "tags": [
          "Groups"
        ],
        "x-required-permission": "groups.manage"
      }
    },
    "/api/v1/admin/groups/{group_id}": {
      "delete": {
        "description": "\n\nRequires groups.manage within the caller's assigned groups, or global administration.",
        "operationId": "delete_group_api_v1_admin_groups__group_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "group_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Group Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "if-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Delete Group",
        "tags": [
          "Groups"
        ],
        "x-required-permission": "groups.manage"
      },
      "get": {
        "description": "\n\nRequires groups.manage within the caller's assigned groups, or global administration.",
        "operationId": "get_group_api_v1_admin_groups__group_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "group_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Group Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Get Group",
        "tags": [
          "Groups"
        ],
        "x-required-permission": "groups.manage"
      },
      "put": {
        "description": "\n\nRequires groups.manage within the caller's assigned groups, or global administration.",
        "operationId": "update_group_api_v1_admin_groups__group_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "group_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Group Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "if-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GroupUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Update Group",
        "tags": [
          "Groups"
        ],
        "x-required-permission": "groups.manage"
      }
    },
    "/api/v1/admin/permissions": {
      "get": {
        "operationId": "permission_catalog_api_v1_admin_permissions_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "type": "string"
                  },
                  "title": "Response Permission Catalog Api V1 Admin Permissions Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Permission Catalog",
        "tags": [
          "Admin"
        ]
      }
    },
    "/api/v1/admin/server": {
      "get": {
        "description": "\n\nRequires an administrator account.",
        "operationId": "server_status_api_v1_admin_server_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerStatus"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Server Status",
        "tags": [
          "Server status"
        ],
        "x-required-role": "admin"
      }
    },
    "/api/v1/admin/server/smtp-check": {
      "post": {
        "description": "\n\nRequires an administrator account.",
        "operationId": "smtp_check_api_v1_admin_server_smtp_check_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SmtpRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmtpResult"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Smtp Check",
        "tags": [
          "Server status"
        ],
        "x-required-role": "admin"
      }
    },
    "/api/v1/admin/sessions": {
      "get": {
        "description": "Search all sessions in delegated groups, preserving historical visibility.\n\nRequires sessions.manage within the caller's assigned groups, or global administration.",
        "operationId": "list_sessions_api_v1_admin_sessions_get",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 100,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "status_filter",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "REQUESTED",
                    "ACTIVE",
                    "CLOSED",
                    "EXPIRED",
                    "FAILED"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status Filter"
            }
          },
          {
            "in": "query",
            "name": "group_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Group Id"
            }
          },
          {
            "in": "query",
            "name": "gateway_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Gateway Id"
            }
          },
          {
            "in": "query",
            "name": "technician_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Technician Id"
            }
          },
          {
            "in": "query",
            "name": "activation_mode",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "sms",
                    "wifi"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Activation Mode"
            }
          },
          {
            "in": "query",
            "name": "reserved",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Reserved"
            }
          },
          {
            "in": "query",
            "name": "cleanup_pending",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cleanup Pending"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AdminSessionListResponse"
                  },
                  "title": "Response List Sessions Api V1 Admin Sessions Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "X-Total-Count": {
                "description": "Total rows after authorization and filters, before pagination.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "List Sessions",
        "tags": [
          "Admin"
        ],
        "x-required-permission": "sessions.manage"
      }
    },
    "/api/v1/admin/sessions/{session_id}": {
      "delete": {
        "description": "\n\nRequires sessions.manage within the caller's assigned groups, or global administration.",
        "operationId": "close_session_api_v1_admin_sessions__session_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Session Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSessionCloseResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Close Session",
        "tags": [
          "Admin"
        ],
        "x-required-permission": "sessions.manage"
      },
      "get": {
        "description": "\n\nRequires sessions.manage within the caller's assigned groups, or global administration.",
        "operationId": "get_session_api_v1_admin_sessions__session_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Session Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdminSessionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Get Session",
        "tags": [
          "Admin"
        ],
        "x-required-permission": "sessions.manage"
      }
    },
    "/api/v1/admin/stats": {
      "get": {
        "description": "\n\nRequires audit.read within the caller's assigned groups, or global administration.",
        "operationId": "get_stats_api_v1_admin_stats_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Get Stats",
        "tags": [
          "Admin"
        ],
        "x-required-permission": "audit.read"
      }
    },
    "/api/v1/admin/users": {
      "get": {
        "description": "\n\nRequires users.manage within the caller's assigned groups, or global administration.",
        "operationId": "list_users_api_v1_admin_users_get",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 100,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "group_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Group Id"
            }
          },
          {
            "in": "query",
            "name": "is_active",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Is Active"
            }
          },
          {
            "in": "query",
            "name": "auth_mode",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "local",
                    "sso"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Auth Mode"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/UserResponse"
                  },
                  "title": "Response List Users Api V1 Admin Users Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "List Users",
        "tags": [
          "Admin"
        ],
        "x-required-permission": "users.manage"
      },
      "post": {
        "description": "\n\nRequires users.manage within the caller's assigned groups, or global administration.",
        "operationId": "create_user_api_v1_admin_users_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Request rejected by an account management rule."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Create User",
        "tags": [
          "Admin"
        ],
        "x-required-permission": "users.manage"
      }
    },
    "/api/v1/admin/users/{user_id}": {
      "delete": {
        "description": "\n\nRequires users.manage within the caller's assigned groups, or global administration.",
        "operationId": "delete_user_api_v1_admin_users__user_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "if-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Request rejected by an account management rule."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Delete User",
        "tags": [
          "Admin"
        ],
        "x-required-permission": "users.manage"
      },
      "get": {
        "description": "\n\nRequires users.manage within the caller's assigned groups, or global administration.",
        "operationId": "get_user_api_v1_admin_users__user_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Get User",
        "tags": [
          "Admin"
        ],
        "x-required-permission": "users.manage"
      },
      "put": {
        "description": "\n\nRequires users.manage within the caller's assigned groups, or global administration.",
        "operationId": "update_user_api_v1_admin_users__user_id__put",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "if-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Update User",
        "tags": [
          "Admin"
        ],
        "x-required-permission": "users.manage"
      }
    },
    "/api/v1/admin/users/{user_id}/authentication": {
      "put": {
        "description": "\n\nRequires an administrator account.",
        "operationId": "authentication_mode_api_v1_admin_users__user_id__authentication_put",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "if-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuthenticationModeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Authentication Mode",
        "tags": [
          "SSO administration"
        ],
        "x-required-role": "admin"
      }
    },
    "/api/v1/admin/users/{user_id}/email-recovery": {
      "post": {
        "description": "\n\nRequires users.manage within the caller's assigned groups, or global administration.",
        "operationId": "recover_api_v1_admin_users__user_id__email_recovery_post",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "if-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailRecovery"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailComplete"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Request rejected by an account management rule."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Recover",
        "tags": [
          "Email verification"
        ],
        "x-required-permission": "users.manage"
      }
    },
    "/api/v1/admin/users/{user_id}/identities": {
      "get": {
        "description": "\n\nRequires an administrator account.",
        "operationId": "identities_api_v1_admin_users__user_id__identities_get",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/IdentityResponse"
                  },
                  "title": "Response Identities Api V1 Admin Users  User Id  Identities Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Identities",
        "tags": [
          "SSO administration"
        ],
        "x-required-role": "admin"
      },
      "post": {
        "description": "\n\nRequires an administrator account.",
        "operationId": "link_identity_api_v1_admin_users__user_id__identities_post",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "if-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IdentityLinkRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdentityResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Request rejected by an account management rule."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Link Identity",
        "tags": [
          "SSO administration"
        ],
        "x-required-role": "admin"
      }
    },
    "/api/v1/admin/users/{user_id}/identities/{identity_id}": {
      "delete": {
        "description": "\n\nRequires an administrator account.",
        "operationId": "unlink_identity_api_v1_admin_users__user_id__identities__identity_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "user_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "User Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "identity_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Identity Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "if-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Request rejected by an account management rule."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Unlink Identity",
        "tags": [
          "SSO administration"
        ],
        "x-required-role": "admin"
      }
    },
    "/api/v1/auth/login": {
      "post": {
        "operationId": "login_api_v1_auth_login_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/LoginResponse"
                    },
                    {
                      "$ref": "#/components/schemas/EmailChallengeResponse"
                    }
                  ],
                  "title": "Response Login Api V1 Auth Login Post"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired, consumed or exhausted console access code."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid username or password, or an inactive account."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Email verification or mail delivery is unavailable on the email path."
          }
        },
        "summary": "Login",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/login/resend": {
      "post": {
        "operationId": "resend_login_api_v1_auth_login_resend_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailResend"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailChallengeResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid or expired challenge, code or browser binding."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid username or password, or an inactive account."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Email verification locked, resend cooldown or sending limit reached."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Email verification or mail delivery is unavailable."
          }
        },
        "summary": "Resend Login",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/login/verify": {
      "post": {
        "operationId": "verify_login_api_v1_auth_login_verify_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailProof"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid or expired challenge, code or browser binding."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid username or password, or an inactive account."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Email verification locked, resend cooldown or sending limit reached."
          }
        },
        "summary": "Verify Login",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/logout": {
      "post": {
        "description": "Invalidate all JWTs and close every VPN session belonging to this account.",
        "operationId": "logout_api_v1_auth_logout_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogoutResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Logout",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/me": {
      "get": {
        "operationId": "get_me_api_v1_auth_me_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CurrentUserResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Get Me",
        "tags": [
          "Authentication"
        ]
      },
      "patch": {
        "operationId": "update_profile_api_v1_auth_me_patch",
        "parameters": [
          {
            "in": "header",
            "name": "if-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CurrentUserResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Update Profile",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/password": {
      "post": {
        "operationId": "change_password_api_v1_auth_password_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordChangeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Change Password",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/api/v1/auth/register": {
      "post": {
        "deprecated": true,
        "description": "Legacy global-admin creation. The account has no groups and no resource access.\n\nPrefer POST /admin/users to assign groups and permissions atomically.\n\nRequires an administrator account.",
        "operationId": "register_api_v1_auth_register_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Request rejected by an account management rule."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Register",
        "tags": [
          "Authentication"
        ],
        "x-required-role": "admin"
      }
    },
    "/api/v1/auth/sso/exchange": {
      "post": {
        "operationId": "exchange_api_v1_auth_sso_exchange_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSOExchangeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid username or password, or an inactive account."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Exchange",
        "tags": [
          "SSO"
        ]
      }
    },
    "/api/v1/auth/sso/providers": {
      "get": {
        "operationId": "providers_api_v1_auth_sso_providers_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SSOProviderResponse"
                  },
                  "title": "Response Providers Api V1 Auth Sso Providers Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid username or password, or an inactive account."
          }
        },
        "summary": "Providers",
        "tags": [
          "SSO"
        ]
      }
    },
    "/api/v1/auth/sso/start": {
      "post": {
        "operationId": "start_api_v1_auth_sso_start_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSOStartRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOStartResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid username or password, or an inactive account."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "summary": "Start",
        "tags": [
          "SSO"
        ]
      }
    },
    "/api/v1/backups": {
      "get": {
        "description": "\n\nGlobal administrators with an authenticated portal session only. Mutations require Origin, X-CSRF-Token and identity confirmation within five minutes. Queued operations require a UUID Idempotency-Key. Import accepts an encrypted FactoryVPN binary archive, up to the configured limit (maximum 512 MiB). A missing recent identity confirmation returns 428; maintenance returns 503.",
        "operationId": "status_api_v1_backups_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupStatus"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          }
        },
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "summary": "Status",
        "tags": [
          "Backup and recovery"
        ]
      },
      "post": {
        "description": "\n\nGlobal administrators with an authenticated portal session only. Mutations require Origin, X-CSRF-Token and identity confirmation within five minutes. Queued operations require a UUID Idempotency-Key. Import accepts an encrypted FactoryVPN binary archive, up to the configured limit (maximum 512 MiB). A missing recent identity confirmation returns 428; maintenance returns 503.",
        "operationId": "create_api_v1_backups_post",
        "parameters": [
          {
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupJobResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "summary": "Create",
        "tags": [
          "Backup and recovery"
        ]
      }
    },
    "/api/v1/backups/import": {
      "post": {
        "description": "\n\nGlobal administrators with an authenticated portal session only. Mutations require Origin, X-CSRF-Token and identity confirmation within five minutes. Queued operations require a UUID Idempotency-Key. Import accepts an encrypted FactoryVPN binary archive, up to the configured limit (maximum 512 MiB). A missing recent identity confirmation returns 428; maintenance returns 503.",
        "operationId": "upload_api_v1_backups_import_post",
        "parameters": [
          {
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {
                "format": "binary",
                "type": "string"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupJobResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "summary": "Upload",
        "tags": [
          "Backup and recovery"
        ]
      }
    },
    "/api/v1/backups/reauthenticate": {
      "post": {
        "description": "\n\nGlobal administrators with an authenticated portal session only. Mutations require Origin, X-CSRF-Token and identity confirmation within five minutes. Queued operations require a UUID Idempotency-Key. Import accepts an encrypted FactoryVPN binary archive, up to the configured limit (maximum 512 MiB). A missing recent identity confirmation returns 428; maintenance returns 503.",
        "operationId": "reauthenticate_api_v1_backups_reauthenticate_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackupReauthentication"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/EmailChallengeResponse"
                    },
                    {
                      "$ref": "#/components/schemas/EmailComplete"
                    }
                  ],
                  "title": "Response Reauthenticate Api V1 Backups Reauthenticate Post"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired, consumed or exhausted console access code."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Email verification or mail delivery is unavailable on the email path."
          }
        },
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "summary": "Reauthenticate",
        "tags": [
          "Backup and recovery"
        ]
      }
    },
    "/api/v1/backups/retention": {
      "put": {
        "description": "\n\nGlobal administrators with an authenticated portal session only. Mutations require Origin, X-CSRF-Token and identity confirmation within five minutes. Queued operations require a UUID Idempotency-Key. Import accepts an encrypted FactoryVPN binary archive, up to the configured limit (maximum 512 MiB). A missing recent identity confirmation returns 428; maintenance returns 503.",
        "operationId": "retention_api_v1_backups_retention_put",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackupRetention"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "summary": "Retention",
        "tags": [
          "Backup and recovery"
        ]
      }
    },
    "/api/v1/backups/{backup_id}/commands": {
      "post": {
        "description": "\n\nGlobal administrators with an authenticated portal session only. Mutations require Origin, X-CSRF-Token and identity confirmation within five minutes. Queued operations require a UUID Idempotency-Key. Import accepts an encrypted FactoryVPN binary archive, up to the configured limit (maximum 512 MiB). A missing recent identity confirmation returns 428; maintenance returns 503.",
        "operationId": "command_api_v1_backups__backup_id__commands_post",
        "parameters": [
          {
            "in": "path",
            "name": "backup_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Backup Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackupCommand"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BackupJobResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "summary": "Command",
        "tags": [
          "Backup and recovery"
        ]
      }
    },
    "/api/v1/backups/{backup_id}/download": {
      "post": {
        "description": "\n\nGlobal administrators with an authenticated portal session only. Mutations require Origin, X-CSRF-Token and identity confirmation within five minutes. Queued operations require a UUID Idempotency-Key. Import accepts an encrypted FactoryVPN binary archive, up to the configured limit (maximum 512 MiB). A missing recent identity confirmation returns 428; maintenance returns 503.",
        "operationId": "download_api_v1_backups__backup_id__download_post",
        "parameters": [
          {
            "in": "path",
            "name": "backup_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Backup Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "summary": "Download",
        "tags": [
          "Backup and recovery"
        ]
      }
    },
    "/api/v1/devices/": {
      "post": {
        "description": "\n\nRequires gateways.manage within the caller's assigned groups, or global administration.",
        "operationId": "create_device_api_v1_devices__post",
        "parameters": [
          {
            "in": "header",
            "name": "if-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "If-Match"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Create Device",
        "tags": [
          "Devices"
        ],
        "x-required-permission": "gateways.manage"
      }
    },
    "/api/v1/devices/gateway/{gateway_id}": {
      "get": {
        "operationId": "list_devices_api_v1_devices_gateway__gateway_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "gateway_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Gateway Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 100,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "device_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "PLC",
                    "HMI",
                    "SERVER",
                    "OTHER"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Device Type"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DeviceResponse"
                  },
                  "title": "Response List Devices Api V1 Devices Gateway  Gateway Id  Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "X-Total-Count": {
                "description": "Total rows after authorization and filters, before pagination.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "List Devices",
        "tags": [
          "Devices"
        ]
      }
    },
    "/api/v1/gateways/": {
      "get": {
        "description": "Search scoped gateways by label, inventory identifiers, phone or exact UUID.\n\nX-Total-Count covers the same filtered scope before pagination. Availability\nand can_start are advisory; they neither reserve a peer nor prove it is online.\nNo session identifiers or identities of other technicians are returned.",
        "operationId": "list_gateways_api_v1_gateways__get",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 100,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "group_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Group Id"
            }
          },
          {
            "in": "query",
            "name": "status_filter",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "PENDING",
                    "ACTIVE",
                    "INACTIVE"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status Filter"
            }
          },
          {
            "in": "query",
            "name": "activation_mode",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "sms",
                    "wifi"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Activation Mode"
            }
          },
          {
            "in": "query",
            "name": "availability",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "available",
                    "busy",
                    "cleanup_pending",
                    "unconfigured"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Availability"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/GatewayCatalogResponse"
                  },
                  "title": "Response List Gateways Api V1 Gateways  Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "X-Total-Count": {
                "description": "Total rows after authorization and filters, before pagination.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "List Gateways",
        "tags": [
          "Gateways"
        ]
      }
    },
    "/api/v1/gateways/{gateway_id}": {
      "get": {
        "description": "Read scoped network data and advisory availability; invisible IDs return 404.\n\nThe current reservation is returned only to its owner or sessions.manage in\nits historical group. Other callers see availability without session details.",
        "operationId": "get_gateway_api_v1_gateways__gateway_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "gateway_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Gateway Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GatewayDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Get Gateway",
        "tags": [
          "Gateways"
        ]
      }
    },
    "/api/v1/gateways/{gateway_id}/system-info": {
      "get": {
        "operationId": "system_info_api_v1_gateways__gateway_id__system_info_get",
        "parameters": [
          {
            "in": "path",
            "name": "gateway_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Gateway Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SystemView"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "System Info",
        "tags": [
          "Gateway diagnostics"
        ]
      }
    },
    "/api/v1/gateways/{gateway_id}/technical-logs": {
      "get": {
        "description": "\n\nRequires logs.read within the caller's assigned groups, or global administration.",
        "operationId": "list_logs_api_v1_gateways__gateway_id__technical_logs_get",
        "parameters": [
          {
            "in": "path",
            "name": "gateway_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Gateway Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "source",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "agent",
                    "worker",
                    "api"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source"
            }
          },
          {
            "in": "query",
            "name": "severity",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "info",
                    "warning",
                    "error"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Severity"
            }
          },
          {
            "in": "query",
            "name": "component",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 16,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Component"
            }
          },
          {
            "in": "query",
            "name": "code",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 40,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Code"
            }
          },
          {
            "in": "query",
            "name": "session_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session Id"
            }
          },
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 100,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TechnicalLogView"
                  },
                  "title": "Response List Logs Api V1 Gateways  Gateway Id  Technical Logs Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "X-Total-Count": {
                "description": "Total rows after authorization and filters, before pagination.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "List Logs",
        "tags": [
          "Gateway diagnostics"
        ],
        "x-required-permission": "logs.read"
      }
    },
    "/api/v1/gateways/{gateway_id}/technical-logs.csv": {
      "get": {
        "description": "\n\nRequires logs.read within the caller's assigned groups, or global administration.",
        "operationId": "export_logs_api_v1_gateways__gateway_id__technical_logs_csv_get",
        "parameters": [
          {
            "in": "path",
            "name": "gateway_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Gateway Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "source",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "agent",
                    "worker",
                    "api"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Source"
            }
          },
          {
            "in": "query",
            "name": "severity",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "info",
                    "warning",
                    "error"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Severity"
            }
          },
          {
            "in": "query",
            "name": "component",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 16,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Component"
            }
          },
          {
            "in": "query",
            "name": "code",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 40,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Code"
            }
          },
          {
            "in": "query",
            "name": "session_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session Id"
            }
          },
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 100,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/csv": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "UTF-8 CSV attachment, limited to 10,000 authorized rows."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Export Logs",
        "tags": [
          "Gateway diagnostics"
        ],
        "x-required-permission": "logs.read"
      }
    },
    "/api/v1/groups/": {
      "get": {
        "operationId": "my_groups_api_v1_groups__get",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 100,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/GroupResponse"
                  },
                  "title": "Response My Groups Api V1 Groups  Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "My Groups",
        "tags": [
          "Groups"
        ]
      }
    },
    "/api/v1/provisioning/gateways": {
      "post": {
        "operationId": "provision_gateway_api_v1_provisioning_gateways_post",
        "parameters": [
          {
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GatewayProvisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Provision Gateway",
        "tags": [
          "Provisioning"
        ]
      }
    },
    "/api/v1/provisioning/jobs/{job_id}": {
      "get": {
        "operationId": "job_status_api_v1_provisioning_jobs__job_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Job Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Job Status",
        "tags": [
          "Provisioning"
        ]
      }
    },
    "/api/v1/provisioning/jobs/{job_id}/activate": {
      "post": {
        "operationId": "activate_api_v1_provisioning_jobs__job_id__activate_post",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Job Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Activate",
        "tags": [
          "Provisioning"
        ]
      }
    },
    "/api/v1/provisioning/jobs/{job_id}/cancel": {
      "post": {
        "operationId": "cancel_api_v1_provisioning_jobs__job_id__cancel_post",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Job Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Cancel",
        "tags": [
          "Provisioning"
        ]
      }
    },
    "/api/v1/provisioning/jobs/{job_id}/download": {
      "post": {
        "operationId": "download_api_v1_provisioning_jobs__job_id__download_post",
        "parameters": [
          {
            "in": "path",
            "name": "job_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Job Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Download",
        "tags": [
          "Provisioning"
        ]
      }
    },
    "/api/v1/provisioning/peers/gateway/{peer_id}/renew-certificate": {
      "post": {
        "operationId": "request_remote_renewal_api_v1_provisioning_peers_gateway__peer_id__renew_certificate_post",
        "parameters": [
          {
            "in": "path",
            "name": "peer_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Peer Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProvisioningState"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Request Remote Renewal",
        "tags": [
          "Provisioning"
        ]
      }
    },
    "/api/v1/provisioning/peers/{kind}/{peer_id}": {
      "get": {
        "operationId": "peer_state_api_v1_provisioning_peers__kind___peer_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "kind",
            "required": true,
            "schema": {
              "enum": [
                "gateway",
                "technician"
              ],
              "title": "Kind",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "peer_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Peer Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProvisioningState"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Peer State",
        "tags": [
          "Provisioning"
        ]
      }
    },
    "/api/v1/provisioning/peers/{kind}/{peer_id}/prepare": {
      "post": {
        "operationId": "prepare_api_v1_provisioning_peers__kind___peer_id__prepare_post",
        "parameters": [
          {
            "in": "path",
            "name": "kind",
            "required": true,
            "schema": {
              "enum": [
                "gateway",
                "technician"
              ],
              "title": "Kind",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "peer_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Peer Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Idempotency-Key",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Prepare",
        "tags": [
          "Provisioning"
        ]
      }
    },
    "/api/v1/provisioning/peers/{kind}/{peer_id}/revoke": {
      "post": {
        "operationId": "revoke_api_v1_provisioning_peers__kind___peer_id__revoke_post",
        "parameters": [
          {
            "in": "path",
            "name": "kind",
            "required": true,
            "schema": {
              "enum": [
                "gateway",
                "technician"
              ],
              "title": "Kind",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "peer_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Peer Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProvisioningState"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Revoke",
        "tags": [
          "Provisioning"
        ]
      }
    },
    "/api/v1/session-events": {
      "get": {
        "operationId": "list_events_api_v1_session_events_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "gateway_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Gateway Id"
            }
          },
          {
            "in": "query",
            "name": "session_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session Id"
            }
          },
          {
            "in": "query",
            "name": "group_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Group Id"
            }
          },
          {
            "in": "query",
            "name": "event_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 50,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Event Type"
            }
          },
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SessionEventResponse"
                  },
                  "title": "Response List Events Api V1 Session Events Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "X-Total-Count": {
                "description": "Total rows after authorization and filters, before pagination.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "List Events",
        "tags": [
          "Diagnostics"
        ]
      }
    },
    "/api/v1/session-events.csv": {
      "get": {
        "operationId": "export_events_api_v1_session_events_csv_get",
        "parameters": [
          {
            "in": "query",
            "name": "gateway_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Gateway Id"
            }
          },
          {
            "in": "query",
            "name": "session_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Session Id"
            }
          },
          {
            "in": "query",
            "name": "group_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Group Id"
            }
          },
          {
            "in": "query",
            "name": "event_type",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 50,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Event Type"
            }
          },
          {
            "in": "query",
            "name": "since",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Since"
            }
          },
          {
            "in": "query",
            "name": "until",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date-time",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Until"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/csv": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "UTF-8 CSV attachment, limited to 10,000 authorized rows."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Export Events",
        "tags": [
          "Diagnostics"
        ]
      }
    },
    "/api/v1/sessions/": {
      "get": {
        "description": "Search only owned sessions in visible historical groups.\n\nq matches the exact session/gateway UUID or a currently visible gateway's\nlabel, MAC or phone. reserved includes live sessions and unreleased resources.\nX-Total-Count applies all scope and search filters before pagination.",
        "operationId": "list_own_sessions_api_v1_sessions__get",
        "parameters": [
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 100,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "group_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Group Id"
            }
          },
          {
            "in": "query",
            "name": "gateway_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Gateway Id"
            }
          },
          {
            "in": "query",
            "name": "status_filter",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "REQUESTED",
                    "ACTIVE",
                    "CLOSED",
                    "EXPIRED",
                    "FAILED"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status Filter"
            }
          },
          {
            "in": "query",
            "name": "activation_mode",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "sms",
                    "wifi"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Activation Mode"
            }
          },
          {
            "in": "query",
            "name": "reserved",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Reserved"
            }
          },
          {
            "in": "query",
            "name": "cleanup_pending",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cleanup Pending"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SessionListResponse"
                  },
                  "title": "Response List Own Sessions Api V1 Sessions  Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "X-Total-Count": {
                "description": "Total rows after authorization and filters, before pagination.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "List Own Sessions",
        "tags": [
          "Sessions"
        ]
      },
      "post": {
        "description": "Request assistance using the gateway's configured activation mode.\n\nProvide exactly one of gateway_id or phone_number. HTTP 200 does not imply an\nactive VPN: inspect status, which may be REQUESTED or FAILED. Poll the detail\nuntil gateway_ready_at is set, connect the technician VPN, then wait for ACTIVE.\nSessions use the configured maximum (3 hours by default), bounded by the opening browser/SSO lifetime;\neach peer has one reserved session. Browser logout closes its associated VPNs.\nOptional Idempotency-Key (UUID) recovers the same request for this account,\nincluding terminal outcomes, without resending SMS. Changed input returns 409.",
        "operationId": "create_assistance_session_api_v1_sessions__post",
        "parameters": [
          {
            "in": "header",
            "name": "idempotency-key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionCreateResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "No VPN addresses available."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Create Assistance Session",
        "tags": [
          "Sessions"
        ]
      }
    },
    "/api/v1/sessions/expire-stale": {
      "post": {
        "description": "Expire stale sessions past their expiry time\n\nRequires an administrator account.",
        "operationId": "expire_stale_api_v1_sessions_expire_stale_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExpirationResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Expire Stale",
        "tags": [
          "Sessions"
        ],
        "x-required-role": "admin"
      }
    },
    "/api/v1/sessions/{session_id}": {
      "delete": {
        "description": "Close an authorized session, preserving an existing terminal state.\n\nThe response confirms the database state change. Network cleanup is asynchronous;\npoll the session detail until cleaned_at is set before reusing the peers.",
        "operationId": "terminate_session_api_v1_sessions__session_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Session Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Terminate Session",
        "tags": [
          "Sessions"
        ]
      },
      "get": {
        "description": "Read an owned session in a current group, or use sessions.manage in that group.\n\nGlobal administrators can read all sessions. Invisible sessions return 404.\ngateway_ready_at indicates gateway\nreadiness; ACTIVE also requires the technician VPN. cleaned_at confirms that\nnetwork resources have been released after a terminal state.",
        "operationId": "get_session_api_v1_sessions__session_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Session Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionDetailResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Get Session",
        "tags": [
          "Sessions"
        ]
      }
    },
    "/api/v1/sessions/{session_id}/diagnostics": {
      "get": {
        "operationId": "diagnostics_api_v1_sessions__session_id__diagnostics_get",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Session Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiagnosticsResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Diagnostics",
        "tags": [
          "Diagnostics"
        ]
      }
    },
    "/api/v1/sessions/{session_id}/wake": {
      "post": {
        "description": "Retry a live SMS session, at most once per 60 seconds across all callers.\n\nAttempts count even when the provider rejects the SMS or the response is lost.\nRetry-After reports the remaining cooldown; retries never extend the session.",
        "operationId": "resend_activation_api_v1_sessions__session_id__wake_post",
        "parameters": [
          {
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Session Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionCreateResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "description": "Another SMS attempt was reserved within the last 60 seconds.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "minimum": 1,
                  "type": "integer"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Resend Activation",
        "tags": [
          "Sessions"
        ]
      }
    },
    "/api/v1/telemetry/gateways": {
      "get": {
        "description": "\n\nRequires telemetry.read within the caller's assigned groups, or global administration.",
        "operationId": "list_gateways_api_v1_telemetry_gateways_get",
        "parameters": [
          {
            "in": "query",
            "name": "group_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Group Id"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 100,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 100,
              "maximum": 1000,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/TelemetryView"
                  },
                  "title": "Response List Gateways Api V1 Telemetry Gateways Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response",
            "headers": {
              "X-Total-Count": {
                "description": "Total rows after authorization and filters, before pagination.",
                "schema": {
                  "minimum": 0,
                  "type": "integer"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "List Gateways",
        "tags": [
          "Telemetry"
        ],
        "x-required-permission": "telemetry.read"
      }
    },
    "/api/v1/telemetry/gateways/{gateway_id}": {
      "get": {
        "description": "\n\nRequires telemetry.read within the caller's assigned groups, or global administration.",
        "operationId": "gateway_status_api_v1_telemetry_gateways__gateway_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "gateway_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Gateway Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryView"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Gateway Status",
        "tags": [
          "Telemetry"
        ],
        "x-required-permission": "telemetry.read"
      }
    },
    "/api/v1/telemetry/gateways/{gateway_id}/history": {
      "get": {
        "description": "\n\nRequires telemetry.read within the caller's assigned groups, or global administration.",
        "operationId": "gateway_history_api_v1_telemetry_gateways__gateway_id__history_get",
        "parameters": [
          {
            "in": "path",
            "name": "gateway_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Gateway Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "period",
            "required": false,
            "schema": {
              "default": "24h",
              "enum": [
                "1h",
                "24h",
                "7d",
                "30d"
              ],
              "title": "Period",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryHistory"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource not found or session not visible to this user."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Gateway History",
        "tags": [
          "Telemetry"
        ],
        "x-required-permission": "telemetry.read"
      }
    },
    "/api/v1/telemetry/server": {
      "get": {
        "description": "\n\nRequires an administrator account.",
        "operationId": "server_status_api_v1_telemetry_server_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryView"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Server Status",
        "tags": [
          "Telemetry"
        ],
        "x-required-role": "admin"
      }
    },
    "/api/v1/telemetry/server/history": {
      "get": {
        "description": "\n\nRequires an administrator account.",
        "operationId": "server_history_api_v1_telemetry_server_history_get",
        "parameters": [
          {
            "in": "query",
            "name": "period",
            "required": false,
            "schema": {
              "default": "24h",
              "enum": [
                "1h",
                "24h",
                "7d",
                "30d"
              ],
              "title": "Period",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TelemetryHistory"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          },
          {
            "PortalCookie": []
          }
        ],
        "summary": "Server History",
        "tags": [
          "Telemetry"
        ],
        "x-required-role": "admin"
      }
    },
    "/api/v1/web/email": {
      "get": {
        "description": "\n\nSame-origin portal endpoint. No Bearer tokens are returned. Requires an authenticated portal session. Mutations require Origin and X-CSRF-Token.",
        "operationId": "status_api_v1_web_email_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailStatus"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          }
        },
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "summary": "Status",
        "tags": [
          "Email verification"
        ]
      }
    },
    "/api/v1/web/email/confirm": {
      "post": {
        "description": "\n\nSame-origin portal endpoint. No Bearer tokens are returned. Requires an authenticated portal session. Mutations require Origin and X-CSRF-Token.",
        "operationId": "confirm_api_v1_web_email_confirm_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BackupReauthentication"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/EmailChallengeResponse"
                    },
                    {
                      "$ref": "#/components/schemas/EmailComplete"
                    }
                  ],
                  "title": "Response Confirm Api V1 Web Email Confirm Post"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired, consumed or exhausted console access code."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Email verification or mail delivery is unavailable on the email path."
          }
        },
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "summary": "Confirm",
        "tags": [
          "Email verification"
        ]
      }
    },
    "/api/v1/web/email/resend": {
      "post": {
        "description": "\n\nSame-origin portal endpoint. No Bearer tokens are returned. Requires an authenticated portal session. Mutations require Origin and X-CSRF-Token.",
        "operationId": "resend_api_v1_web_email_resend_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailResend"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailChallengeResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "summary": "Resend",
        "tags": [
          "Email verification"
        ]
      }
    },
    "/api/v1/web/email/start": {
      "post": {
        "description": "\n\nSame-origin portal endpoint. No Bearer tokens are returned. Requires an authenticated portal session. Mutations require Origin and X-CSRF-Token.",
        "operationId": "start_api_v1_web_email_start_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailStart"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailChallengeResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "summary": "Start",
        "tags": [
          "Email verification"
        ]
      }
    },
    "/api/v1/web/email/verify": {
      "post": {
        "description": "\n\nSame-origin portal endpoint. No Bearer tokens are returned. Requires an authenticated portal session. Mutations require Origin and X-CSRF-Token.",
        "operationId": "verify_api_v1_web_email_verify_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailProof"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/WebSessionResponse"
                    },
                    {
                      "$ref": "#/components/schemas/EmailChallengeResponse"
                    },
                    {
                      "$ref": "#/components/schemas/EmailComplete"
                    }
                  ],
                  "title": "Response Verify Api V1 Web Email Verify Post"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "summary": "Verify",
        "tags": [
          "Email verification"
        ]
      }
    },
    "/api/v1/web/login": {
      "post": {
        "description": "\n\nSame-origin portal endpoint. No Bearer tokens are returned. Requires Origin and X-FactoryVPN-Portal: 1.",
        "operationId": "login_api_v1_web_login_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/WebSessionResponse"
                    },
                    {
                      "$ref": "#/components/schemas/EmailChallengeResponse"
                    }
                  ],
                  "title": "Response Login Api V1 Web Login Post"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired, consumed or exhausted console access code."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Email verification or mail delivery is unavailable on the email path."
          }
        },
        "security": [],
        "summary": "Login",
        "tags": [
          "Portal authentication"
        ]
      }
    },
    "/api/v1/web/login/resend": {
      "post": {
        "description": "\n\nSame-origin portal endpoint. No Bearer tokens are returned. Requires the verification cookie issued by /web/login and the challenge_token in the request body, plus Origin and X-FactoryVPN-Portal: 1. No authenticated portal session or CSRF token is required.",
        "operationId": "resend_login_api_v1_web_login_resend_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailResend"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmailChallengeResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid or expired challenge, code or browser binding."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Email verification locked, resend cooldown or sending limit reached."
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Email verification or mail delivery is unavailable."
          }
        },
        "security": [
          {
            "VerificationCookie": []
          }
        ],
        "summary": "Resend Login",
        "tags": [
          "Portal authentication"
        ]
      }
    },
    "/api/v1/web/login/verify": {
      "post": {
        "description": "\n\nSame-origin portal endpoint. No Bearer tokens are returned. Requires the verification cookie issued by /web/login and the challenge_token in the request body, plus Origin and X-FactoryVPN-Portal: 1. No authenticated portal session or CSRF token is required.",
        "operationId": "verify_login_api_v1_web_login_verify_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailProof"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebSessionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid or expired challenge, code or browser binding."
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Email verification locked, resend cooldown or sending limit reached."
          }
        },
        "security": [
          {
            "VerificationCookie": []
          }
        ],
        "summary": "Verify Login",
        "tags": [
          "Portal authentication"
        ]
      }
    },
    "/api/v1/web/logout": {
      "post": {
        "description": "\n\nSame-origin portal endpoint. No Bearer tokens are returned. Requires Origin. With a portal cookie, even expired or revoked, X-CSRF-Token is required. Without that cookie, X-FactoryVPN-Portal: 1 is required instead.",
        "operationId": "logout_api_v1_web_logout_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogoutResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          }
        },
        "security": [
          {},
          {
            "PortalCookie": []
          }
        ],
        "summary": "Logout",
        "tags": [
          "Portal authentication"
        ]
      }
    },
    "/api/v1/web/logout-all": {
      "post": {
        "description": "\n\nSame-origin portal endpoint. No Bearer tokens are returned. Requires an authenticated portal session. Mutations require Origin and X-CSRF-Token.",
        "operationId": "global_logout_api_v1_web_logout_all_post",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogoutResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          }
        },
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "summary": "Global Logout",
        "tags": [
          "Portal authentication"
        ]
      }
    },
    "/api/v1/web/password": {
      "post": {
        "description": "\n\nSame-origin portal endpoint. No Bearer tokens are returned. Requires an authenticated portal session. Mutations require Origin and X-CSRF-Token.",
        "operationId": "password_api_v1_web_password_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordChangeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebSessionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "summary": "Password",
        "tags": [
          "Portal authentication"
        ]
      }
    },
    "/api/v1/web/session": {
      "get": {
        "description": "\n\nSame-origin portal endpoint. No Bearer tokens are returned. Requires an authenticated portal session. Mutations require Origin and X-CSRF-Token.",
        "operationId": "session_api_v1_web_session_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebSessionResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          }
        },
        "security": [
          {
            "PortalCookie": []
          }
        ],
        "summary": "Session",
        "tags": [
          "Portal authentication"
        ]
      }
    },
    "/api/v1/web/sso/start": {
      "post": {
        "description": "\n\nSame-origin portal endpoint. No Bearer tokens are returned. Requires Origin and X-FactoryVPN-Portal: 1. Initial login needs no session. When reauthenticate=true, an authenticated global SSO administrator's portal session and X-CSRF-Token are also required.",
        "operationId": "sso_start_api_v1_web_sso_start_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebSSORequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SSOStartResponse"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Invalid, expired or revoked credentials, or an inactive account."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Missing or malformed authentication, insufficient permissions, or a failed portal Origin/header/CSRF check."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIError"
                }
              }
            },
            "description": "Resource conflict, occupied peers, pending cleanup or incompatible operation."
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {},
          {
            "PortalCookie": []
          }
        ],
        "summary": "Sso Start",
        "tags": [
          "Portal authentication"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Placeholder: replace with your API origin",
      "url": "https://vpn-api.example.com"
    }
  ],
  "tags": [
    {
      "description": "JSON login and current identity. Registration requires an administrator.",
      "name": "Authentication"
    },
    {
      "description": "Request assistance with connect in an assigned group. Read and close owned sessions, or use sessions.manage within their historical group.",
      "name": "Sessions"
    },
    {
      "description": "Session observations, lifecycle history and CSV exports, restricted to the session owner's current historical group or sessions.manage.",
      "name": "Diagnostics"
    },
    {
      "description": "Discover gateways in assigned groups using a user bearer token.",
      "name": "Gateways"
    },
    {
      "description": "Read group-scoped inventory; mutations require gateways.manage.",
      "name": "Devices"
    },
    {
      "description": "Group-scoped administration with granular permissions; global administrators can manage all resources.",
      "name": "Admin"
    },
    {
      "description": "Resource groups and explicitly authorized membership.",
      "name": "Groups"
    }
  ]
}
