@@ -412,3 +412,35 @@ and generate the text output locally without repeatedly reloading the text
412412buffer with each buffer update as in the case of ``/console_output `` API. ::
413413
414414 http GET http://localhost:60610/api/console_output_update last_msg_uid=<last-message-uid>
415+
416+
417+ WebSockets for streaming System Info and Console Output
418+ -------------------------------------------------------
419+
420+ The following WebSockets are currently implemented:
421+
422+ - ``/console_output/ws `` - streaming of console output;
423+
424+ - ``/info/ws `` - streaming of system info messages from RE Manager;
425+
426+ - ``/status/ws `` - streaming of status messages from RE Manager. Status messages are sent each
427+ time status is updated at RE Manager or at least once per second. Check status UID (part of
428+ RE Manager status) to detect changes in status.
429+
430+ For example, the console output stream may be received by connecting to the socket with
431+ ``ws://localhost:60610/api/console_output/ws `` URI.
432+
433+ Currently ``/info/ws `` and ``/status/ws `` sockets are streaming the same sequence of RE Manager
434+ status messages. Additional messages may be added to the system info stream in the future.
435+
436+ Message format for console output messages::
437+
438+ {"time": <timestamp>, "msg": <output-text>}
439+
440+ Message format for system info messages::
441+
442+ {"time": <timestamp>, "msg": {<msg-class>: <msg-content>}}
443+
444+ For example, the following format is used for status messages::
445+
446+ {"time": <timestamp>, "msg": {"status": {<RE-Manager-status>}}}
0 commit comments