GET /cn/:cn/data_stream/sessionId/:sessionId - Use persistent web socket to all your devices
Resumes to the WebSocket session which has already been created. If there are undelivered messages at Kaltiot Smart IoT, those will be delivered once websocket connection has been established. Data comes as array of JSON objects.
Request Parameters
Parameter | DataType | Description |
---|---|---|
cn | string | Common Name, Identifier which is common for all your device |
sessionId | String | SessionId which gives ability to join existing web socket session and get all offline messages since websocket session has been created. You can get sessionId parameter for doing POST /cn/:cn/data_stream |
Response Status Codes
Server will return 101 http code if WebSocket connection was accepted by server
For error cases see: Error Status Codes
Response Data Parameters
Parameter | Datatype | Description |
---|---|---|
rid | string | Unique identifier to your device |
timestamp | number | time in milliseconds from Jan 1970 UTC |
payload_type | string | enumeration data type for the payload. Possible values: STRING, INT, BINARY |
payload | depends on payload_type parameter | This is data object which IoT devices publishes. Can be everything as long as it comforts JSON standard |