Nearglass

Change a stream's name, seats, line or admission

Any of the fields; the others stay. The checks are create's: `viewer_cap` at least 1 and at most the tenant's (409 `tenant_viewer_cap`), `viewer_cap` plus `queue_max` at most 20000, and seats and places in line across every stream at most 20000 (409 `too_many_places`). Setting `viewer_cap` alone keeps `queue_max`. Lowering the cap below the viewers seated keeps them in (their tokens keep refreshing) and seats nobody new until they are under it; an offer the new cap cannot keep is withdrawn and its page stays first in line. A lowered `queue_max` keeps the pages in line and takes nobody new until under it. Changing `admission` changes only how new viewers are admitted; held seats keep working. Namespace, mode, ingest and `max_kbps` cannot be changed (create a new stream).

PATCH
/v1/streams/{id}

Any of the fields; the others stay. The checks are create's: viewer_cap at least 1 and at most the tenant's (409 tenant_viewer_cap), viewer_cap plus queue_max at most 20000, and seats and places in line across every stream at most 20000 (409 too_many_places). Setting viewer_cap alone keeps queue_max. Lowering the cap below the viewers seated keeps them in (their tokens keep refreshing) and seats nobody new until they are under it; an offer the new cap cannot keep is withdrawn and its page stays first in line. A lowered queue_max keeps the pages in line and takes nobody new until under it. Changing admission changes only how new viewers are admitted; held seats keep working. Namespace, mode, ingest and max_kbps cannot be changed (create a new stream).

Authorization

secretKey
headerAuthorizationBearer <token>

sk_...

Path Parameters

id*string

Request Body

application/json
  1. body
name?string
Length1 <= length <= 100
viewer_cap?integer
Range1 <= value
queue_max?integer
Range0 <= value
admission?string
Value in"server""public"

Response Body

the stream, and where to publish (without the key)

application/json
  1. response
id?string
name?string
namespace?string
mode?string
Value in"broadcast""interactive"
ingest?array<string>
viewer_cap?integer
queue_max?integer
admission?string
Value in"server""public"
max_kbps?integer

as given at creation; recorded, not enforced yet

has_stream_key?boolean
created_at?string
Formatdate-time
publish?
Example Request
curl -X PATCH 'https://api.nearglass.com/v1/streams/st_8f2c41d09a7be3105c6e2d77' \  -H 'Content-Type: application/json' \  -d '{  "viewer_cap": 500}'
Example Response
{  "id": "string",  "name": "string",  "namespace": "string",  "mode": "broadcast",  "ingest": [    "string"  ],  "viewer_cap": 0,  "queue_max": 0,  "admission": "server",  "max_kbps": 0,  "has_stream_key": true,  "created_at": "2019-08-24T14:15:22Z",  "publish": {    "stream_key": "string",    "rtmp": "string",    "srt": "string",    "rtmp_server": "string",    "srt_server": "string",    "sdk": {      "relays": [        "string"      ],      "namespace": "string",      "token_endpoint": "string"    }  }}