Nearglass

Create a stream

The stream key is in the answer once, and never again (rotate it to get a new one).

POST
/v1/streams

The stream key is in the answer once, and never again (rotate it to get a new one).

Authorization

secretKey
headerAuthorizationBearer <token>

sk_...

Request Body

application/json
  1. body
name*string
Length1 <= length <= 100
namespace?string

default /; 1 to 8 segments of [A-Za-z0-9._-], not under control/

mode?string
Default"broadcast"
Value in"broadcast""interactive"
ingest?array<>
Default
[  "rtmp",  "srt"]
viewer_cap?integer

seats; viewer_cap plus queue_max over every stream is at most 20000

Range1 <= value
Default100
queue_max?integer

default twice the cap

admission?string
Default"server"
Value in"server""public"
max_kbps?integer

a bitrate limit in kbit/s (0: none), recorded with the stream and passed to the ingest gateway; not enforced yet: a higher bitrate is accepted

Default0

Response Body

created

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 POST 'https://api.nearglass.com/v1/streams' \  -H 'Content-Type: application/json' \  -d '{  "name": "Friday auction",  "ingest": [    "srt",    "rtmp"  ],  "viewer_cap": 500,  "admission": "server"}'
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"    }  }}