GET /rids/:rid/data_stream/sessionId/:sessionId - Use Persistent web socket to single device
Resumes to the WebSocket session which has already been created. If there are undelivered messages at Kaltiot Smart Cloud, those will be delivered once websocket connection has been established. Data comes as array of JSON objects
Request Parameters
Parameter | DataType | Description |
---|---|---|
rid | string | Resource Identifier |
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 /rids/:rid/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 | resource identifier |
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 |