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).
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).
secretKeyAuthorizationBearer <token>sk_...
id*stringapplication/json- body
name?string1 <= length <= 100viewer_cap?integer1 <= valuequeue_max?integer0 <= valueadmission?string"server""public"the stream, and where to publish (without the key)
application/json- response
id?stringname?stringnamespace?stringmode?string"broadcast""interactive"ingest?array<string>viewer_cap?integerqueue_max?integeradmission?string"server""public"max_kbps?integeras given at creation; recorded, not enforced yet
has_stream_key?booleancreated_at?stringdate-timepublish?curl -X PATCH 'https://api.nearglass.com/v1/streams/st_8f2c41d09a7be3105c6e2d77' \ -H 'Content-Type: application/json' \ -d '{ "viewer_cap": 500}'{ "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" } }}Delete a stream DELETE
Stops admitting at once: no more tokens of any role, the gateway drops its key at its next sync (3 s) and ends the live ingest session, and every token id the stream still has a session on (seats, turns, publishers) is closed at the relay through its admin port.
Rotate the stream key POST
The old key stops working; its live ingest session ends (the gateway's next sync, and its publisher token is closed at the relay).