All JSON responses are encapsulated within a status structure.
Success:
{ status: 'success', data: $data }
Errors:
{ status: 'error', message: 'error string' }
The WebSocket command interface is based on a tag system.
The format of a command is:
$tag COMMAND [optional=parameters, ...]
Once a connection is upgraded to a websocket, the following text based commands are available.
The graphdata URI allows streaming and retrieval of statistics over a single websockets connection.
The subscribe command subscribes a WebSocket to receive periodic statistical updates. The $tag value will be used while streaming statistics (see OTSJsonStats).
Command format:
$tag SUBSCRIBE <$type=$item> [$type2=$item2] [$typeX=$itemX]
The value for tag:
Possible values for type:
WIP
Command format:
$tag UNSUBSCRIBE