send_ws_command#

MonitorApi.send_ws_command(command, max_messages=1)#

Send a command to the monitor WebSocket endpoint and collect messages.

Return type:

list[MonitorMessage]

Parameters:
commanddict[str, Any]

Command payload to send over the WebSocket connection.

max_messagesint or None, optional

Maximum number of response messages to collect. The default is 1.

Returns:
list[MonitorMessage]

List of messages received in response to the command.