Create an input
POST/v1/streams/inputs
const url = 'https://api.ligr.live/rest/v1/streams/inputs';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"OB van 1","latencyMs":1000}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.ligr.live/rest/v1/streams/inputs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "OB van 1", "latencyMs": 1000 }'Creates an input. LIGR generates the host, the application name and the stream key. Send
your picture to rtmpUrl with streamKey, or to srtUrl. A pull input reads sourceUrl
instead.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”LIGR generates the host, the application name and the stream key.
object
Default default, a push endpoint.
Required for a pull input. The RTMP or SRT URL LIGR pulls.
Receive latency in milliseconds. One of 20, 50, 100, 150, 250, 350, 500, 1000, 1500, 2000, 2500, 3000. Default 1000.
Example
{ "name": "OB van 1", "latencyMs": 1000}Responses
Section titled “Responses”Created
An input of the organization. A default input is a push endpoint LIGR hosts: send RTMP to
rtmpUrl with streamKey, or SRT to srtUrl. A pull input reads sourceUrl.
object
Entity identifier
RTMP ingest URL. Publish with streamKey as the stream key.
SRT ingest URL, stream id included.
For a pull input: the URL LIGR pulls.
Receive latency in milliseconds.
Example
{ "type": "default"}Request is invalid
object
object
Examplegenerated
{ "message": "example", "details": { "additionalProperty": "example" }}Missing or invalid api key
object
Examplegenerated
{ "message": "example"}Api key provides insufficient access for the request
object
Examplegenerated
{ "message": "example"}Input not found
object
Examplegenerated
{ "message": "example"}Api key has made too many requests
object
Examplegenerated
{ "message": "example"}An unexpected error has occured. If problems persist please contact support
object
Examplegenerated
{ "message": "example"}