Nearglass

Control API

Every route of the Nearglass control API at https://api.nearglass.com, generated from its OpenAPI file.

Keys go in Authorization: Bearer <key>. Request bodies are JSON.

Streams

Method and pathKeyWhat
GET /v1/streamssk_...List streams
POST /v1/streamssk_...Create a stream
GET /v1/streams/{id}sk_...Read a stream
DELETE /v1/streams/{id}sk_...Delete a stream
PATCH /v1/streams/{id}sk_...Change a stream's name, seats, line or admission
POST /v1/streams/{id}/stream-keysk_...Rotate the stream key
GET /v1/streams/{id}/statssk_...Seats, line and turns now

Tokens

Method and pathKeyWhat
POST /v1/streams/{id}/publisher-tokenssk_...A token for an SDK publisher (nearglass-pub, nearglass.h)
POST /v1/streams/{id}/viewer-tokenssk_...A seat and its viewer token (server admission), or a place in line
POST /v1/streams/{id}/controller-tokenssk_...A driver's turn (interactive streams)
DELETE /v1/streams/{id}/controller-tokens/{turn_id}sk_...End a turn

Admission

Method and pathKeyWhat
DELETE /v1/streams/{id}/viewers/{seat}sk_...Kick a viewer
POST /v1/play/{id}/admitpk_...The public waiting room (a page, publishable key)
POST /v1/play/{id}/tokennoneA fresh viewer token for a seated page (a reconnect)
POST /v1/play/{id}/hbnoneKeep the seat (every 5 s; a hidden tab as often as the browser lets it)
POST /v1/play/{id}/leavenoneGive the seat (or the place in line) up now
GET /v1/play/{id}/hls/{file}noneThe stream's LL-HLS, for a held seat

Tenants

Method and pathKeyWhat
POST /v1/tenant/secret-keyssk_...A new secret key for your tenant (at most 4; revoke_others rotates)
POST /v1/tenant/publishable-keyssk_...A new publishable key for your tenant (at most 4; revoke_others rotates)
GET /v1/tenantsk_...Your tenant (limits, relay scope, public key, this month's spend)
PATCH /v1/tenantsk_...Set your monthly spending cap or webhook

Usage

Method and pathKeyWhat
GET /v1/usagesk_...Viewer-hours and bytes per day and per stream, and this month's spend

Fleet

Method and pathKeyWhat
GET /v1/statusnoneThe public status, as JSON
GET /statusnoneThe public status page (HTML, refreshed from /v1/status every 5 s)

Service

Method and pathKeyWhat
GET /v1/healthnoneLiveness
GET /v1/issuernoneThe token issuer's public key, for the relay's scope config

On this page