API
Last updated
Last updated
2024 @ NDI Vizrt AB.
All API calls use GET and or POST requests to retrieve and set values. Every response from a GET or POST request use the same structure. The response is in JSON format and includes a true / false field to indicate success, an error field to provide more detailed information if there is an error, and a content field that contains either the current value of the setting or a message detailing what action the request performed.
{"success":true,"error":null,"content":0}
In addition to this document, the web interface provides a full list of API calls and their use cases.
When SSL is enabled you must include a valid API key in the header of your request. It key in the header should be named x-api-key
and the value should be the API key you issued starting with NDI-. Here is some example C# code for sending GET and POST requests with SSL where API KEY
is a string value containing the NDI- prefixed key:
The following subsections detail each API endpoint available in NDI Bridge Service:
Get or set whether to start join or host on service start-up. Will always return the latest auto start value. The service must be restarted to reflect this change.
value
String
(required) 0, 1 or 2 where 0 = None, 1
= Host, and 2 = Join
If provided on a
POST request, the Bridge Service auto start mode will be
set.
GET URL: http://localhost:8080/api/auto_start POST URL: http://localhost:8080/api/auto_start
EXAMPLE POST CONTENT: {"value":"0"}
Gets the list of available GPUs.
GET URL: http://localhost:8080/api/gpu_list
Get the current host bandwidth message.
GET URL: http://localhost:8080/api/host/bandwidth_message
Get or set the host bridge name. Will always return the latest host bridge name.
value
String
(required) Any string value.
If provided on a
POST request, the host bridge name
will be set.
GET URL: http://localhost:8080/api/host/bridge_name
POST URL: http://localhost:8080/api/host/bridge_name
EXAMPLE POST CONTENT: {"value":"My Bridge Host"}
Get or set the host buffer value. Will always return the latest host buffer value.
value
String
(optional) A buffer length value from 0-
3000.
Buffer length value
in the range of 0-3000. If pro- vided on a POST request, the host buffer length value
will be set.
GET URL: http://localhost:8080/api/host/buffer POST URL: http://localhost:8080/api/host/buffer
EXAMPLE POST CONTENT: {"value":"0"}
Clears the host encryption key on POST.
POST URL: http://localhost:8080/api/host/clear_encryption_key EXAMPLE POST CONTENT: {}
Gets a boolean to represent if the host has reached its GPU encoding limits or not.
GET URL: http://localhost:8080/api/host/gpu_limit
Get or set the host groups to share. Will always return the latest host groups.
value
String
(required) A comma delineated list of
group names.
If provided on a
POST request, the host groups will be
set.
GET URL: http://localhost:8080/api/host/groups POST URL: http://localhost:8080/api/host/groups
EXAMPLE POST CONTENT: {"value":"public,test group"}
Get or set the host HX encoder. Will always return the latest host HX encoder value.
value
String
(required) 0 or 1 where 0 = h.264, 1 =
HEVC (h.265)
If provided on a
POST request, the host HX encoder
type will be set.
GET URL: http://localhost:8080/api/host/hx_encoder POST URL: http://localhost:8080/api/host/hx_encoder
EXAMPLE POST CONTENT: {"value":"0"}
Get or set the host HX GPU. Will always return the latest host HX GPU.
value
String
(required) The name of the GPU. Use
’Auto’ to automatically select a GPU.
If provided on a
POST request, the host HX GPU will
be set.
GET URL: http://localhost:8080/api/host/hx_gpu POST URL: http://localhost:8080/api/host/hx_gpu
EXAMPLE POST CONTENT: {"value":"Auto"}
Get or set the host HX NDI4 compatibility mode. Will always return the latest host HX NDI4 compatibility mode value.
value
String
(required) A boolean to enable or dis-
able NDI4 compatibility mode.
If provided on a
POST request, the host HX NDI4 com- patibility mode will
be set.
GET URL: http://localhost:8080/api/host/hx_ndi4_compatibility_mode POST URL: http://localhost:8080/api/host/hx_ndi4_compatibility_mode
EXAMPLE POST CONTENT: {"value":"false"}
Get or set the host HX output. Will always return the latest host HX output value.
value
String
(required) 0, 1, or 2 where 0 = NDI —
HX, 1 = NDI High Bandwidth, and 2
= Do Not Transcode
If provided on a
POST request, the host HX output
type will be set.
GET URL: http://localhost:8080/api/host/hx_output POST URL: http://localhost:8080/api/host/hx_output
EXAMPLE POST CONTENT: {"value":"0"}
Get or set the host HX quality setting. Will always return the latest host HX quality setting value.
value
String
(required) A value between 10 and 400
with 10 being the lowest quality.
If provided on a
POST request, the host HX quality
setting will be set.
GET URL: http://localhost:8080/api/host/hx_quality POST URL: http://localhost:8080/api/host/hx_quality
EXAMPLE POST CONTENT: {"value":"100"}
Get or set the host port value. Will always return the latest host port value.
value
String
(required) Port number in the range of
1-65545.
Port number in the
range of 1-65545. If provided on a POST request, the host port value will
be set.
GET URL: http://localhost:8080/api/host/port POST URL: http://localhost:8080/api/host/port
EXAMPLE POST CONTENT: {"value":"5990"}
Sets the host’s encryption key on POST.
value
String
(required) The encryption key string
value.
Returns success on
setting the encryp- tion key. Does not return the cur- rent encryption key
value.
POST URL: http://localhost:8080/api/host/set_encryption_key EXAMPLE POST CONTENT: {"value":"some encryption key"}
Starts the host and returns if the operation succeeded or not.
POST URL: http://localhost:8080/api/host/start EXAMPLE POST CONTENT: {}
Gets the current host status message.
GET URL: http://localhost:8080/api/host/status_message
Stops the host if the host was running. Returns if the operation succeeded or not.
POST URL: http://localhost:8080/api/host/stop EXAMPLE POST CONTENT: {}
Returns true if Bridge is running in Host or Join mode.
GET URL: http://localhost:8080/api/is_running
Get the current join bandwidth message.
GET URL: http://localhost:8080/api/join/bandwidth_message
Get or set the join bridge name. Will always return the latest join bridge name.
value
String
(required) Any string value.
If provided on a
POST request, the join bridge name
will be set.
GET URL: http://localhost:8080/api/join/bridge_name POST URL: http://localhost:8080/api/join/bridge_name
EXAMPLE POST CONTENT: {"value":"My Bridge Name"}
Get or set the join buffer value. Will always return the latest join buffer value.
value
String
(required) A buffer length value from
0-3000.
Buffer length value
in the range of 0-3000. If pro- vided on a POST request, the join buffer length value
will be set.
GET URL: http://localhost:8080/api/join/buffer POST URL: http://localhost:8080/api/join/buffer
EXAMPLE POST CONTENT: {"value":"100"}
Clears the join encryption key when called.
POST URL: http://localhost:8080/api/join/clear_encryption_key EXAMPLE POST CONTENT: {}
Gets a boolean to represent if the join has reached its GPU encoding limits or not.
GET URL: http://localhost:8080/api/join/gpu_limit
Get or set the join groups to share. Will always return the latest join groups.
value
String
(required) A comma delineated list of
group names.
If provided on a
POST request, the join groups will be
set.
GET URL: http://localhost:8080/api/join/groups POST URL: http://localhost:8080/api/join/groups
EXAMPLE POST CONTENT: {"value":"pubic,test"}
Get or set the join HX encoder. Will always return the latest join HX encoder value.
value
String
(required) 0 or 1 where 0 = h.264, 1 =
HEVC (h.265)
If provided on a
POST request, the join HX encoder
type will be set.
GET URL: http://localhost:8080/api/join/hx_encoder POST URL: http://localhost:8080/api/join/hx_encoder
EXAMPLE POST CONTENT: {"value":"0"}
Get or set the join HX GPU. Will always return the latest join HX GPU.
value
String
(required) The name of the GPU. Use
’Auto’ to automatically select a GPU.
If provided on a
POST request, the join HX GPU will
be set.
GET URL: http://localhost:8080/api/join/hx_gpu POST URL: http://localhost:8080/api/join/hx_gpu
EXAMPLE POST CONTENT: {"value":"Auto"}
Get or set the join HX NDI4 compatibility mode. Will always return the latest join HX NDI4 compatibility mode value.
value
String
(required) A boolean to enable or dis-
able NDI4 compatibility mode.
If provided on a
POST request, the join HX NDI4 com- patibility mode will
be set.
GET URL: http://localhost:8080/api/join/hx_ndi4_compatibility_mode POST URL: http://localhost:8080/api/join/hx_ndi4_compatibility_mode
EXAMPLE POST CONTENT: {"value":"false"}
Get or set the join HX output. Will always return the latest join HX output value.
value
String
(required) 0, 1, or 2 where 0 = NDI —
HX, 1 = NDI High Bandwidth, and 2
= Do Not Transcode
If provided on a
POST request, the join HX output
type will be set.
GET URL: http://localhost:8080/api/join/hx_output POST URL: http://localhost:8080/api/join/hx_output
EXAMPLE POST CONTENT: {"value":"0"}
Get or set the join HX quality setting. Will always return the latest join HX quality setting value.
value
String
(required) A value between 10 and 400
with 10 being the lowest quality.
If provided on a
POST request, the join HX quality set-
ting will be set.
GET URL: http://localhost:8080/api/join/hx_quality POST URL: http://localhost:8080/api/join/hx_quality
EXAMPLE POST CONTENT: {"value":"100"}
Get or set the join IP address. Will always return the latest join IP address.
value
String
(required) IP Address in IPv4 format
’127.0.0.1’
If provided on a
POST request, the join IP address will
be set.
GET URL: http://localhost:8080/api/join/ip_address POST URL: http://localhost:8080/api/join/ip_address
EXAMPLE POST CONTENT: {"value":"127.0.0.1"}
Get or set the join port value. Will always return the latest join port value.
value
String
(required) Port number in the range of
1-65535.
Port number in the
range of 1-65535. If provided on a POST request, the join port value will
be set.
GET URL: http://localhost:8080/api/join/port POST URL: http://localhost:8080/api/join/port
EXAMPLE POST CONTENT: {"value":"5990"}
Sets the join encryption key on POST.
value
String
(required) The encryption key string
value.
Returns success on
setting the encryp- tion key. Does not return the cur- rent encryption key
value.
POST URL: http://localhost:8080/api/join/set_encryption_key EXAMPLE POST CONTENT: {"value":"some encryption key"}
Starts the join and returns if the operation succeeded or not.
POST URL: http://localhost:8080/api/join/start EXAMPLE POST CONTENT: {}
Gets the current join status message.
GET URL: http://localhost:8080/api/join/status_message
Stops the join if the join was running. Returns if the operation succeeded or not.
POST URL: http://localhost:8080/api/join/stop EXAMPLE POST CONTENT: {}
Starts the connection test. You can use the connection test to help identify the best buffer setting for your chosen bitrate given your current network conditions. You must have at least one active connection to perform a connection test.
POST URL: http://localhost:8080/api/connection_test_start
Stops the connection test. The response to this request will include the recommended buffer setting.
POST URL: http://localhost:8080/api/connection_test_stop
Get or set the bitrate used in the connection test. Will always return the current bitrate value.
value
String
(required) Value between 1 and the
maximum speed reported by the net- work adapters. When provided on a POST request, the Bridge Service con-
nection test bitrate will be set.
GET URL: http://localhost:8080/api/connection_test_bitrate POST URL: http://localhost:8080/api/connection_test_bitrate
Gets the current running mode.
GET URL: http://localhost:8080/api/runmode
Returns the timespan since the service started.
GET URL: http://localhost:8080/api/uptime