Nearglass

Seats, line and turns now

GET
/v1/streams/{id}/stats

Authorization

secretKey
headerAuthorizationBearer <token>

sk_...

Path Parameters

id*string

Response Body

counts

application/json
  1. response
viewers?
seats_with_tokens?integer
turns?integer
ingest_token_at?|

when the gateway last took a token for this stream (once per relay connection: it stays set after an encoder stops; see ingest.live)

Formatdate-time
ingest?

The encoder ingest as the gateway sees it, from its report at every key sync (3 s). Every field is null when the API cannot tell: the stream takes no encoder ingest (ingest sdk only: an SDK publisher is not seen here), or no gateway has reported for 15 s. Not kept across an API restart (known again within one sync).

Example Request
curl -X GET 'https://api.nearglass.com/v1/streams/st_8f2c41d09a7be3105c6e2d77/stats'
Example Response
{  "viewers": {    "seats": 0,    "queued": 0,    "cap": 0,    "queue_max": 0,    "peak": 0,    "hls": 0  },  "seats_with_tokens": 0,  "turns": 0,  "ingest_token_at": "2019-08-24T14:15:22Z",  "ingest": {    "live": true,    "since": "2019-08-24T14:15:22Z",    "width": 0,    "height": 0,    "fps": 0,    "kbps": 0,    "reconnects": 0  }}