heartbeat_enable
Using this method, you can enable heartbeat events streaming to a specific client.
Parameter | Type | Description |
---|---|---|
client_id | integer | Optional. In the case of a single client, this defaults to 0 . This ID can be used to access data via http://localhost:7783/event-stream?id=1 |
config | object | Optional. A standard StreamingConfig object. |
The client defines its own id when opening a connection to the stream, and each client_id can only be viewed by a single client (i.e. the ?id=
url param won't work in more than one browser tab).
Parameter | Type | Description |
---|---|---|
streamer_id | string | An identifier for the data stream. This can be used later to disable streaming for the event with stream::disable. |
POST
heartbeat_enable{
"userpass": "RPC_UserP@SSW0RD",
"method": "stream::heartbeat::enable",
"mmrpc": "2.0",
"params": {
"config": {
"stream_interval_seconds": 30
},
"client_id": 1
}
}
Here is an example of the stream data you should be able to see in http://localhost:7783/event-stream?id=1 at each heatbeat:
data: {"_type":"HEARTBEAT","message":{}}