Pearl REST API list inputs and create network inputs
Inputs are the audio and video sources available to a Pearl device, each with a source ID (sid). Physical inputs exist as soon as the hardware does; network inputs are created through the API.
Applies to: Pearl-2, Pearl Mini, Pearl Nexus, Pearl Nano.
GET /api/v2.0/inputs
GET /api/v2.0/inputs?types=embedded,usb
GET /api/v2.0/inputs?ids=SRT1,RTSP1
Each entry returns id, name (the user-defined name, 1 to 128 characters), real_device_name (the default device name), audio and video flags, and type.
Input types are embedded, usb, rtsp, ndi, srt, and web-graphics.
Device differences
- Pearl Nano uses
hdmias its HDMI source ID. - Pearl-2, Pearl Mini, and Pearl Nexus use
hdmi-aas their HDMI source ID. - Pearl Nano, Pearl Mini, and Pearl Nexus use
sdias their SDI source ID. - Pearl-2 exposes 4K inputs as
hdmi4k-aandsdi4k-a. - Pearl-2, Pearl Mini, and Pearl Nexus expose two analog audio inputs,
analog-aandanalog-b. - Pearl Nano exposes a single analog audio input,
analog. - Pearl Nano does not support NDI or NDI|HX inputs or streaming.
- Pearl Nano supports only SRT and RTSP network inputs, one at a time.
Network inputs are named by type and index, such as SRT1, RTSP1, NDI1, and WEBG1. USB inputs use IDs such as USBA.
Creating a network input.
POST /api/v2.0/inputs
Send a body containing type, an optional name, and a settings object. Only network input types can be created this way: rtsp, srt, ndi, and web-graphics.
{
"type": "srt",
"name": "New SRT Listener",
"settings": {
"srt": { "mode": "listener", "port": 1029, "latency": 83, "encryption": null },
"audio": { "delay": 0 },
"video": { "nosignal": { "image": "", "timeout": 8 } }
}
}
A successful creation returns HTTP 201 with the new source ID in result, for example SRT1.
Errors. A missing or invalid type returns 400. An input type that is not allowed to be created returns 405 with the message Input type is not allowed. Reaching the device limit returns 409 with the message The maximum number of allowed network inputs is reached. An unexpected failure returns 500.