---
title: WebSocket
description: >-
  Обновления статуса в реальном времени через WebSocket. Подключитесь один раз к
  <code>ws://<panel>/ws</code>, чтобы получать поток JSON-сообщений без
  опроса. Требуется аутентифицированный сессионный cookie (авторизация по токену
  Bearer не поддерживается). У каждого сообщения есть поле <code>type</code>,
  которое определяет структуру полезной нагрузки.
full: true
_openapi:
  preload:
    - ./public/openapi.json
  toc:
    - depth: 2
      title: >-
        Upgrade an HTTP connection to a WebSocket. Requires an authenticated
        session cookie (Bearer token auth is not supported here). Returns 101
        Switching Protocols on success. The server then pushes JSON messages
        described below.
      url: >-
        #upgrade-an-http-connection-to-a-websocket-requires-an-authenticated-session-cookie-bearer-token-auth-is-not-supported-here-returns-101-switching-protocols-on-success-the-server-then-pushes-json-messages-described-below
  structuredData:
    headings:
      - content: >-
          Upgrade an HTTP connection to a WebSocket. Requires an authenticated
          session cookie (Bearer token auth is not supported here). Returns 101
          Switching Protocols on success. The server then pushes JSON messages
          described below.
        id: >-
          upgrade-an-http-connection-to-a-websocket-requires-an-authenticated-session-cookie-bearer-token-auth-is-not-supported-here-returns-101-switching-protocols-on-success-the-server-then-pushes-json-messages-described-below
    contents: []
---

{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}

export default function Layout(props) {
  const { APIPage, OpenAPIPage } = props.components ?? {};
  // "APIPage" is the old name from v10, this allows both for backward compatibility
  const Comp = OpenAPIPage ?? APIPage;
  return (
    <>
      {props.children}
      <Comp document="./public/openapi.json" webhooks={[]} operations={[{"path":"/ws","method":"get"}]} showTitle />
    </>
  );
}