The device's turn channel (interactive streams)

Server-sent events for the device: which turn to serve. A `turn` event with the whole state at once and at every change (a turn minted, ended or expired), a comment every 2 s otherwise: `{"turn": {"turn_id", "exp", "expires_at", "secs_left", "device"}}` or `{"turn": null}`, and `{"turn": null, "stream": "gone"}` before it ends when the stream is deleted. The device serves the turn named and no other, and ends it when the channel says null, ends, or goes quiet (fail closed); nearglass-pub's `turns::follow_broadcast` does this. The publisher descriptor names it (`turns_url`). Takes the stream's own publisher token, or a secret key.

GET
/v1/streams/{id}/turns

Server-sent events for the device: which turn to serve. A turn event with the whole state at once and at every change (a turn minted, ended or expired), a comment every 2 s otherwise: {"turn": {"turn_id", "exp", "expires_at", "secs_left", "device"}} or {"turn": null}, and {"turn": null, "stream": "gone"} before it ends when the stream is deleted. The device serves the turn named and no other, and ends it when the channel says null, ends, or goes quiet (fail closed); nearglass-pub's turns::follow_broadcast does this. The publisher descriptor names it (turns_url). Takes the stream's own publisher token, or a secret key.

Authorization

headerAuthorizationBearer <token>

the stream's publisher token

Path Parameters

id*string

Response Body

the event stream

response?stringtext/event-stream
Example Request
curl -X GET 'https://api.nearglass.com/v1/streams/st_8f2c41d09a7be3105c6e2d77/turns'
Example Response
"string"