Developer_release_1.4.0
Class lua-repl.lib.rest.nmos.connection.api
Connection REST API wrapper.
Overview
The Connection API is exposed by NMOS Devices as a standard control interface for management of inter-device connnections.Endpoint Discovery
The Connection API URL for an NMOS Device is advertised in the list of controls for that device in the Node API using type: "urn:x-nmos:control:sr-ctrl/{version}". This information is populated into the NMOS registry via the standard registration mechanism, so it is discoverable through the Query API (see NMOS Discovery and Registration specification).API Structure
The API presents two distinct interfaces. A "bulk" interface for controlling multiple senders/receivers, and a "single" interface to control single devices.Methods
api.bulk.receivers:options () | A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes. |
api.bulk.receivers:post (payload) | Allows staging and activation of a subset of multiple receiver parameters at the same time in a single request. |
api.bulk.senders:options () | A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes. |
api.bulk.senders:post (payload) | Allows staging and activation of multiple sender parameters at the same time in a single request. |
api.bulk:get () | Senders / receivers options. |
api.bulk:options_receivers () | A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes. |
api.bulk:options_senders () | A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes. |
api.bulk:receivers (payload) | Allows staging and activation of a subset of multiple receiver parameters at the same time in a single request. This function is alias for api.bulk.receivers:post(payload) . |
api.bulk:senders (payload) | Allows staging and activation of multiple sender parameters at the same time in a single request. |
api.single.receivers[receiverId].active:get () | Get active receiver parameters. |
api.single.receivers[receiverId].constraints:get () | Lists the constraints for each transport parameter (e.g max/min value, enumerated values etc.) using a very limited subset of JSON schema. |
api.single.receivers[receiverId].staged:get () | Get staged receiver transport parameters object. |
api.single.receivers[receiverId].staged:options () | A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes. |
api.single.receivers[receiverId].staged:patch (payload) | Update staged parameters for receiver. |
api.single.receivers[receiverId].transporttype:get () | Returns the URN base for the transport type employed by this receiver with any subclassifications or versions removed. |
api.single.receivers[receiverId]:get () | List API endpoints. |
api.single.receivers[receiverId]:get_active () | Get active receiver parameters. |
api.single.receivers[receiverId]:get_constraints () | Lists the constraints for each transport parameter (e.g max/min value, enumerated values etc.) using a very limited subset of JSON schema. |
api.single.receivers[receiverId]:get_staged () | Get staged receiver transport parameters object. |
api.single.receivers[receiverId]:get_transporttype () | Returns the URN base for the transport type employed by this receiver with any subclassifications or versions removed. This function is alias for api.single.receivers[receiverId].transporttype:get() . |
api.single.receivers[receiverId]:options_staged () | A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes. |
api.single.receivers[receiverId]:patch_staged (payload) | Update staged parameters for receiver. |
api.single.receivers:get () | List available receivers. |
api.single.senders[senderId].active:get () | Get active sender parameters. |
api.single.senders[senderId].constraints:get () | Lists the constraints for each transport parameter (e.g max/min value, enumerated values etc.) using a very limited subset of JSON schema. |
api.single.senders[senderId].staged:get () | Get staged sender transport parameters object. |
api.single.senders[senderId].staged:options () | A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes. |
api.single.senders[senderId].staged:patch (payload) | Update staged parameters for sender. |
api.single.senders[senderId].transportfile:get () | Redirects to the location of the sender's transport file or returns the transport file directly. |
api.single.senders[senderId].transporttype:get () | Returns the URN base for the transport type employed by this sender with any subclassifications or versions removed. |
api.single.senders[senderId]:get () | List all the API endpoints for a single sender. |
api.single.senders[senderId]:get_active () | Get active sender parameters. |
api.single.senders[senderId]:get_constraints () | Lists the constraints for each transport parameter (e.g max/min value, enumerated values etc.) using a very limited subset of JSON schema. |
api.single.senders[senderId]:get_staged () | Get staged sender transport parameters object. |
api.single.senders[senderId]:get_transportfile () | Redirects to the location of the sender's transport file or returns the transport file directly. |
api.single.senders[senderId]:get_transporttype () | Returns the URN base for the transport type employed by this sender with any subclassifications or versions removed. This function is alias for api.single.senders[senderId].transporttype:get() . |
api.single.senders[senderId]:options_staged () | A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes. |
api.single.senders[senderId]:patch_staged (payload) | Update staged parameters for sender. |
api.single.senders:get () | Sender root. |
api.single:get_receivers () | List available receivers. |
api.single:get_senders () | Sender root. |
lua-repl.lib.rest.nmos.connection.api:get () | List of modes available from this API - single and bulk. |
lua-repl.lib.rest.nmos.connection.api:get_bulk () | Senders / receivers options. |
Methods
- api.bulk.receivers:options ()
-
A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes.
Returns:
Or
- api.bulk.receivers:post (payload)
-
Allows staging and activation of a subset of multiple receiver parameters at the same time in a single request.
Parameters:
- payload
(table/bulk_receiver_post_struct[]) The actual subset of transport parameters used must be compatible with all receivers being addressed, which may be checked using the individual receiver's /constraints url.
+item
: (table/bulk_receiver_post_struct) +item.id
: (string) ID of the target receiver to apply parameters to. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.item.params
: (table/receiver_stage_struct) Describes a receiver. +item.params.activation
: (table/activation_struct) Parameters concerned with activation of the transport parameters. +item.params.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
item.params.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation. Should be null or not present if 'mode' is null. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
item.params.master_enable
: (boolean) Master on/off control for receiver.item.params.sender_id
: (string | nil) ID of the Sender subscribed to by this Receiver. This will be null if the receiver has not been configured to receive anything, or if it is receiving from a non-NMOS sender. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.item.params.transport_file
: (table/receiver_transport_file) Transport file parameters. 'data' and 'type' must both be strings or both be null. If 'type' is non-null 'data' is expected to contain a valid instance of the specified media type. +item.params.transport_file.data
: (string | nil) Content of the transport file.item.params.transport_file.type
: (string | nil) IANA assigned media type for file (e.g application/sdp).item.params.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +item.params.transport_params
: (array of items) +item
: (table/receiver_transport_params_rtp) Describes RTP Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. Receivers must support at least the <code>source_ip</code>, <code>interface_ip</code>, <code>rtp_enabled</code> and <code>destination_port</code> parameters, and must support the <code>multicast_ip</code> parameter if they are capable of multicast operation. Receivers supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. (auto = highest available number of dimensions by default). Possible values:{"auto","1D","2D"}
.item.interface_ip
: IP address of the network interface the receiver should use. The receiver should provide an enum in the constraints endpoint, which should contain the available interface addresses. If set to auto in multicast mode the receiver should determine which interface to use for itself, for example by using the routing tables. The behaviour of auto is undefined in unicast mode, and controllers should supply a specific interface address. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.multicast_ip
: IP multicast group address used in multicast operation only. Should be set to null during unicast operation. A null value indicates the parameter has not been configured, or the receiver is operating in unicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
item.rtcp_destination_ip
: Destination IP address of RTCP packets (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) RTCP on/off.item.rtp_enabled
: (boolean) RTP reception active/inactive.item.source_ip
: Source IP address of RTP packets in unicast mode, source filter for source specific multicast. A null value indicates that the source IP address has not been configured in unicast mode, or the Receiver is in any-source multicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
or
item.params.transport_params
: (array of items) +item
: (any)
or
item.params.transport_params
: (array of items) +item
: (table/receiver_transport_params_websocket) Describes WebSocket Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Receivers must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. A null value indicates that the receiver has not yet been configured. Possible content: +- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string/uri) Must match the pattern:
or
item.params.transport_params
: (array of items) +item
: (table/receiver_transport_params_mqtt) Describes MQTT Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Receivers must support all parameters in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Receiver should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be received from via the MQTT broker. A null value indicates that the Receiver has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic used for MQTT status messages such as MQTT Last Will which are received via the MQTT broker. A null value indicates that the Receiver has not yet been configured, or is not using a connection status topic.item.source_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Receiver has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.source_port
: (integer | string) Source port for MQTT traffic. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
Returns:
-
table/bulk_response_struct[]
(status 200) Gives the status of each of the individual receivers after the staging. Will be returned even if individual parameters in
result.nil
: (array of items) Bulk activation response. Describes a response to a bulk activation request. +item
: (table/bulk_response_struct) +item.code
: HTTP status code that would have resulted from an individual activation on this device. Possible content: +- (any) Minimum:
200
. Maximum:299
.
or
- (any) Minimum:
400
. Maximum:599
.
- (any) Minimum:
item.debug
: (nil | string) Debug information which may assist a programmer working with the API. Only included if 'code' indicates an error state.item.error
: (string) Human readable message which is suitable for user interface display, and helpful to the user. Only included if 'code' indicates an error state.item.id
: (string) ID of a device to be activated. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.
Example:
params
did not validate. The response object provides the HTTP status code that would have been returned by each receiver had the request been carried out individually.
{ { code = 200, id = "0a174530-e3cf-11e6-bf01-fe55135034f3" }; { code = 200, id = "7a3ebebe-0405-11e7-93ae-92361f002671" }; { code = 200, id = "7a3ec21a-0405-11e7-93ae-92361f002671" }; { code = 400; debug = "
"; error = "Un-recognised parameter 'frc_enabled'"; id = "7a3ec3b4-0405-11e7-93ae-92361f002671"; }; } Or
-
table/error
(status 400) The body of the request did not validate against the schema (ignoring the content of the
result.code
: (number/integer) HTTP error code. Minimum:400
. Maximum:599
.result.debug
: (nil | string) Debug information which may assist a programmer working with the API.result.error
: (string) Human readable message which is suitable for user interface display, and helpful to the user.
params
field - these are validated individually by each receiver and failures are recorded in the response object for a 200 return).
+{ code = 400, debug = "
", error = "Request contained invalid JSON" } Usage:
connection = require "lua-repl.lib.rest.nmos.connection" api = connection:create_api("http://connection.nmos.acme.example.com") payload = { { id = "0a174530-e3cf-11e6-bf01-fe55135034f3"; params = { activation = { mode = "activate_scheduled_absolute", requested_time = "1496759200:0" }; master_enable = true; transport_file = { data = "v=0\13\ o=- 1496222842 1496222842 IN IP4 172.29.226.25\13\ s=IP Studio Stream\13\ t=0 0\13\ m=video 5010 RTP/AVP 103\13\ c=IN IP4 232.250.98.80/32\13\ a=source-filter:incl IN IP4 232.250.98.80 172.29.226.25\13\ a=rtpmap:103 raw/90000\13\ a=fmtp:103 sampling=YCbCr-4:2:2; width=1920; height=1080; depth=10; interlace; exactframerate=25; colorimetry=BT709; PM=2110GPM; SSN=ST2110-20:2017; TP=2110TPW; \13\ a=mediaclk:direct=1876655126 rate=90000\13\ a=extmap:1 urn:x-nmos:rtp-hdrext:origin-timestamp\13\ a=extmap:2 urn:ietf:params:rtp-hdrext:smpte-tc 3600@90000/25\13\ a=extmap:3 urn:x-nmos:rtp-hdrext:flow-id\13\ a=extmap:4 urn:x-nmos:rtp-hdrext:source-id\13\ a=extmap:5 urn:x-nmos:rtp-hdrext:grain-flags\13\ a=extmap:7 urn:x-nmos:rtp-hdrext:sync-timestamp\13\ a=extmap:9 urn:x-nmos:rtp-hdrext:grain-duration\13\ a=ts-refclk:ptp=IEEE1588-2008:08-00-11-FF-FE-21-E1-B0:0\13\ "; type = "application/sdp"; }; transport_params = { { rtp_enabled = true }; { rtp_enabled = true }; }; }; }; { id = "7a3ebebe-0405-11e7-93ae-92361f002671"; params = { activation = { mode = "activate_scheduled_relative", requested_time = "2:0" }; master_enable = true; transport_params = { { rtp_enabled = true }; { rtp_enabled = true }; }; }; }; } result = api.bulk.receivers:post(payload)
- payload
(table/bulk_receiver_post_struct[]) The actual subset of transport parameters used must be compatible with all receivers being addressed, which may be checked using the individual receiver's /constraints url.
- api.bulk.senders:options ()
-
A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes.
Returns:
Or
- api.bulk.senders:post (payload)
-
Allows staging and activation of multiple sender parameters at the same time in a single request.
Parameters:
- payload
(table/bulk_sender_post_struct[]) The actual subset of transport parameters used for the patch must be compatible with the associated sender's constraints, which may be checked using the individual sender's /constraints url.
+item
: (table/bulk_sender_post_struct) +item.id
: (string) ID of the target sender to apply parameters to. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.item.params
: (table/sender_stage_struct) Describes a sender. +item.params.activation
: (table/activation_struct) Parameters concerned with activation of the transport parameters. +item.params.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
item.params.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation. Should be null or not present if 'mode' is null. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
item.params.master_enable
: (boolean) Master on/off control for sender.item.params.receiver_id
: (string | nil) ID of the target Receiver of this Sender. This will be null if the sender is operating in multicast mode, or has not been assigned a receiver in unicast mode, or is sending to a non-NMOS receiver in unicast mode. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.item.params.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +item.params.transport_params
: (array of items) +item
: (table/sender_transport_params_rtp) Describes RTP Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. As a minimum all senders must support <code>source_ip</code>, <code>destination_ip</code>, <code>source_port</code>, <code>rtp_enabled</code> and <code>destination_port</code>. Senders supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_ip
: IP address to which RTP packets will be sent. If auto is set the sender should select a multicast address to send to itself. For example it may implement MADCAP (RFC 2730), ZMAAP, or be allocated address by some other system responsible for co-ordination multicast address use. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec_block_height
: (number/integer) height of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_block_width
: (number/integer) width of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. Possible values:{"1D","2D"}
.item.fec_type
: (string) forward error correction mode to apply. Possible values:{"XOR","Reed-Solomon"}
.item.rtcp_destination_ip
: IP address to which RTCP packets will be sent (auto = same as RTP destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) rtcp on/off.item.rtcp_source_port
: (integer | string) source port for RTCP packets (auto = RTP source_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.rtp_enabled
: (boolean) RTP transmission active/inactive.item.source_ip
: IP address from which RTP packets will be sent (IP address of interface bound to this output). The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.source_port
: (integer | string) source port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.
or
item.params.transport_params
: (array of items) +item
: (any)
or
item.params.transport_params
: (array of items) +item
: (table/sender_transport_params_websocket) Describes WebSocket Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Senders must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses formatted as connection URIs. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. A null value indicates that the sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string) Must match the pattern:
or
item.params.transport_params
: (array of items) +item
: (table/sender_transport_params_mqtt) Describes MQTT Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Senders must support all properties in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Sender should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic which MQTT status messages such as MQTT Last Will are sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured, or is not using a connection status topic.item.destination_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.destination_port
: (integer | string) Destination port for MQTT traffic. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
Returns:
-
table/bulk_response_struct[]
(status 200) Gives the status of each of the individual senders after the staging. Will be returned even if individual
result.nil
: (array of items) Bulk activation response. Describes a response to a bulk activation request. +item
: (table/bulk_response_struct) +item.code
: HTTP status code that would have resulted from an individual activation on this device. Possible content: +- (any) Minimum:
200
. Maximum:299
.
or
- (any) Minimum:
400
. Maximum:599
.
- (any) Minimum:
item.debug
: (nil | string) Debug information which may assist a programmer working with the API. Only included if 'code' indicates an error state.item.error
: (string) Human readable message which is suitable for user interface display, and helpful to the user. Only included if 'code' indicates an error state.item.id
: (string) ID of a device to be activated. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.
Example:
params
did not validate. The response object provides the HTTP status code that would have been returned by each sender had the request been carried out individually.
{ { code = 200, id = "0a174530-e3cf-11e6-bf01-fe55135034f3" }; { code = 200, id = "7a3ebebe-0405-11e7-93ae-92361f002671" }; { code = 200, id = "7a3ec21a-0405-11e7-93ae-92361f002671" }; { code = 400; debug = "
"; error = "Un-recognised parameter 'frc_enabled'"; id = "7a3ec3b4-0405-11e7-93ae-92361f002671"; }; } Or
-
table/error
(status 400) The body of the request did not validate against the schema (ignoring the content of the
result.code
: (number/integer) HTTP error code. Minimum:400
. Maximum:599
.result.debug
: (nil | string) Debug information which may assist a programmer working with the API.result.error
: (string) Human readable message which is suitable for user interface display, and helpful to the user.
params
field - these are validated individually by each sender and failures are recorded in the response object for a 200 return).
+{ code = 400, debug = "
", error = "Request contained invalid JSON" } Usage:
connection = require "lua-repl.lib.rest.nmos.connection" api = connection:create_api("http://connection.nmos.acme.example.com") payload = { { id = "0a174530-e3cf-11e6-bf01-fe55135034f3"; params = { activation = { mode = "activate_scheduled_absolute", requested_time = "1496759200:0" }; master_enable = true; transport_params = { { fec_enabled = true, rtcp_enabled = true, rtp_enabled = true }; { fec_enabled = true, rtcp_enabled = true, rtp_enabled = true }; }; }; }; { id = "7a3ebebe-0405-11e7-93ae-92361f002671"; params = { activation = { mode = "activate_scheduled_relative", requested_time = "2:0" }; master_enable = true; transport_params = { { fec_enabled = true }; { fec_enabled = true }; }; }; }; } result = api.bulk.senders:post(payload)
- payload
(table/bulk_sender_post_struct[]) The actual subset of transport parameters used for the patch must be compatible with the associated sender's constraints, which may be checked using the individual sender's /constraints url.
- api.bulk:get ()
-
Senders / receivers options.
Returns:
-
table/connectionapi_bulk[]
(status 200)
result.nil
: (array of items) Connection API /bulk base resource. Describes the Connection API /bulk base resource. +item
: (string) Possible values:{"senders/","receivers/"}
.
Example:
{ "senders/", "receivers/" }
- api.bulk:options_receivers ()
-
A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes.
This function is alias for
api.bulk.receivers:options()
.Returns:
Or
- api.bulk:options_senders ()
-
A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes.
This function is alias for
api.bulk.senders:options()
.Returns:
Or
- api.bulk:receivers (payload)
-
Allows staging and activation of a subset of multiple receiver parameters at the same time in a single request.
This function is alias forapi.bulk.receivers:post(payload)
.Parameters:
- payload
(table/bulk_receiver_post_struct[]) The actual subset of transport parameters used must be compatible with all receivers being addressed, which may be checked using the individual receiver's /constraints url.
+item
: (table/bulk_receiver_post_struct) +item.id
: (string) ID of the target receiver to apply parameters to. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.item.params
: (table/receiver_stage_struct) Describes a receiver. +item.params.activation
: (table/activation_struct) Parameters concerned with activation of the transport parameters. +item.params.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
item.params.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation. Should be null or not present if 'mode' is null. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
item.params.master_enable
: (boolean) Master on/off control for receiver.item.params.sender_id
: (string | nil) ID of the Sender subscribed to by this Receiver. This will be null if the receiver has not been configured to receive anything, or if it is receiving from a non-NMOS sender. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.item.params.transport_file
: (table/receiver_transport_file) Transport file parameters. 'data' and 'type' must both be strings or both be null. If 'type' is non-null 'data' is expected to contain a valid instance of the specified media type. +item.params.transport_file.data
: (string | nil) Content of the transport file.item.params.transport_file.type
: (string | nil) IANA assigned media type for file (e.g application/sdp).item.params.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +item.params.transport_params
: (array of items) +item
: (table/receiver_transport_params_rtp) Describes RTP Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. Receivers must support at least the <code>source_ip</code>, <code>interface_ip</code>, <code>rtp_enabled</code> and <code>destination_port</code> parameters, and must support the <code>multicast_ip</code> parameter if they are capable of multicast operation. Receivers supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. (auto = highest available number of dimensions by default). Possible values:{"auto","1D","2D"}
.item.interface_ip
: IP address of the network interface the receiver should use. The receiver should provide an enum in the constraints endpoint, which should contain the available interface addresses. If set to auto in multicast mode the receiver should determine which interface to use for itself, for example by using the routing tables. The behaviour of auto is undefined in unicast mode, and controllers should supply a specific interface address. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.multicast_ip
: IP multicast group address used in multicast operation only. Should be set to null during unicast operation. A null value indicates the parameter has not been configured, or the receiver is operating in unicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
item.rtcp_destination_ip
: Destination IP address of RTCP packets (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) RTCP on/off.item.rtp_enabled
: (boolean) RTP reception active/inactive.item.source_ip
: Source IP address of RTP packets in unicast mode, source filter for source specific multicast. A null value indicates that the source IP address has not been configured in unicast mode, or the Receiver is in any-source multicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
or
item.params.transport_params
: (array of items) +item
: (any)
or
item.params.transport_params
: (array of items) +item
: (table/receiver_transport_params_websocket) Describes WebSocket Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Receivers must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. A null value indicates that the receiver has not yet been configured. Possible content: +- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string/uri) Must match the pattern:
or
item.params.transport_params
: (array of items) +item
: (table/receiver_transport_params_mqtt) Describes MQTT Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Receivers must support all parameters in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Receiver should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be received from via the MQTT broker. A null value indicates that the Receiver has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic used for MQTT status messages such as MQTT Last Will which are received via the MQTT broker. A null value indicates that the Receiver has not yet been configured, or is not using a connection status topic.item.source_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Receiver has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.source_port
: (integer | string) Source port for MQTT traffic. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
Returns:
-
table/bulk_response_struct[]
(status 200) Gives the status of each of the individual receivers after the staging. Will be returned even if individual parameters in
result.nil
: (array of items) Bulk activation response. Describes a response to a bulk activation request. +item
: (table/bulk_response_struct) +item.code
: HTTP status code that would have resulted from an individual activation on this device. Possible content: +- (any) Minimum:
200
. Maximum:299
.
or
- (any) Minimum:
400
. Maximum:599
.
- (any) Minimum:
item.debug
: (nil | string) Debug information which may assist a programmer working with the API. Only included if 'code' indicates an error state.item.error
: (string) Human readable message which is suitable for user interface display, and helpful to the user. Only included if 'code' indicates an error state.item.id
: (string) ID of a device to be activated. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.
Example:
params
did not validate. The response object provides the HTTP status code that would have been returned by each receiver had the request been carried out individually.
{ { code = 200, id = "0a174530-e3cf-11e6-bf01-fe55135034f3" }; { code = 200, id = "7a3ebebe-0405-11e7-93ae-92361f002671" }; { code = 200, id = "7a3ec21a-0405-11e7-93ae-92361f002671" }; { code = 400; debug = "
"; error = "Un-recognised parameter 'frc_enabled'"; id = "7a3ec3b4-0405-11e7-93ae-92361f002671"; }; } Or
-
table/error
(status 400) The body of the request did not validate against the schema (ignoring the content of the
result.code
: (number/integer) HTTP error code. Minimum:400
. Maximum:599
.result.debug
: (nil | string) Debug information which may assist a programmer working with the API.result.error
: (string) Human readable message which is suitable for user interface display, and helpful to the user.
params
field - these are validated individually by each receiver and failures are recorded in the response object for a 200 return).
+{ code = 400, debug = "
", error = "Request contained invalid JSON" } Usage:
connection = require "lua-repl.lib.rest.nmos.connection" api = connection:create_api("http://connection.nmos.acme.example.com") payload = { { id = "0a174530-e3cf-11e6-bf01-fe55135034f3"; params = { activation = { mode = "activate_scheduled_absolute", requested_time = "1496759200:0" }; master_enable = true; transport_file = { data = "v=0\13\ o=- 1496222842 1496222842 IN IP4 172.29.226.25\13\ s=IP Studio Stream\13\ t=0 0\13\ m=video 5010 RTP/AVP 103\13\ c=IN IP4 232.250.98.80/32\13\ a=source-filter:incl IN IP4 232.250.98.80 172.29.226.25\13\ a=rtpmap:103 raw/90000\13\ a=fmtp:103 sampling=YCbCr-4:2:2; width=1920; height=1080; depth=10; interlace; exactframerate=25; colorimetry=BT709; PM=2110GPM; SSN=ST2110-20:2017; TP=2110TPW; \13\ a=mediaclk:direct=1876655126 rate=90000\13\ a=extmap:1 urn:x-nmos:rtp-hdrext:origin-timestamp\13\ a=extmap:2 urn:ietf:params:rtp-hdrext:smpte-tc 3600@90000/25\13\ a=extmap:3 urn:x-nmos:rtp-hdrext:flow-id\13\ a=extmap:4 urn:x-nmos:rtp-hdrext:source-id\13\ a=extmap:5 urn:x-nmos:rtp-hdrext:grain-flags\13\ a=extmap:7 urn:x-nmos:rtp-hdrext:sync-timestamp\13\ a=extmap:9 urn:x-nmos:rtp-hdrext:grain-duration\13\ a=ts-refclk:ptp=IEEE1588-2008:08-00-11-FF-FE-21-E1-B0:0\13\ "; type = "application/sdp"; }; transport_params = { { rtp_enabled = true }; { rtp_enabled = true }; }; }; }; { id = "7a3ebebe-0405-11e7-93ae-92361f002671"; params = { activation = { mode = "activate_scheduled_relative", requested_time = "2:0" }; master_enable = true; transport_params = { { rtp_enabled = true }; { rtp_enabled = true }; }; }; }; } result = api.bulk:receivers(payload)
- payload
(table/bulk_receiver_post_struct[]) The actual subset of transport parameters used must be compatible with all receivers being addressed, which may be checked using the individual receiver's /constraints url.
- api.bulk:senders (payload)
-
Allows staging and activation of multiple sender parameters at the same time in a single request.
This function is alias for
api.bulk.senders:post(payload)
.Parameters:
- payload
(table/bulk_sender_post_struct[]) The actual subset of transport parameters used for the patch must be compatible with the associated sender's constraints, which may be checked using the individual sender's /constraints url.
+item
: (table/bulk_sender_post_struct) +item.id
: (string) ID of the target sender to apply parameters to. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.item.params
: (table/sender_stage_struct) Describes a sender. +item.params.activation
: (table/activation_struct) Parameters concerned with activation of the transport parameters. +item.params.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
item.params.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation. Should be null or not present if 'mode' is null. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
item.params.master_enable
: (boolean) Master on/off control for sender.item.params.receiver_id
: (string | nil) ID of the target Receiver of this Sender. This will be null if the sender is operating in multicast mode, or has not been assigned a receiver in unicast mode, or is sending to a non-NMOS receiver in unicast mode. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.item.params.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +item.params.transport_params
: (array of items) +item
: (table/sender_transport_params_rtp) Describes RTP Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. As a minimum all senders must support <code>source_ip</code>, <code>destination_ip</code>, <code>source_port</code>, <code>rtp_enabled</code> and <code>destination_port</code>. Senders supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_ip
: IP address to which RTP packets will be sent. If auto is set the sender should select a multicast address to send to itself. For example it may implement MADCAP (RFC 2730), ZMAAP, or be allocated address by some other system responsible for co-ordination multicast address use. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec_block_height
: (number/integer) height of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_block_width
: (number/integer) width of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. Possible values:{"1D","2D"}
.item.fec_type
: (string) forward error correction mode to apply. Possible values:{"XOR","Reed-Solomon"}
.item.rtcp_destination_ip
: IP address to which RTCP packets will be sent (auto = same as RTP destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) rtcp on/off.item.rtcp_source_port
: (integer | string) source port for RTCP packets (auto = RTP source_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.rtp_enabled
: (boolean) RTP transmission active/inactive.item.source_ip
: IP address from which RTP packets will be sent (IP address of interface bound to this output). The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.source_port
: (integer | string) source port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.
or
item.params.transport_params
: (array of items) +item
: (any)
or
item.params.transport_params
: (array of items) +item
: (table/sender_transport_params_websocket) Describes WebSocket Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Senders must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses formatted as connection URIs. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. A null value indicates that the sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string) Must match the pattern:
or
item.params.transport_params
: (array of items) +item
: (table/sender_transport_params_mqtt) Describes MQTT Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Senders must support all properties in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Sender should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic which MQTT status messages such as MQTT Last Will are sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured, or is not using a connection status topic.item.destination_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.destination_port
: (integer | string) Destination port for MQTT traffic. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
Returns:
-
table/bulk_response_struct[]
(status 200) Gives the status of each of the individual senders after the staging. Will be returned even if individual
result.nil
: (array of items) Bulk activation response. Describes a response to a bulk activation request. +item
: (table/bulk_response_struct) +item.code
: HTTP status code that would have resulted from an individual activation on this device. Possible content: +- (any) Minimum:
200
. Maximum:299
.
or
- (any) Minimum:
400
. Maximum:599
.
- (any) Minimum:
item.debug
: (nil | string) Debug information which may assist a programmer working with the API. Only included if 'code' indicates an error state.item.error
: (string) Human readable message which is suitable for user interface display, and helpful to the user. Only included if 'code' indicates an error state.item.id
: (string) ID of a device to be activated. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.
Example:
params
did not validate. The response object provides the HTTP status code that would have been returned by each sender had the request been carried out individually.
{ { code = 200, id = "0a174530-e3cf-11e6-bf01-fe55135034f3" }; { code = 200, id = "7a3ebebe-0405-11e7-93ae-92361f002671" }; { code = 200, id = "7a3ec21a-0405-11e7-93ae-92361f002671" }; { code = 400; debug = "
"; error = "Un-recognised parameter 'frc_enabled'"; id = "7a3ec3b4-0405-11e7-93ae-92361f002671"; }; } Or
-
table/error
(status 400) The body of the request did not validate against the schema (ignoring the content of the
result.code
: (number/integer) HTTP error code. Minimum:400
. Maximum:599
.result.debug
: (nil | string) Debug information which may assist a programmer working with the API.result.error
: (string) Human readable message which is suitable for user interface display, and helpful to the user.
params
field - these are validated individually by each sender and failures are recorded in the response object for a 200 return).
+{ code = 400, debug = "
", error = "Request contained invalid JSON" } Usage:
connection = require "lua-repl.lib.rest.nmos.connection" api = connection:create_api("http://connection.nmos.acme.example.com") payload = { { id = "0a174530-e3cf-11e6-bf01-fe55135034f3"; params = { activation = { mode = "activate_scheduled_absolute", requested_time = "1496759200:0" }; master_enable = true; transport_params = { { fec_enabled = true, rtcp_enabled = true, rtp_enabled = true }; { fec_enabled = true, rtcp_enabled = true, rtp_enabled = true }; }; }; }; { id = "7a3ebebe-0405-11e7-93ae-92361f002671"; params = { activation = { mode = "activate_scheduled_relative", requested_time = "2:0" }; master_enable = true; transport_params = { { fec_enabled = true }; { fec_enabled = true }; }; }; }; } result = api.bulk:senders(payload)
- payload
(table/bulk_sender_post_struct[]) The actual subset of transport parameters used for the patch must be compatible with the associated sender's constraints, which may be checked using the individual sender's /constraints url.
- api.single.receivers[receiverId].active:get ()
-
Get active receiver parameters. When the
master_enable
parameter isfalse
receivers should not process any incoming streams, and should unsubscribe from any multicast streams they are receiving. For RTP receivers thertp_enabled
parameter allows for the individual disabling of SMPTE 2022-7 legs. On activation all instances ofauto
must be resolved into the actual values that will be used by the receiver, unless there is an error condition. For example if a receiver has theinterface_ip
parameter set toauto
in /staged theninterface_ip
in /active should show the IP address of the interface chosen by the receiver. The parameter will remain set toauto
in staged, and may be resolved to a different value on each subsequent activation. In cases, such asinterface_ip
, where the parameter changing unexpectedly at activation through re-resolution may be undesirable, care should be taken in implementation to manage this. If there is an error condition that meansauto
cannot be resolved, the active transport parameters must not change, and the underlying receiver must continue as before.
Returns:
-
table/receiver_response_struct
(status 200)
+
result.activation
: (table/activation_response_struct) Parameters concerned with activation of the transport parameters. +result.activation.activation_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating the absolute time the sender or receiver will or did actually activate for scheduled activations, or the time activation occurred for immediate activations. On the staged endpoint this field returns to null once the activation is completed or when the resource is unlocked by setting the activation mode to null. For immediate activations on the staged endpoint this property will be the time the activation actually occurred in the response to the PATCH request, but null in response to any GET requests thereafter. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). This parameter returns to null on the staged endpoint once an activation is completed or when it is explicitly set to null. For immediate activations, in the response to the PATCH request this field will be set to 'activate_immediate', but will be null in response to any subsequent GET requests. Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
result.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation requested. This field returns to null once the activation is completed on the staged endpoint or when the resource is unlocked by setting the activation mode to null. For an immediate activation this field will always be null on the staged endpoint, even in the response to the PATCH request. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.master_enable
: (boolean) Master on/off control for receiver.result.sender_id
: (string | nil) ID of the Sender subscribed to by this Receiver. This will be null if the receiver has not been configured to receive anything, or if it is receiving from a non-NMOS sender. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.result.transport_file
: (table/receiver_transport_file) Transport file parameters. 'data' and 'type' must both be strings or both be null. If 'type' is non-null 'data' is expected to contain a valid instance of the specified media type. +result.transport_file.data
: (string | nil) Content of the transport file.result.transport_file.type
: (string | nil) IANA assigned media type for file (e.g application/sdp).result.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +transport_params
: (array of items) +item
: (table/receiver_transport_params_rtp) Describes RTP Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. Receivers must support at least the <code>source_ip</code>, <code>interface_ip</code>, <code>rtp_enabled</code> and <code>destination_port</code> parameters, and must support the <code>multicast_ip</code> parameter if they are capable of multicast operation. Receivers supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. (auto = highest available number of dimensions by default). Possible values:{"auto","1D","2D"}
.item.interface_ip
: IP address of the network interface the receiver should use. The receiver should provide an enum in the constraints endpoint, which should contain the available interface addresses. If set to auto in multicast mode the receiver should determine which interface to use for itself, for example by using the routing tables. The behaviour of auto is undefined in unicast mode, and controllers should supply a specific interface address. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.multicast_ip
: IP multicast group address used in multicast operation only. Should be set to null during unicast operation. A null value indicates the parameter has not been configured, or the receiver is operating in unicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
item.rtcp_destination_ip
: Destination IP address of RTCP packets (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) RTCP on/off.item.rtp_enabled
: (boolean) RTP reception active/inactive.item.source_ip
: Source IP address of RTP packets in unicast mode, source filter for source specific multicast. A null value indicates that the source IP address has not been configured in unicast mode, or the Receiver is in any-source multicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
or
transport_params
: (array of items) +item
: (any)
or
transport_params
: (array of items) +item
: (table/receiver_transport_params_websocket) Describes WebSocket Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Receivers must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. A null value indicates that the receiver has not yet been configured. Possible content: +- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string/uri) Must match the pattern:
or
transport_params
: (array of items) +item
: (table/receiver_transport_params_mqtt) Describes MQTT Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Receivers must support all parameters in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Receiver should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be received from via the MQTT broker. A null value indicates that the Receiver has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic used for MQTT status messages such as MQTT Last Will which are received via the MQTT broker. A null value indicates that the Receiver has not yet been configured, or is not using a connection status topic.item.source_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Receiver has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.source_port
: (integer | string) Source port for MQTT traffic. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
{ activation = { activation_time = "1496739062:263900"; mode = "activate_immediate"; requested_time = "1496739062:0"; }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_file = { data = "v=0\13\ o=- 1496222842 1496222842 IN IP4 172.29.226.25\13\ s=IP Studio Stream\13\ t=0 0\13\ m=video 5010 RTP/AVP 103\13\ c=IN IP4 232.250.98.80/32\13\ a=source-filter:incl IN IP4 232.250.98.80 172.29.226.25\13\ a=rtpmap:103 raw/90000\13\ a=fmtp:103 sampling=YCbCr-4:2:2; width=1920; height=1080; depth=10; interlace; exactframerate=25; colorimetry=BT709; PM=2110GPM; SSN=ST2110-20:2017; TP=2110TPW; \13\ a=mediaclk:direct=1876655126 rate=90000\13\ a=extmap:1 urn:x-nmos:rtp-hdrext:origin-timestamp\13\ a=extmap:2 urn:ietf:params:rtp-hdrext:smpte-tc 3600@90000/25\13\ a=extmap:3 urn:x-nmos:rtp-hdrext:flow-id\13\ a=extmap:4 urn:x-nmos:rtp-hdrext:source-id\13\ a=extmap:5 urn:x-nmos:rtp-hdrext:grain-flags\13\ a=extmap:7 urn:x-nmos:rtp-hdrext:sync-timestamp\13\ a=extmap:9 urn:x-nmos:rtp-hdrext:grain-duration\13\ a=ts-refclk:ptp=IEEE1588-2008:08-00-11-FF-FE-21-E1-B0:0\13\ "; type = "application/sdp"; }; transport_params = { { destination_port = 5010; fec1D_destination_port = 5012; fec2D_destination_port = 5014; fec_enabled = false; fec_mode = "2D"; interface_ip = "172.23.19.35"; multicast_ip = "232.250.98.80"; rtcp_destination_ip = "232.250.98.80"; rtcp_destination_port = 5001; rtcp_enabled = false; rtp_enabled = true; source_ip = "172.29.226.25"; }; }; }
Example 2: NormalMQTT{ activation = { activation_time = "1541508905:263900"; mode = "activate_immediate"; requested_time = "1541508905:0"; }; master_enable = true; sender_id = "eae33112-b56c-4a36-8b68-05ab5b6268bc"; transport_file = { }; transport_params = { { broker_authorization = false; broker_protocol = "mqtt"; broker_topic = "my_topic_name"; connection_status_broker_topic = "my_status_topic_name"; source_host = "broker.example.com"; source_port = 1883; }; }; }
Example 3: Uninitialised{ activation = { }; master_enable = true; transport_file = { }; transport_params = { { destination_port = 5004; fec1D_destination_port = 5006; fec2D_destination_port = 5008; fec_destination_ip = "172.23.19.35"; fec_enabled = false; interface_ip = "172.23.19.35"; rtcp_destination_ip = "172.23.19.35"; rtcp_destination_port = 5005; rtcp_enabled = false; rtp_enabled = true; }; }; }
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the requested resource does not exist +Or
- api.single.receivers[receiverId].constraints:get ()
-
Lists the constraints for each transport parameter (e.g max/min value, enumerated values etc.) using a very limited subset of JSON schema. Every transport parameter in the staged resource must be represented here. Any minimum/maximum constraints listed here must not allow a wider range of values than those allowed by the core schema. Any enum defined on this endpoint must only contain a subset of the values allowed for that parameter in the core schema. Similarly, pattern constraints must only narrow the allowed values. If the receiver does not constrain parameters beyond what is specified in the core schema then the constraints in the core schema should not be duplicated on this endpoint. Where an "auto" mode is allowed in the core schema this mode must always be supported by the receiver if the parameter is exposed. If SMPTE 2022-7 is in use, two entries are in the outer array of the resource. The first entry is the constraints for the primary leg. If SMPTE 2022-7 is not in use only one entry should be present in the outer array.
Returns:
-
any
(status 200)
Example 1: SMPTE2022-7
{ { destination_port = { maximum = 50000, minimum = 49151 }; fec1D_destination_port = { maximum = 49151, minimum = 5000 }; fec2D_destination_port = { maximum = 49151, minimum = 5000 }; fec_destination_ip = { }; fec_enabled = { }; fec_mode = { enum = { "1D", "2D" }; }; interface_ip = { enum = { "192.168.7.2"; "192.168.8.5"; "2001:0db8:85a3:0000:0000:8a2e:0370:7334"; "2001:0db8:85a3:0000:0000:8a2e:0370:a24b"; }; }; multicast_ip = { }; rtcp_destination_ip = { }; rtcp_destination_port = { maximum = 49151, minimum = 5000 }; rtcp_enabled = { }; rtp_enabled = { }; source_ip = { }; }; { destination_port = { maximum = 50000, minimum = 49151 }; fec1D_destination_port = { maximum = 49151, minimum = 5000 }; fec2D_destination_port = { maximum = 49151, minimum = 5000 }; fec_block_height = { maximum = 200, minimum = 4 }; fec_block_width = { maximum = 200, minimum = 4 }; fec_destination_ip = { }; fec_enabled = { }; fec_mode = { enum = { "1D", "2D" }; }; interface_ip = { enum = { "192.168.7.2"; "192.168.8.5"; "2001:0db8:85a3:0000:0000:8a2e:0370:7334"; "2001:0db8:85a3:0000:0000:8a2e:0370:a24b"; }; }; multicast_ip = { }; rtcp_destination_ip = { }; rtcp_destination_port = { maximum = 49151, minimum = 5000 }; rtcp_enabled = { }; rtp_enabled = { }; source_ip = { }; }; }
Example 2: RTPNo2022-7{ { destination_port = { maximum = 50000, minimum = 49151 }; fec1D_destination_port = { maximum = 49151, minimum = 5000 }; fec2D_destination_port = { maximum = 49151, minimum = 5000 }; fec_destination_ip = { }; fec_enabled = { }; fec_mode = { enum = { "1D", "2D" }; }; interface_ip = { enum = { "192.168.7.2"; "192.168.8.5"; "2001:0db8:85a3:0000:0000:8a2e:0370:7334"; "2001:0db8:85a3:0000:0000:8a2e:0370:a24b"; }; }; multicast_ip = { }; rtcp_destination_ip = { }; rtcp_destination_port = { maximum = 49151, minimum = 5000 }; rtcp_enabled = { }; rtp_enabled = { }; source_ip = { }; }; }
Example 3: MQTT{ { broker_authorization = { enum = { false }; }; broker_protocol = { enum = { "mqtt" }; }; broker_topic = { }; connection_status_broker_topic = { }; source_host = { }; source_port = { enum = { 1833, 8883 }; }; }; }
Example 4: WebSocketPlusExt{ { connection_authorization = { }; connection_uri = { }; ext_retry_timeout = { maximum = 60, minimum = 5 }; ext_subscription_data = { }; }; }
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the requested resource does not exist +Or
- api.single.receivers[receiverId].staged:get ()
-
Get staged receiver transport parameters object. In SMPTE 2022-7 operation element 0 of the
transport_params
array shall be the parameters applied to the primary leg, and element 1 the secondary leg. There shall only be one element present intransport_params
when SMPTE 2022-7 is not in use.
Returns:
-
table/receiver_response_struct
(status 200) Additionally constrained by the constraints at /constraints
+
result.activation
: (table/activation_response_struct) Parameters concerned with activation of the transport parameters. +result.activation.activation_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating the absolute time the sender or receiver will or did actually activate for scheduled activations, or the time activation occurred for immediate activations. On the staged endpoint this field returns to null once the activation is completed or when the resource is unlocked by setting the activation mode to null. For immediate activations on the staged endpoint this property will be the time the activation actually occurred in the response to the PATCH request, but null in response to any GET requests thereafter. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). This parameter returns to null on the staged endpoint once an activation is completed or when it is explicitly set to null. For immediate activations, in the response to the PATCH request this field will be set to 'activate_immediate', but will be null in response to any subsequent GET requests. Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
result.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation requested. This field returns to null once the activation is completed on the staged endpoint or when the resource is unlocked by setting the activation mode to null. For an immediate activation this field will always be null on the staged endpoint, even in the response to the PATCH request. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.master_enable
: (boolean) Master on/off control for receiver.result.sender_id
: (string | nil) ID of the Sender subscribed to by this Receiver. This will be null if the receiver has not been configured to receive anything, or if it is receiving from a non-NMOS sender. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.result.transport_file
: (table/receiver_transport_file) Transport file parameters. 'data' and 'type' must both be strings or both be null. If 'type' is non-null 'data' is expected to contain a valid instance of the specified media type. +result.transport_file.data
: (string | nil) Content of the transport file.result.transport_file.type
: (string | nil) IANA assigned media type for file (e.g application/sdp).result.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +transport_params
: (array of items) +item
: (table/receiver_transport_params_rtp) Describes RTP Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. Receivers must support at least the <code>source_ip</code>, <code>interface_ip</code>, <code>rtp_enabled</code> and <code>destination_port</code> parameters, and must support the <code>multicast_ip</code> parameter if they are capable of multicast operation. Receivers supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. (auto = highest available number of dimensions by default). Possible values:{"auto","1D","2D"}
.item.interface_ip
: IP address of the network interface the receiver should use. The receiver should provide an enum in the constraints endpoint, which should contain the available interface addresses. If set to auto in multicast mode the receiver should determine which interface to use for itself, for example by using the routing tables. The behaviour of auto is undefined in unicast mode, and controllers should supply a specific interface address. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.multicast_ip
: IP multicast group address used in multicast operation only. Should be set to null during unicast operation. A null value indicates the parameter has not been configured, or the receiver is operating in unicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
item.rtcp_destination_ip
: Destination IP address of RTCP packets (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) RTCP on/off.item.rtp_enabled
: (boolean) RTP reception active/inactive.item.source_ip
: Source IP address of RTP packets in unicast mode, source filter for source specific multicast. A null value indicates that the source IP address has not been configured in unicast mode, or the Receiver is in any-source multicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
or
transport_params
: (array of items) +item
: (any)
or
transport_params
: (array of items) +item
: (table/receiver_transport_params_websocket) Describes WebSocket Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Receivers must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. A null value indicates that the receiver has not yet been configured. Possible content: +- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string/uri) Must match the pattern:
or
transport_params
: (array of items) +item
: (table/receiver_transport_params_mqtt) Describes MQTT Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Receivers must support all parameters in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Receiver should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be received from via the MQTT broker. A null value indicates that the Receiver has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic used for MQTT status messages such as MQTT Last Will which are received via the MQTT broker. A null value indicates that the Receiver has not yet been configured, or is not using a connection status topic.item.source_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Receiver has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.source_port
: (integer | string) Source port for MQTT traffic. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
{ activation = { activation_time = "1499333737:0"; mode = "activate_scheduled_relative"; requested_time = "5:0"; }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_file = { }; transport_params = { { destination_port = 5000; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_destination_ip = "auto"; fec_enabled = true; fec_mode = "2D"; interface_ip = "172.23.19.110"; multicast_ip = "232.250.98.80"; rtcp_destination_ip = "auto"; rtcp_destination_port = 5001; rtcp_enabled = true; rtp_enabled = true; source_ip = "172.23.19.48"; }; { destination_port = 5000; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_destination_ip = "auto"; fec_enabled = true; fec_mode = "2D"; interface_ip = "172.23.20.110"; multicast_ip = "232.250.99.80"; rtcp_destination_ip = "auto"; rtcp_destination_port = 5001; rtcp_enabled = true; rtp_enabled = true; source_ip = "172.23.20.48"; }; }; }
Example 2: Normal{ activation = { }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_file = { }; transport_params = { { destination_port = 5000; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_destination_ip = "auto"; fec_enabled = true; fec_mode = "2D"; interface_ip = "172.23.19.110"; multicast_ip = "232.250.98.80"; rtcp_destination_ip = "auto"; rtcp_destination_port = 5001; rtcp_enabled = true; rtp_enabled = true; source_ip = "172.23.19.48"; }; { destination_port = 5000; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_destination_ip = "auto"; fec_enabled = true; fec_mode = "2D"; interface_ip = "172.23.20.110"; multicast_ip = "232.250.99.80"; rtcp_destination_ip = "auto"; rtcp_destination_port = 5001; rtcp_enabled = true; rtp_enabled = true; source_ip = "172.23.20.48"; }; }; }
Example 3: Uninitialised{ activation = { }; master_enable = true; transport_file = { }; transport_params = { { destination_port = "auto"; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_destination_ip = "auto"; fec_enabled = false; fec_mode = "1D"; interface_ip = "auto"; rtcp_destination_ip = "auto"; rtcp_destination_port = "auto"; rtcp_enabled = false; rtp_enabled = true; }; }; }
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the requested resource does not exist +Or
- api.single.receivers[receiverId].staged:options ()
-
A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes.
Returns:
Or
Or
- api.single.receivers[receiverId].staged:patch (payload)
-
Update staged parameters for receiver. Note that for activations the
mode
parameter will return tonull
once the activation transaction with the client is completed (i.e the response to the PATCH has been sent by the server). When a transport file is staged the parameters in that transport file should be propagated to their corresponding transport parameters and the response should show these updated values. On activation the value of the entries intransport_parameters
must be used to program the receiver, not those in the transport file directly. However while the transport file is still present (i.edata
is notnull
) media parameters in the transport file should be applied to the receiver. Settingdata
tonull
has no impact on thetransport_parameters
array, or any other property. Where a transport file has been staged the transport parameters in the response will reflect the new values assigned to them by the transport file. The transport parameters should be updated from the transport file indata
on every PATCH request that includes thedata
field. Even if the value ofdata
in the request matches the value ofdata
currently stored in the API the transport parameters are still re-populated. In the case where the transport file and transport parameters are updated in the same PATCH request transport parameters specified in the request object take precedence over those in the transport file. In SMPTE 2022-7 operation element 0 of thetransport_params
array shall be the parameters applied to the primary leg, and element 1 the secondary leg. There shall only be one element present intransport_params
when SMPTE 2022-7 is not in use.
Parameters:
- payload
(table) PATCH must comply with the constraints served at /constraints but not all fields are mandatory. Any fields not included in the request JSON remain unchanged, even if they are a child of a property that was included in the request. For example a request containing changes to a single transport parameter will not alter any other transport parameter, even though the
transport_params
property was part of the request.
args.payload
: (table/receiver_stage_struct) Describes a receiver. +args.payload.activation
: (table/activation_struct) Parameters concerned with activation of the transport parameters. +args.payload.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
args.payload.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation. Should be null or not present if 'mode' is null. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
args.payload.master_enable
: (boolean) Master on/off control for receiver.args.payload.sender_id
: (string | nil) ID of the Sender subscribed to by this Receiver. This will be null if the receiver has not been configured to receive anything, or if it is receiving from a non-NMOS sender. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.args.payload.transport_file
: (table/receiver_transport_file) Transport file parameters. 'data' and 'type' must both be strings or both be null. If 'type' is non-null 'data' is expected to contain a valid instance of the specified media type. +args.payload.transport_file.data
: (string | nil) Content of the transport file.args.payload.transport_file.type
: (string | nil) IANA assigned media type for file (e.g application/sdp).args.payload.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +payload.transport_params
: (array of items) +item
: (table/receiver_transport_params_rtp) Describes RTP Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. Receivers must support at least the <code>source_ip</code>, <code>interface_ip</code>, <code>rtp_enabled</code> and <code>destination_port</code> parameters, and must support the <code>multicast_ip</code> parameter if they are capable of multicast operation. Receivers supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. (auto = highest available number of dimensions by default). Possible values:{"auto","1D","2D"}
.item.interface_ip
: IP address of the network interface the receiver should use. The receiver should provide an enum in the constraints endpoint, which should contain the available interface addresses. If set to auto in multicast mode the receiver should determine which interface to use for itself, for example by using the routing tables. The behaviour of auto is undefined in unicast mode, and controllers should supply a specific interface address. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.multicast_ip
: IP multicast group address used in multicast operation only. Should be set to null during unicast operation. A null value indicates the parameter has not been configured, or the receiver is operating in unicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
item.rtcp_destination_ip
: Destination IP address of RTCP packets (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) RTCP on/off.item.rtp_enabled
: (boolean) RTP reception active/inactive.item.source_ip
: Source IP address of RTP packets in unicast mode, source filter for source specific multicast. A null value indicates that the source IP address has not been configured in unicast mode, or the Receiver is in any-source multicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
or
payload.transport_params
: (array of items) +item
: (any)
or
payload.transport_params
: (array of items) +item
: (table/receiver_transport_params_websocket) Describes WebSocket Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Receivers must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. A null value indicates that the receiver has not yet been configured. Possible content: +- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string/uri) Must match the pattern:
or
payload.transport_params
: (array of items) +item
: (table/receiver_transport_params_mqtt) Describes MQTT Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Receivers must support all parameters in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Receiver should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be received from via the MQTT broker. A null value indicates that the Receiver has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic used for MQTT status messages such as MQTT Last Will which are received via the MQTT broker. A null value indicates that the Receiver has not yet been configured, or is not using a connection status topic.item.source_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Receiver has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.source_port
: (integer | string) Source port for MQTT traffic. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
Returns:
-
table/receiver_response_struct
(status 200) A 200 response is returned for PATCH requests where no activation has been scheduled, an activation has been cancelled, or an immediate activation has been requested. The response will always contain the full set of parameters in the response schema, and all supported transport parameters. For a request involving an immediate activation the API should only return once the transport parameters have been applied to the underlying receiver. Note the presence of the extra
result.activation
: (table/activation_response_struct) Parameters concerned with activation of the transport parameters. +result.activation.activation_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating the absolute time the sender or receiver will or did actually activate for scheduled activations, or the time activation occurred for immediate activations. On the staged endpoint this field returns to null once the activation is completed or when the resource is unlocked by setting the activation mode to null. For immediate activations on the staged endpoint this property will be the time the activation actually occurred in the response to the PATCH request, but null in response to any GET requests thereafter. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). This parameter returns to null on the staged endpoint once an activation is completed or when it is explicitly set to null. For immediate activations, in the response to the PATCH request this field will be set to 'activate_immediate', but will be null in response to any subsequent GET requests. Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
result.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation requested. This field returns to null once the activation is completed on the staged endpoint or when the resource is unlocked by setting the activation mode to null. For an immediate activation this field will always be null on the staged endpoint, even in the response to the PATCH request. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.master_enable
: (boolean) Master on/off control for receiver.result.sender_id
: (string | nil) ID of the Sender subscribed to by this Receiver. This will be null if the receiver has not been configured to receive anything, or if it is receiving from a non-NMOS sender. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.result.transport_file
: (table/receiver_transport_file) Transport file parameters. 'data' and 'type' must both be strings or both be null. If 'type' is non-null 'data' is expected to contain a valid instance of the specified media type. +result.transport_file.data
: (string | nil) Content of the transport file.result.transport_file.type
: (string | nil) IANA assigned media type for file (e.g application/sdp).result.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +transport_params
: (array of items) +item
: (table/receiver_transport_params_rtp) Describes RTP Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. Receivers must support at least the <code>source_ip</code>, <code>interface_ip</code>, <code>rtp_enabled</code> and <code>destination_port</code> parameters, and must support the <code>multicast_ip</code> parameter if they are capable of multicast operation. Receivers supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. (auto = highest available number of dimensions by default). Possible values:{"auto","1D","2D"}
.item.interface_ip
: IP address of the network interface the receiver should use. The receiver should provide an enum in the constraints endpoint, which should contain the available interface addresses. If set to auto in multicast mode the receiver should determine which interface to use for itself, for example by using the routing tables. The behaviour of auto is undefined in unicast mode, and controllers should supply a specific interface address. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.multicast_ip
: IP multicast group address used in multicast operation only. Should be set to null during unicast operation. A null value indicates the parameter has not been configured, or the receiver is operating in unicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
item.rtcp_destination_ip
: Destination IP address of RTCP packets (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) RTCP on/off.item.rtp_enabled
: (boolean) RTP reception active/inactive.item.source_ip
: Source IP address of RTP packets in unicast mode, source filter for source specific multicast. A null value indicates that the source IP address has not been configured in unicast mode, or the Receiver is in any-source multicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
or
transport_params
: (array of items) +item
: (any)
or
transport_params
: (array of items) +item
: (table/receiver_transport_params_websocket) Describes WebSocket Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Receivers must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. A null value indicates that the receiver has not yet been configured. Possible content: +- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string/uri) Must match the pattern:
or
transport_params
: (array of items) +item
: (table/receiver_transport_params_mqtt) Describes MQTT Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Receivers must support all parameters in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Receiver should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be received from via the MQTT broker. A null value indicates that the Receiver has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic used for MQTT status messages such as MQTT Last Will which are received via the MQTT broker. A null value indicates that the Receiver has not yet been configured, or is not using a connection status topic.item.source_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Receiver has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.source_port
: (integer | string) Source port for MQTT traffic. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
activation_time
parameter in the response. For immediate activation this should be the time the activation actually occurred as an absolute TAI timestamp. If no activation was requested in theactivation_time
will be setnull
.
+{ activation = { activation_time = "1496739062:0", mode = "activate_immediate" }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_file = { }; transport_params = { { destination_port = 5000; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_enabled = true; fec_mode = "2D"; interface_ip = "192.168.200.15"; multicast_ip = "232.105.26.177"; rtcp_destination_ip = "232.22.4.59"; rtcp_destination_port = 5001; rtcp_enabled = true; rtp_enabled = true; source_ip = "192.168.200.10"; }; }; }
Example 2: stage-transportfile{ activation = { }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_file = { data = "v=0\13\ o=- 1496222842 1496222842 IN IP4 172.29.226.25\13\ s=IP Studio Stream\13\ t=0 0\13\ m=video 5010 RTP/AVP 103\13\ c=IN IP4 232.250.98.80/32\13\ a=source-filter:incl IN IP4 232.250.98.80 172.29.226.25\13\ a=rtpmap:103 raw/90000\13\ a=fmtp:103 sampling=YCbCr-4:2:2; width=1920; height=1080; depth=10; interlace; exactframerate=25; colorimetry=BT709; PM=2110GPM; SSN=ST2110-20:2017; TP=2110TPW; \13\ a=mediaclk:direct=1876655126 rate=90000\13\ a=extmap:1 urn:x-nmos:rtp-hdrext:origin-timestamp\13\ a=extmap:2 urn:ietf:params:rtp-hdrext:smpte-tc 3600@90000/25\13\ a=extmap:3 urn:x-nmos:rtp-hdrext:flow-id\13\ a=extmap:4 urn:x-nmos:rtp-hdrext:source-id\13\ a=extmap:5 urn:x-nmos:rtp-hdrext:grain-flags\13\ a=extmap:7 urn:x-nmos:rtp-hdrext:sync-timestamp\13\ a=extmap:9 urn:x-nmos:rtp-hdrext:grain-duration\13\ a=ts-refclk:ptp=IEEE1588-2008:08-00-11-FF-FE-21-E1-B0:0\13\ "; type = "application/sdp"; }; transport_params = { { destination_port = 5010; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_enabled = false; fec_mode = "2D"; interface_ip = "172.23.19.35"; multicast_ip = "232.250.98.80"; rtcp_destination_ip = "auto"; rtcp_destination_port = 5001; rtcp_enabled = false; rtp_enabled = true; source_ip = "172.29.226.25"; }; }; }
Example 3: redundant-streams{ activation = { activation_time = "1496739062:0", mode = "activate_immediate" }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_file = { }; transport_params = { { destination_port = 5000; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_enabled = true; fec_mode = "2D"; interface_ip = "192.168.200.15"; multicast_ip = "232.105.26.177"; rtcp_destination_ip = "232.22.4.59"; rtcp_destination_port = 5001; rtcp_enabled = true; rtp_enabled = true; source_ip = "192.168.200.10"; }; { destination_port = 5000; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_enabled = true; fec_mode = "2D"; interface_ip = "192.168.200.15"; multicast_ip = "232.105.26.177"; rtcp_destination_ip = "232.79.192.98"; rtcp_destination_port = 5001; rtcp_enabled = true; rtp_enabled = true; source_ip = "192.168.200.10"; }; }; }
Or
-
table/receiver_response_struct
(status 202) A 202 response is returned when a request for a scheduled activation is accepted, to indicate that while the request itself was acceptable it has not yet been acted upon by the receiver. For scheduled activations
result.activation
: (table/activation_response_struct) Parameters concerned with activation of the transport parameters. +result.activation.activation_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating the absolute time the sender or receiver will or did actually activate for scheduled activations, or the time activation occurred for immediate activations. On the staged endpoint this field returns to null once the activation is completed or when the resource is unlocked by setting the activation mode to null. For immediate activations on the staged endpoint this property will be the time the activation actually occurred in the response to the PATCH request, but null in response to any GET requests thereafter. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). This parameter returns to null on the staged endpoint once an activation is completed or when it is explicitly set to null. For immediate activations, in the response to the PATCH request this field will be set to 'activate_immediate', but will be null in response to any subsequent GET requests. Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
result.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation requested. This field returns to null once the activation is completed on the staged endpoint or when the resource is unlocked by setting the activation mode to null. For an immediate activation this field will always be null on the staged endpoint, even in the response to the PATCH request. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.master_enable
: (boolean) Master on/off control for receiver.result.sender_id
: (string | nil) ID of the Sender subscribed to by this Receiver. This will be null if the receiver has not been configured to receive anything, or if it is receiving from a non-NMOS sender. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.result.transport_file
: (table/receiver_transport_file) Transport file parameters. 'data' and 'type' must both be strings or both be null. If 'type' is non-null 'data' is expected to contain a valid instance of the specified media type. +result.transport_file.data
: (string | nil) Content of the transport file.result.transport_file.type
: (string | nil) IANA assigned media type for file (e.g application/sdp).result.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +transport_params
: (array of items) +item
: (table/receiver_transport_params_rtp) Describes RTP Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. Receivers must support at least the <code>source_ip</code>, <code>interface_ip</code>, <code>rtp_enabled</code> and <code>destination_port</code> parameters, and must support the <code>multicast_ip</code> parameter if they are capable of multicast operation. Receivers supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. (auto = highest available number of dimensions by default). Possible values:{"auto","1D","2D"}
.item.interface_ip
: IP address of the network interface the receiver should use. The receiver should provide an enum in the constraints endpoint, which should contain the available interface addresses. If set to auto in multicast mode the receiver should determine which interface to use for itself, for example by using the routing tables. The behaviour of auto is undefined in unicast mode, and controllers should supply a specific interface address. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.multicast_ip
: IP multicast group address used in multicast operation only. Should be set to null during unicast operation. A null value indicates the parameter has not been configured, or the receiver is operating in unicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
item.rtcp_destination_ip
: Destination IP address of RTCP packets (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) RTCP on/off.item.rtp_enabled
: (boolean) RTP reception active/inactive.item.source_ip
: Source IP address of RTP packets in unicast mode, source filter for source specific multicast. A null value indicates that the source IP address has not been configured in unicast mode, or the Receiver is in any-source multicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
or
transport_params
: (array of items) +item
: (any)
or
transport_params
: (array of items) +item
: (table/receiver_transport_params_websocket) Describes WebSocket Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Receivers must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. A null value indicates that the receiver has not yet been configured. Possible content: +- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string/uri) Must match the pattern:
or
transport_params
: (array of items) +item
: (table/receiver_transport_params_mqtt) Describes MQTT Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Receivers must support all parameters in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Receiver should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be received from via the MQTT broker. A null value indicates that the Receiver has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic used for MQTT status messages such as MQTT Last Will which are received via the MQTT broker. A null value indicates that the Receiver has not yet been configured, or is not using a connection status topic.item.source_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Receiver has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.source_port
: (integer | string) Source port for MQTT traffic. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
activation_time
should be the absolute TAI time the parameters will actually transition. For absolute scheduled activations should be the same as the requested time, but may differ if the receiver is unable to schedule at the requested time. This may be because the transition may only occur, for example, at a frame boundary or end of GOP. In all other ways this response behaves identically to a 200 response.
+{ activation = { activation_time = "1496739064:0"; mode = "activate_scheduled_relative"; requested_time = "2:0"; }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_file = { }; transport_params = { { destination_port = 5000; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_enabled = true; fec_mode = "2D"; interface_ip = "192.168.200.15"; multicast_ip = "232.105.26.177"; rtcp_destination_ip = "auto"; rtcp_destination_port = 5001; rtcp_enabled = true; rtp_enabled = true; source_ip = "192.168.200.10"; }; }; }
Example 2: activate-scheduled-absolute{ activation = { activation_time = "1496739064:2500"; mode = "activate_scheduled_absolute"; requested_time = "1496739064:0"; }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_file = { }; transport_params = { { destination_port = 5000; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_enabled = true; fec_mode = "2D"; interface_ip = "192.168.200.15"; multicast_ip = "232.105.26.177"; rtcp_destination_ip = "auto"; rtcp_destination_port = 5001; rtcp_enabled = true; rtp_enabled = true; source_ip = "192.168.200.10"; }; }; }
Or
-
table/error
(status 400) A 400 response is returned when the request did not meet the schema and constraints.
+
result.code
: (number/integer) HTTP error code. Minimum:400
. Maximum:599
.result.debug
: (nil | string) Debug information which may assist a programmer working with the API.result.error
: (string) Human readable message which is suitable for user interface display, and helpful to the user.
{ code = 400, error = "`source_ip` must be a valid IPv4 or IPv6 address" }
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the requested resource does not exist +Or
-
table
(status 409)
result.body
: (string) Empty string.result.status
: (number) 409.
result
Returned when the requested resource is only available at a different API version. +Or
-
table
(status 423)
result.body
: (string) Empty string.result.status
: (number) 423.
result
Returned when the resource is locked because an activation has been scheduled. A resource may be unlocked by settingmode
inactivation
tonull
, which will cancel the pending activation. This may be done in the same request as a change to other parameters.
+Or
-
table/error
(status 500) A 500 response may be returned if the transport file could not be parsed, or there is some failure caused by activation which was not caused by a violation of schema or constraints.
result.code
: (number/integer) HTTP error code. Minimum:400
. Maximum:599
.result.debug
: (nil | string) Debug information which may assist a programmer working with the API.result.error
: (string) Human readable message which is suitable for user interface display, and helpful to the user.
+{ code = 500, error = "Could not establish link to hardware" }
Usage:
-- Example 1: activate-immediate connection = require "lua-repl.lib.rest.nmos.connection" api = connection:create_api("http://connection.nmos.acme.example.com") payload = { activation = { mode = "activate_immediate" }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_params = { { destination_port = 5000; interface_ip = "192.168.200.15"; multicast_ip = "232.105.26.177"; rtp_enabled = true; source_ip = "192.168.200.10"; }; }; } result = api.single.receivers[receiverId].staged:patch(payload) -- Example 2: activate-scheduled-absolute payload = { activation = { mode = "activate_scheduled_absolute", requested_time = "1496677550:20" }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_params = { { destination_port = 5000; interface_ip = "192.168.200.15"; multicast_ip = "232.105.26.177"; rtp_enabled = true; source_ip = "192.168.200.10"; }; }; } result = api.single.receivers[receiverId].staged:patch(payload) -- Example 3: activate-scheduled-relative payload = { activation = { mode = "activate_scheduled_relative", requested_time = "2:0" }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_params = { { destination_port = 5000; interface_ip = "192.168.200.15"; multicast_ip = "232.105.26.177"; rtp_enabled = true; source_ip = "192.168.200.10"; }; }; } result = api.single.receivers[receiverId].staged:patch(payload) -- Example 4: activation-only payload = { activation = { mode = "activate_immediate" }; } result = api.single.receivers[receiverId].staged:patch(payload) -- Example 5: redundant-streams payload = { activation = { mode = "activate_immediate" }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_params = { { destination_port = 5000; interface_ip = "192.168.200.15"; multicast_ip = "232.105.26.177"; rtp_enabled = true; source_ip = "192.168.200.10"; }; { destination_port = 5000; interface_ip = "192.168.210.15"; multicast_ip = "232.3.28.144"; rtp_enabled = true; source_ip = "192.168.210.10"; }; }; } result = api.single.receivers[receiverId].staged:patch(payload) -- Example 6: stage-transportfile payload = { sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_file = { data = "v=0\13\ o=- 1496222842 1496222842 IN IP4 172.29.226.25\13\ s=IP Studio Stream\13\ t=0 0\13\ m=video 5010 RTP/AVP 103\13\ c=IN IP4 232.250.98.80/32\13\ a=source-filter:incl IN IP4 232.250.98.80 172.29.226.25\13\ a=rtpmap:103 raw/90000\13\ a=fmtp:103 sampling=YCbCr-4:2:2; width=1920; height=1080; depth=10; interlace; exactframerate=25; colorimetry=BT709; PM=2110GPM; SSN=ST2110-20:2017; TP=2110TPW; \13\ a=mediaclk:direct=1876655126 rate=90000\13\ a=extmap:1 urn:x-nmos:rtp-hdrext:origin-timestamp\13\ a=extmap:2 urn:ietf:params:rtp-hdrext:smpte-tc 3600@90000/25\13\ a=extmap:3 urn:x-nmos:rtp-hdrext:flow-id\13\ a=extmap:4 urn:x-nmos:rtp-hdrext:source-id\13\ a=extmap:5 urn:x-nmos:rtp-hdrext:grain-flags\13\ a=extmap:7 urn:x-nmos:rtp-hdrext:sync-timestamp\13\ a=extmap:9 urn:x-nmos:rtp-hdrext:grain-duration\13\ a=ts-refclk:ptp=IEEE1588-2008:08-00-11-FF-FE-21-E1-B0:0\13\ "; type = "application/sdp"; }; } result = api.single.receivers[receiverId].staged:patch(payload) -- Example 7: unicast payload = { activation = { mode = "activate_immediate" }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_params = { { destination_port = 5000; interface_ip = "192.168.200.15"; rtp_enabled = true; source_ip = "192.168.200.10"; }; }; } result = api.single.receivers[receiverId].staged:patch(payload)
- payload
(table) PATCH must comply with the constraints served at /constraints but not all fields are mandatory. Any fields not included in the request JSON remain unchanged, even if they are a child of a property that was included in the request. For example a request containing changes to a single transport parameter will not alter any other transport parameter, even though the
- api.single.receivers[receiverId].transporttype:get ()
-
Returns the URN base for the transport type employed by this receiver with any subclassifications or versions removed.
Returns:
-
string/uri
(status 200)
- Transport type URN base used by the Sender or Receiver (i.e. with any subclassifications or versions removed). Possible content:
- (string) Possible values:
{"urn:x-nmos:transport:rtp","urn:x-nmos:transport:dash","urn:x-nmos:transport:websocket","urn:x-nmos:transport:mqtt"}
.
Example: - (string) Possible values:
"urn:x-nmos:transport:mqtt"
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the resource does not exist +Or
- Transport type URN base used by the Sender or Receiver (i.e. with any subclassifications or versions removed). Possible content:
- api.single.receivers[receiverId]:get ()
-
List API endpoints.
Returns:
-
table/connectionapi_receiver[]
(status 200)
result.nil
: (array of items) Connection API /single/receivers/{receiverId} base resource. Describes the Connection API /single/receivers/{receiverId} base resource. +item
: (string) Possible values:{"constraints/","staged/","active/","transporttype/"}
.
Example:
{ "constraints/", "staged/", "active/", "transporttype/" }
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the requested resource does not exist +Or
- api.single.receivers[receiverId]:get_active ()
-
Get active receiver parameters. When the
master_enable
parameter isfalse
receivers should not process any incoming streams, and should unsubscribe from any multicast streams they are receiving. For RTP receivers thertp_enabled
parameter allows for the individual disabling of SMPTE 2022-7 legs. On activation all instances ofauto
must be resolved into the actual values that will be used by the receiver, unless there is an error condition. For example if a receiver has theinterface_ip
parameter set toauto
in /staged theninterface_ip
in /active should show the IP address of the interface chosen by the receiver. The parameter will remain set toauto
in staged, and may be resolved to a different value on each subsequent activation. In cases, such asinterface_ip
, where the parameter changing unexpectedly at activation through re-resolution may be undesirable, care should be taken in implementation to manage this. If there is an error condition that meansauto
cannot be resolved, the active transport parameters must not change, and the underlying receiver must continue as before.
This function is alias forapi.single.receivers[receiverId].active:get()
.Returns:
-
table/receiver_response_struct
(status 200)
+
result.activation
: (table/activation_response_struct) Parameters concerned with activation of the transport parameters. +result.activation.activation_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating the absolute time the sender or receiver will or did actually activate for scheduled activations, or the time activation occurred for immediate activations. On the staged endpoint this field returns to null once the activation is completed or when the resource is unlocked by setting the activation mode to null. For immediate activations on the staged endpoint this property will be the time the activation actually occurred in the response to the PATCH request, but null in response to any GET requests thereafter. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). This parameter returns to null on the staged endpoint once an activation is completed or when it is explicitly set to null. For immediate activations, in the response to the PATCH request this field will be set to 'activate_immediate', but will be null in response to any subsequent GET requests. Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
result.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation requested. This field returns to null once the activation is completed on the staged endpoint or when the resource is unlocked by setting the activation mode to null. For an immediate activation this field will always be null on the staged endpoint, even in the response to the PATCH request. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.master_enable
: (boolean) Master on/off control for receiver.result.sender_id
: (string | nil) ID of the Sender subscribed to by this Receiver. This will be null if the receiver has not been configured to receive anything, or if it is receiving from a non-NMOS sender. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.result.transport_file
: (table/receiver_transport_file) Transport file parameters. 'data' and 'type' must both be strings or both be null. If 'type' is non-null 'data' is expected to contain a valid instance of the specified media type. +result.transport_file.data
: (string | nil) Content of the transport file.result.transport_file.type
: (string | nil) IANA assigned media type for file (e.g application/sdp).result.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +transport_params
: (array of items) +item
: (table/receiver_transport_params_rtp) Describes RTP Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. Receivers must support at least the <code>source_ip</code>, <code>interface_ip</code>, <code>rtp_enabled</code> and <code>destination_port</code> parameters, and must support the <code>multicast_ip</code> parameter if they are capable of multicast operation. Receivers supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. (auto = highest available number of dimensions by default). Possible values:{"auto","1D","2D"}
.item.interface_ip
: IP address of the network interface the receiver should use. The receiver should provide an enum in the constraints endpoint, which should contain the available interface addresses. If set to auto in multicast mode the receiver should determine which interface to use for itself, for example by using the routing tables. The behaviour of auto is undefined in unicast mode, and controllers should supply a specific interface address. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.multicast_ip
: IP multicast group address used in multicast operation only. Should be set to null during unicast operation. A null value indicates the parameter has not been configured, or the receiver is operating in unicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
item.rtcp_destination_ip
: Destination IP address of RTCP packets (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) RTCP on/off.item.rtp_enabled
: (boolean) RTP reception active/inactive.item.source_ip
: Source IP address of RTP packets in unicast mode, source filter for source specific multicast. A null value indicates that the source IP address has not been configured in unicast mode, or the Receiver is in any-source multicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
or
transport_params
: (array of items) +item
: (any)
or
transport_params
: (array of items) +item
: (table/receiver_transport_params_websocket) Describes WebSocket Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Receivers must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. A null value indicates that the receiver has not yet been configured. Possible content: +- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string/uri) Must match the pattern:
or
transport_params
: (array of items) +item
: (table/receiver_transport_params_mqtt) Describes MQTT Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Receivers must support all parameters in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Receiver should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be received from via the MQTT broker. A null value indicates that the Receiver has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic used for MQTT status messages such as MQTT Last Will which are received via the MQTT broker. A null value indicates that the Receiver has not yet been configured, or is not using a connection status topic.item.source_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Receiver has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.source_port
: (integer | string) Source port for MQTT traffic. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
{ activation = { activation_time = "1496739062:263900"; mode = "activate_immediate"; requested_time = "1496739062:0"; }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_file = { data = "v=0\13\ o=- 1496222842 1496222842 IN IP4 172.29.226.25\13\ s=IP Studio Stream\13\ t=0 0\13\ m=video 5010 RTP/AVP 103\13\ c=IN IP4 232.250.98.80/32\13\ a=source-filter:incl IN IP4 232.250.98.80 172.29.226.25\13\ a=rtpmap:103 raw/90000\13\ a=fmtp:103 sampling=YCbCr-4:2:2; width=1920; height=1080; depth=10; interlace; exactframerate=25; colorimetry=BT709; PM=2110GPM; SSN=ST2110-20:2017; TP=2110TPW; \13\ a=mediaclk:direct=1876655126 rate=90000\13\ a=extmap:1 urn:x-nmos:rtp-hdrext:origin-timestamp\13\ a=extmap:2 urn:ietf:params:rtp-hdrext:smpte-tc 3600@90000/25\13\ a=extmap:3 urn:x-nmos:rtp-hdrext:flow-id\13\ a=extmap:4 urn:x-nmos:rtp-hdrext:source-id\13\ a=extmap:5 urn:x-nmos:rtp-hdrext:grain-flags\13\ a=extmap:7 urn:x-nmos:rtp-hdrext:sync-timestamp\13\ a=extmap:9 urn:x-nmos:rtp-hdrext:grain-duration\13\ a=ts-refclk:ptp=IEEE1588-2008:08-00-11-FF-FE-21-E1-B0:0\13\ "; type = "application/sdp"; }; transport_params = { { destination_port = 5010; fec1D_destination_port = 5012; fec2D_destination_port = 5014; fec_enabled = false; fec_mode = "2D"; interface_ip = "172.23.19.35"; multicast_ip = "232.250.98.80"; rtcp_destination_ip = "232.250.98.80"; rtcp_destination_port = 5001; rtcp_enabled = false; rtp_enabled = true; source_ip = "172.29.226.25"; }; }; }
Example 2: NormalMQTT{ activation = { activation_time = "1541508905:263900"; mode = "activate_immediate"; requested_time = "1541508905:0"; }; master_enable = true; sender_id = "eae33112-b56c-4a36-8b68-05ab5b6268bc"; transport_file = { }; transport_params = { { broker_authorization = false; broker_protocol = "mqtt"; broker_topic = "my_topic_name"; connection_status_broker_topic = "my_status_topic_name"; source_host = "broker.example.com"; source_port = 1883; }; }; }
Example 3: Uninitialised{ activation = { }; master_enable = true; transport_file = { }; transport_params = { { destination_port = 5004; fec1D_destination_port = 5006; fec2D_destination_port = 5008; fec_destination_ip = "172.23.19.35"; fec_enabled = false; interface_ip = "172.23.19.35"; rtcp_destination_ip = "172.23.19.35"; rtcp_destination_port = 5005; rtcp_enabled = false; rtp_enabled = true; }; }; }
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the requested resource does not exist +Or
- api.single.receivers[receiverId]:get_constraints ()
-
Lists the constraints for each transport parameter (e.g max/min value, enumerated values etc.) using a very limited subset of JSON schema. Every transport parameter in the staged resource must be represented here. Any minimum/maximum constraints listed here must not allow a wider range of values than those allowed by the core schema. Any enum defined on this endpoint must only contain a subset of the values allowed for that parameter in the core schema. Similarly, pattern constraints must only narrow the allowed values. If the receiver does not constrain parameters beyond what is specified in the core schema then the constraints in the core schema should not be duplicated on this endpoint. Where an "auto" mode is allowed in the core schema this mode must always be supported by the receiver if the parameter is exposed. If SMPTE 2022-7 is in use, two entries are in the outer array of the resource. The first entry is the constraints for the primary leg. If SMPTE 2022-7 is not in use only one entry should be present in the outer array.
This function is alias forapi.single.receivers[receiverId].constraints:get()
.Returns:
-
any
(status 200)
Example 1: SMPTE2022-7
{ { destination_port = { maximum = 50000, minimum = 49151 }; fec1D_destination_port = { maximum = 49151, minimum = 5000 }; fec2D_destination_port = { maximum = 49151, minimum = 5000 }; fec_destination_ip = { }; fec_enabled = { }; fec_mode = { enum = { "1D", "2D" }; }; interface_ip = { enum = { "192.168.7.2"; "192.168.8.5"; "2001:0db8:85a3:0000:0000:8a2e:0370:7334"; "2001:0db8:85a3:0000:0000:8a2e:0370:a24b"; }; }; multicast_ip = { }; rtcp_destination_ip = { }; rtcp_destination_port = { maximum = 49151, minimum = 5000 }; rtcp_enabled = { }; rtp_enabled = { }; source_ip = { }; }; { destination_port = { maximum = 50000, minimum = 49151 }; fec1D_destination_port = { maximum = 49151, minimum = 5000 }; fec2D_destination_port = { maximum = 49151, minimum = 5000 }; fec_block_height = { maximum = 200, minimum = 4 }; fec_block_width = { maximum = 200, minimum = 4 }; fec_destination_ip = { }; fec_enabled = { }; fec_mode = { enum = { "1D", "2D" }; }; interface_ip = { enum = { "192.168.7.2"; "192.168.8.5"; "2001:0db8:85a3:0000:0000:8a2e:0370:7334"; "2001:0db8:85a3:0000:0000:8a2e:0370:a24b"; }; }; multicast_ip = { }; rtcp_destination_ip = { }; rtcp_destination_port = { maximum = 49151, minimum = 5000 }; rtcp_enabled = { }; rtp_enabled = { }; source_ip = { }; }; }
Example 2: RTPNo2022-7{ { destination_port = { maximum = 50000, minimum = 49151 }; fec1D_destination_port = { maximum = 49151, minimum = 5000 }; fec2D_destination_port = { maximum = 49151, minimum = 5000 }; fec_destination_ip = { }; fec_enabled = { }; fec_mode = { enum = { "1D", "2D" }; }; interface_ip = { enum = { "192.168.7.2"; "192.168.8.5"; "2001:0db8:85a3:0000:0000:8a2e:0370:7334"; "2001:0db8:85a3:0000:0000:8a2e:0370:a24b"; }; }; multicast_ip = { }; rtcp_destination_ip = { }; rtcp_destination_port = { maximum = 49151, minimum = 5000 }; rtcp_enabled = { }; rtp_enabled = { }; source_ip = { }; }; }
Example 3: MQTT{ { broker_authorization = { enum = { false }; }; broker_protocol = { enum = { "mqtt" }; }; broker_topic = { }; connection_status_broker_topic = { }; source_host = { }; source_port = { enum = { 1833, 8883 }; }; }; }
Example 4: WebSocketPlusExt{ { connection_authorization = { }; connection_uri = { }; ext_retry_timeout = { maximum = 60, minimum = 5 }; ext_subscription_data = { }; }; }
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the requested resource does not exist +Or
- api.single.receivers[receiverId]:get_staged ()
-
Get staged receiver transport parameters object. In SMPTE 2022-7 operation element 0 of the
transport_params
array shall be the parameters applied to the primary leg, and element 1 the secondary leg. There shall only be one element present intransport_params
when SMPTE 2022-7 is not in use.
This function is alias forapi.single.receivers[receiverId].staged:get()
.Returns:
-
table/receiver_response_struct
(status 200) Additionally constrained by the constraints at /constraints
+
result.activation
: (table/activation_response_struct) Parameters concerned with activation of the transport parameters. +result.activation.activation_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating the absolute time the sender or receiver will or did actually activate for scheduled activations, or the time activation occurred for immediate activations. On the staged endpoint this field returns to null once the activation is completed or when the resource is unlocked by setting the activation mode to null. For immediate activations on the staged endpoint this property will be the time the activation actually occurred in the response to the PATCH request, but null in response to any GET requests thereafter. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). This parameter returns to null on the staged endpoint once an activation is completed or when it is explicitly set to null. For immediate activations, in the response to the PATCH request this field will be set to 'activate_immediate', but will be null in response to any subsequent GET requests. Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
result.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation requested. This field returns to null once the activation is completed on the staged endpoint or when the resource is unlocked by setting the activation mode to null. For an immediate activation this field will always be null on the staged endpoint, even in the response to the PATCH request. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.master_enable
: (boolean) Master on/off control for receiver.result.sender_id
: (string | nil) ID of the Sender subscribed to by this Receiver. This will be null if the receiver has not been configured to receive anything, or if it is receiving from a non-NMOS sender. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.result.transport_file
: (table/receiver_transport_file) Transport file parameters. 'data' and 'type' must both be strings or both be null. If 'type' is non-null 'data' is expected to contain a valid instance of the specified media type. +result.transport_file.data
: (string | nil) Content of the transport file.result.transport_file.type
: (string | nil) IANA assigned media type for file (e.g application/sdp).result.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +transport_params
: (array of items) +item
: (table/receiver_transport_params_rtp) Describes RTP Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. Receivers must support at least the <code>source_ip</code>, <code>interface_ip</code>, <code>rtp_enabled</code> and <code>destination_port</code> parameters, and must support the <code>multicast_ip</code> parameter if they are capable of multicast operation. Receivers supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. (auto = highest available number of dimensions by default). Possible values:{"auto","1D","2D"}
.item.interface_ip
: IP address of the network interface the receiver should use. The receiver should provide an enum in the constraints endpoint, which should contain the available interface addresses. If set to auto in multicast mode the receiver should determine which interface to use for itself, for example by using the routing tables. The behaviour of auto is undefined in unicast mode, and controllers should supply a specific interface address. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.multicast_ip
: IP multicast group address used in multicast operation only. Should be set to null during unicast operation. A null value indicates the parameter has not been configured, or the receiver is operating in unicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
item.rtcp_destination_ip
: Destination IP address of RTCP packets (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) RTCP on/off.item.rtp_enabled
: (boolean) RTP reception active/inactive.item.source_ip
: Source IP address of RTP packets in unicast mode, source filter for source specific multicast. A null value indicates that the source IP address has not been configured in unicast mode, or the Receiver is in any-source multicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
or
transport_params
: (array of items) +item
: (any)
or
transport_params
: (array of items) +item
: (table/receiver_transport_params_websocket) Describes WebSocket Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Receivers must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. A null value indicates that the receiver has not yet been configured. Possible content: +- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string/uri) Must match the pattern:
or
transport_params
: (array of items) +item
: (table/receiver_transport_params_mqtt) Describes MQTT Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Receivers must support all parameters in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Receiver should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be received from via the MQTT broker. A null value indicates that the Receiver has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic used for MQTT status messages such as MQTT Last Will which are received via the MQTT broker. A null value indicates that the Receiver has not yet been configured, or is not using a connection status topic.item.source_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Receiver has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.source_port
: (integer | string) Source port for MQTT traffic. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
{ activation = { activation_time = "1499333737:0"; mode = "activate_scheduled_relative"; requested_time = "5:0"; }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_file = { }; transport_params = { { destination_port = 5000; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_destination_ip = "auto"; fec_enabled = true; fec_mode = "2D"; interface_ip = "172.23.19.110"; multicast_ip = "232.250.98.80"; rtcp_destination_ip = "auto"; rtcp_destination_port = 5001; rtcp_enabled = true; rtp_enabled = true; source_ip = "172.23.19.48"; }; { destination_port = 5000; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_destination_ip = "auto"; fec_enabled = true; fec_mode = "2D"; interface_ip = "172.23.20.110"; multicast_ip = "232.250.99.80"; rtcp_destination_ip = "auto"; rtcp_destination_port = 5001; rtcp_enabled = true; rtp_enabled = true; source_ip = "172.23.20.48"; }; }; }
Example 2: Normal{ activation = { }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_file = { }; transport_params = { { destination_port = 5000; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_destination_ip = "auto"; fec_enabled = true; fec_mode = "2D"; interface_ip = "172.23.19.110"; multicast_ip = "232.250.98.80"; rtcp_destination_ip = "auto"; rtcp_destination_port = 5001; rtcp_enabled = true; rtp_enabled = true; source_ip = "172.23.19.48"; }; { destination_port = 5000; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_destination_ip = "auto"; fec_enabled = true; fec_mode = "2D"; interface_ip = "172.23.20.110"; multicast_ip = "232.250.99.80"; rtcp_destination_ip = "auto"; rtcp_destination_port = 5001; rtcp_enabled = true; rtp_enabled = true; source_ip = "172.23.20.48"; }; }; }
Example 3: Uninitialised{ activation = { }; master_enable = true; transport_file = { }; transport_params = { { destination_port = "auto"; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_destination_ip = "auto"; fec_enabled = false; fec_mode = "1D"; interface_ip = "auto"; rtcp_destination_ip = "auto"; rtcp_destination_port = "auto"; rtcp_enabled = false; rtp_enabled = true; }; }; }
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the requested resource does not exist +Or
- api.single.receivers[receiverId]:get_transporttype ()
-
Returns the URN base for the transport type employed by this receiver with any subclassifications or versions removed.
This function is alias forapi.single.receivers[receiverId].transporttype:get()
.Returns:
-
string/uri
(status 200)
- Transport type URN base used by the Sender or Receiver (i.e. with any subclassifications or versions removed). Possible content:
- (string) Possible values:
{"urn:x-nmos:transport:rtp","urn:x-nmos:transport:dash","urn:x-nmos:transport:websocket","urn:x-nmos:transport:mqtt"}
.
Example: - (string) Possible values:
"urn:x-nmos:transport:mqtt"
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the resource does not exist +Or
- Transport type URN base used by the Sender or Receiver (i.e. with any subclassifications or versions removed). Possible content:
- api.single.receivers[receiverId]:options_staged ()
-
A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes.
This function is alias for
api.single.receivers[receiverId].staged:options()
.Returns:
Or
Or
- api.single.receivers[receiverId]:patch_staged (payload)
-
Update staged parameters for receiver. Note that for activations the
mode
parameter will return tonull
once the activation transaction with the client is completed (i.e the response to the PATCH has been sent by the server). When a transport file is staged the parameters in that transport file should be propagated to their corresponding transport parameters and the response should show these updated values. On activation the value of the entries intransport_parameters
must be used to program the receiver, not those in the transport file directly. However while the transport file is still present (i.edata
is notnull
) media parameters in the transport file should be applied to the receiver. Settingdata
tonull
has no impact on thetransport_parameters
array, or any other property. Where a transport file has been staged the transport parameters in the response will reflect the new values assigned to them by the transport file. The transport parameters should be updated from the transport file indata
on every PATCH request that includes thedata
field. Even if the value ofdata
in the request matches the value ofdata
currently stored in the API the transport parameters are still re-populated. In the case where the transport file and transport parameters are updated in the same PATCH request transport parameters specified in the request object take precedence over those in the transport file. In SMPTE 2022-7 operation element 0 of thetransport_params
array shall be the parameters applied to the primary leg, and element 1 the secondary leg. There shall only be one element present intransport_params
when SMPTE 2022-7 is not in use.
This function is alias forapi.single.receivers[receiverId].staged:patch(payload)
.Parameters:
- payload
(table) PATCH must comply with the constraints served at /constraints but not all fields are mandatory. Any fields not included in the request JSON remain unchanged, even if they are a child of a property that was included in the request. For example a request containing changes to a single transport parameter will not alter any other transport parameter, even though the
transport_params
property was part of the request.
args.payload
: (table/receiver_stage_struct) Describes a receiver. +args.payload.activation
: (table/activation_struct) Parameters concerned with activation of the transport parameters. +args.payload.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
args.payload.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation. Should be null or not present if 'mode' is null. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
args.payload.master_enable
: (boolean) Master on/off control for receiver.args.payload.sender_id
: (string | nil) ID of the Sender subscribed to by this Receiver. This will be null if the receiver has not been configured to receive anything, or if it is receiving from a non-NMOS sender. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.args.payload.transport_file
: (table/receiver_transport_file) Transport file parameters. 'data' and 'type' must both be strings or both be null. If 'type' is non-null 'data' is expected to contain a valid instance of the specified media type. +args.payload.transport_file.data
: (string | nil) Content of the transport file.args.payload.transport_file.type
: (string | nil) IANA assigned media type for file (e.g application/sdp).args.payload.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +payload.transport_params
: (array of items) +item
: (table/receiver_transport_params_rtp) Describes RTP Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. Receivers must support at least the <code>source_ip</code>, <code>interface_ip</code>, <code>rtp_enabled</code> and <code>destination_port</code> parameters, and must support the <code>multicast_ip</code> parameter if they are capable of multicast operation. Receivers supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. (auto = highest available number of dimensions by default). Possible values:{"auto","1D","2D"}
.item.interface_ip
: IP address of the network interface the receiver should use. The receiver should provide an enum in the constraints endpoint, which should contain the available interface addresses. If set to auto in multicast mode the receiver should determine which interface to use for itself, for example by using the routing tables. The behaviour of auto is undefined in unicast mode, and controllers should supply a specific interface address. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.multicast_ip
: IP multicast group address used in multicast operation only. Should be set to null during unicast operation. A null value indicates the parameter has not been configured, or the receiver is operating in unicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
item.rtcp_destination_ip
: Destination IP address of RTCP packets (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) RTCP on/off.item.rtp_enabled
: (boolean) RTP reception active/inactive.item.source_ip
: Source IP address of RTP packets in unicast mode, source filter for source specific multicast. A null value indicates that the source IP address has not been configured in unicast mode, or the Receiver is in any-source multicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
or
payload.transport_params
: (array of items) +item
: (any)
or
payload.transport_params
: (array of items) +item
: (table/receiver_transport_params_websocket) Describes WebSocket Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Receivers must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. A null value indicates that the receiver has not yet been configured. Possible content: +- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string/uri) Must match the pattern:
or
payload.transport_params
: (array of items) +item
: (table/receiver_transport_params_mqtt) Describes MQTT Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Receivers must support all parameters in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Receiver should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be received from via the MQTT broker. A null value indicates that the Receiver has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic used for MQTT status messages such as MQTT Last Will which are received via the MQTT broker. A null value indicates that the Receiver has not yet been configured, or is not using a connection status topic.item.source_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Receiver has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.source_port
: (integer | string) Source port for MQTT traffic. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
Returns:
-
table/receiver_response_struct
(status 200) A 200 response is returned for PATCH requests where no activation has been scheduled, an activation has been cancelled, or an immediate activation has been requested. The response will always contain the full set of parameters in the response schema, and all supported transport parameters. For a request involving an immediate activation the API should only return once the transport parameters have been applied to the underlying receiver. Note the presence of the extra
result.activation
: (table/activation_response_struct) Parameters concerned with activation of the transport parameters. +result.activation.activation_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating the absolute time the sender or receiver will or did actually activate for scheduled activations, or the time activation occurred for immediate activations. On the staged endpoint this field returns to null once the activation is completed or when the resource is unlocked by setting the activation mode to null. For immediate activations on the staged endpoint this property will be the time the activation actually occurred in the response to the PATCH request, but null in response to any GET requests thereafter. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). This parameter returns to null on the staged endpoint once an activation is completed or when it is explicitly set to null. For immediate activations, in the response to the PATCH request this field will be set to 'activate_immediate', but will be null in response to any subsequent GET requests. Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
result.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation requested. This field returns to null once the activation is completed on the staged endpoint or when the resource is unlocked by setting the activation mode to null. For an immediate activation this field will always be null on the staged endpoint, even in the response to the PATCH request. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.master_enable
: (boolean) Master on/off control for receiver.result.sender_id
: (string | nil) ID of the Sender subscribed to by this Receiver. This will be null if the receiver has not been configured to receive anything, or if it is receiving from a non-NMOS sender. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.result.transport_file
: (table/receiver_transport_file) Transport file parameters. 'data' and 'type' must both be strings or both be null. If 'type' is non-null 'data' is expected to contain a valid instance of the specified media type. +result.transport_file.data
: (string | nil) Content of the transport file.result.transport_file.type
: (string | nil) IANA assigned media type for file (e.g application/sdp).result.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +transport_params
: (array of items) +item
: (table/receiver_transport_params_rtp) Describes RTP Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. Receivers must support at least the <code>source_ip</code>, <code>interface_ip</code>, <code>rtp_enabled</code> and <code>destination_port</code> parameters, and must support the <code>multicast_ip</code> parameter if they are capable of multicast operation. Receivers supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. (auto = highest available number of dimensions by default). Possible values:{"auto","1D","2D"}
.item.interface_ip
: IP address of the network interface the receiver should use. The receiver should provide an enum in the constraints endpoint, which should contain the available interface addresses. If set to auto in multicast mode the receiver should determine which interface to use for itself, for example by using the routing tables. The behaviour of auto is undefined in unicast mode, and controllers should supply a specific interface address. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.multicast_ip
: IP multicast group address used in multicast operation only. Should be set to null during unicast operation. A null value indicates the parameter has not been configured, or the receiver is operating in unicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
item.rtcp_destination_ip
: Destination IP address of RTCP packets (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) RTCP on/off.item.rtp_enabled
: (boolean) RTP reception active/inactive.item.source_ip
: Source IP address of RTP packets in unicast mode, source filter for source specific multicast. A null value indicates that the source IP address has not been configured in unicast mode, or the Receiver is in any-source multicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
or
transport_params
: (array of items) +item
: (any)
or
transport_params
: (array of items) +item
: (table/receiver_transport_params_websocket) Describes WebSocket Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Receivers must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. A null value indicates that the receiver has not yet been configured. Possible content: +- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string/uri) Must match the pattern:
or
transport_params
: (array of items) +item
: (table/receiver_transport_params_mqtt) Describes MQTT Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Receivers must support all parameters in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Receiver should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be received from via the MQTT broker. A null value indicates that the Receiver has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic used for MQTT status messages such as MQTT Last Will which are received via the MQTT broker. A null value indicates that the Receiver has not yet been configured, or is not using a connection status topic.item.source_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Receiver has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.source_port
: (integer | string) Source port for MQTT traffic. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
activation_time
parameter in the response. For immediate activation this should be the time the activation actually occurred as an absolute TAI timestamp. If no activation was requested in theactivation_time
will be setnull
.
+{ activation = { activation_time = "1496739062:0", mode = "activate_immediate" }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_file = { }; transport_params = { { destination_port = 5000; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_enabled = true; fec_mode = "2D"; interface_ip = "192.168.200.15"; multicast_ip = "232.105.26.177"; rtcp_destination_ip = "232.22.4.59"; rtcp_destination_port = 5001; rtcp_enabled = true; rtp_enabled = true; source_ip = "192.168.200.10"; }; }; }
Example 2: stage-transportfile{ activation = { }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_file = { data = "v=0\13\ o=- 1496222842 1496222842 IN IP4 172.29.226.25\13\ s=IP Studio Stream\13\ t=0 0\13\ m=video 5010 RTP/AVP 103\13\ c=IN IP4 232.250.98.80/32\13\ a=source-filter:incl IN IP4 232.250.98.80 172.29.226.25\13\ a=rtpmap:103 raw/90000\13\ a=fmtp:103 sampling=YCbCr-4:2:2; width=1920; height=1080; depth=10; interlace; exactframerate=25; colorimetry=BT709; PM=2110GPM; SSN=ST2110-20:2017; TP=2110TPW; \13\ a=mediaclk:direct=1876655126 rate=90000\13\ a=extmap:1 urn:x-nmos:rtp-hdrext:origin-timestamp\13\ a=extmap:2 urn:ietf:params:rtp-hdrext:smpte-tc 3600@90000/25\13\ a=extmap:3 urn:x-nmos:rtp-hdrext:flow-id\13\ a=extmap:4 urn:x-nmos:rtp-hdrext:source-id\13\ a=extmap:5 urn:x-nmos:rtp-hdrext:grain-flags\13\ a=extmap:7 urn:x-nmos:rtp-hdrext:sync-timestamp\13\ a=extmap:9 urn:x-nmos:rtp-hdrext:grain-duration\13\ a=ts-refclk:ptp=IEEE1588-2008:08-00-11-FF-FE-21-E1-B0:0\13\ "; type = "application/sdp"; }; transport_params = { { destination_port = 5010; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_enabled = false; fec_mode = "2D"; interface_ip = "172.23.19.35"; multicast_ip = "232.250.98.80"; rtcp_destination_ip = "auto"; rtcp_destination_port = 5001; rtcp_enabled = false; rtp_enabled = true; source_ip = "172.29.226.25"; }; }; }
Example 3: redundant-streams{ activation = { activation_time = "1496739062:0", mode = "activate_immediate" }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_file = { }; transport_params = { { destination_port = 5000; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_enabled = true; fec_mode = "2D"; interface_ip = "192.168.200.15"; multicast_ip = "232.105.26.177"; rtcp_destination_ip = "232.22.4.59"; rtcp_destination_port = 5001; rtcp_enabled = true; rtp_enabled = true; source_ip = "192.168.200.10"; }; { destination_port = 5000; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_enabled = true; fec_mode = "2D"; interface_ip = "192.168.200.15"; multicast_ip = "232.105.26.177"; rtcp_destination_ip = "232.79.192.98"; rtcp_destination_port = 5001; rtcp_enabled = true; rtp_enabled = true; source_ip = "192.168.200.10"; }; }; }
Or
-
table/receiver_response_struct
(status 202) A 202 response is returned when a request for a scheduled activation is accepted, to indicate that while the request itself was acceptable it has not yet been acted upon by the receiver. For scheduled activations
result.activation
: (table/activation_response_struct) Parameters concerned with activation of the transport parameters. +result.activation.activation_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating the absolute time the sender or receiver will or did actually activate for scheduled activations, or the time activation occurred for immediate activations. On the staged endpoint this field returns to null once the activation is completed or when the resource is unlocked by setting the activation mode to null. For immediate activations on the staged endpoint this property will be the time the activation actually occurred in the response to the PATCH request, but null in response to any GET requests thereafter. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). This parameter returns to null on the staged endpoint once an activation is completed or when it is explicitly set to null. For immediate activations, in the response to the PATCH request this field will be set to 'activate_immediate', but will be null in response to any subsequent GET requests. Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
result.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation requested. This field returns to null once the activation is completed on the staged endpoint or when the resource is unlocked by setting the activation mode to null. For an immediate activation this field will always be null on the staged endpoint, even in the response to the PATCH request. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.master_enable
: (boolean) Master on/off control for receiver.result.sender_id
: (string | nil) ID of the Sender subscribed to by this Receiver. This will be null if the receiver has not been configured to receive anything, or if it is receiving from a non-NMOS sender. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.result.transport_file
: (table/receiver_transport_file) Transport file parameters. 'data' and 'type' must both be strings or both be null. If 'type' is non-null 'data' is expected to contain a valid instance of the specified media type. +result.transport_file.data
: (string | nil) Content of the transport file.result.transport_file.type
: (string | nil) IANA assigned media type for file (e.g application/sdp).result.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +transport_params
: (array of items) +item
: (table/receiver_transport_params_rtp) Describes RTP Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. Receivers must support at least the <code>source_ip</code>, <code>interface_ip</code>, <code>rtp_enabled</code> and <code>destination_port</code> parameters, and must support the <code>multicast_ip</code> parameter if they are capable of multicast operation. Receivers supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. (auto = highest available number of dimensions by default). Possible values:{"auto","1D","2D"}
.item.interface_ip
: IP address of the network interface the receiver should use. The receiver should provide an enum in the constraints endpoint, which should contain the available interface addresses. If set to auto in multicast mode the receiver should determine which interface to use for itself, for example by using the routing tables. The behaviour of auto is undefined in unicast mode, and controllers should supply a specific interface address. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.multicast_ip
: IP multicast group address used in multicast operation only. Should be set to null during unicast operation. A null value indicates the parameter has not been configured, or the receiver is operating in unicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
item.rtcp_destination_ip
: Destination IP address of RTCP packets (auto = multicast_ip (multicast mode) or interface_ip (unicast mode) by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) RTCP on/off.item.rtp_enabled
: (boolean) RTP reception active/inactive.item.source_ip
: Source IP address of RTP packets in unicast mode, source filter for source specific multicast. A null value indicates that the source IP address has not been configured in unicast mode, or the Receiver is in any-source multicast mode. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (nil)
or
transport_params
: (array of items) +item
: (any)
or
transport_params
: (array of items) +item
: (table/receiver_transport_params_websocket) Describes WebSocket Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Receivers must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. A null value indicates that the receiver has not yet been configured. Possible content: +- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string/uri) Must match the pattern:
or
transport_params
: (array of items) +item
: (table/receiver_transport_params_mqtt) Describes MQTT Receiver transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Receivers must support all parameters in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Receiver should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Receiver should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be received from via the MQTT broker. A null value indicates that the Receiver has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic used for MQTT status messages such as MQTT Last Will which are received via the MQTT broker. A null value indicates that the Receiver has not yet been configured, or is not using a connection status topic.item.source_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Receiver has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.source_port
: (integer | string) Source port for MQTT traffic. If the parameter is set to auto the Receiver should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
activation_time
should be the absolute TAI time the parameters will actually transition. For absolute scheduled activations should be the same as the requested time, but may differ if the receiver is unable to schedule at the requested time. This may be because the transition may only occur, for example, at a frame boundary or end of GOP. In all other ways this response behaves identically to a 200 response.
+{ activation = { activation_time = "1496739064:0"; mode = "activate_scheduled_relative"; requested_time = "2:0"; }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_file = { }; transport_params = { { destination_port = 5000; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_enabled = true; fec_mode = "2D"; interface_ip = "192.168.200.15"; multicast_ip = "232.105.26.177"; rtcp_destination_ip = "auto"; rtcp_destination_port = 5001; rtcp_enabled = true; rtp_enabled = true; source_ip = "192.168.200.10"; }; }; }
Example 2: activate-scheduled-absolute{ activation = { activation_time = "1496739064:2500"; mode = "activate_scheduled_absolute"; requested_time = "1496739064:0"; }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_file = { }; transport_params = { { destination_port = 5000; fec1D_destination_port = "auto"; fec2D_destination_port = "auto"; fec_enabled = true; fec_mode = "2D"; interface_ip = "192.168.200.15"; multicast_ip = "232.105.26.177"; rtcp_destination_ip = "auto"; rtcp_destination_port = 5001; rtcp_enabled = true; rtp_enabled = true; source_ip = "192.168.200.10"; }; }; }
Or
-
table/error
(status 400) A 400 response is returned when the request did not meet the schema and constraints.
+
result.code
: (number/integer) HTTP error code. Minimum:400
. Maximum:599
.result.debug
: (nil | string) Debug information which may assist a programmer working with the API.result.error
: (string) Human readable message which is suitable for user interface display, and helpful to the user.
{ code = 400, error = "`source_ip` must be a valid IPv4 or IPv6 address" }
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the requested resource does not exist +Or
-
table
(status 409)
result.body
: (string) Empty string.result.status
: (number) 409.
result
Returned when the requested resource is only available at a different API version. +Or
-
table
(status 423)
result.body
: (string) Empty string.result.status
: (number) 423.
result
Returned when the resource is locked because an activation has been scheduled. A resource may be unlocked by settingmode
inactivation
tonull
, which will cancel the pending activation. This may be done in the same request as a change to other parameters.
+Or
-
table/error
(status 500) A 500 response may be returned if the transport file could not be parsed, or there is some failure caused by activation which was not caused by a violation of schema or constraints.
result.code
: (number/integer) HTTP error code. Minimum:400
. Maximum:599
.result.debug
: (nil | string) Debug information which may assist a programmer working with the API.result.error
: (string) Human readable message which is suitable for user interface display, and helpful to the user.
+{ code = 500, error = "Could not establish link to hardware" }
Usage:
-- Example 1: activate-immediate connection = require "lua-repl.lib.rest.nmos.connection" api = connection:create_api("http://connection.nmos.acme.example.com") payload = { activation = { mode = "activate_immediate" }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_params = { { destination_port = 5000; interface_ip = "192.168.200.15"; multicast_ip = "232.105.26.177"; rtp_enabled = true; source_ip = "192.168.200.10"; }; }; } result = api.single.receivers[receiverId]:patch_staged(payload) -- Example 2: activate-scheduled-absolute payload = { activation = { mode = "activate_scheduled_absolute", requested_time = "1496677550:20" }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_params = { { destination_port = 5000; interface_ip = "192.168.200.15"; multicast_ip = "232.105.26.177"; rtp_enabled = true; source_ip = "192.168.200.10"; }; }; } result = api.single.receivers[receiverId]:patch_staged(payload) -- Example 3: activate-scheduled-relative payload = { activation = { mode = "activate_scheduled_relative", requested_time = "2:0" }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_params = { { destination_port = 5000; interface_ip = "192.168.200.15"; multicast_ip = "232.105.26.177"; rtp_enabled = true; source_ip = "192.168.200.10"; }; }; } result = api.single.receivers[receiverId]:patch_staged(payload) -- Example 4: activation-only payload = { activation = { mode = "activate_immediate" }; } result = api.single.receivers[receiverId]:patch_staged(payload) -- Example 5: redundant-streams payload = { activation = { mode = "activate_immediate" }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_params = { { destination_port = 5000; interface_ip = "192.168.200.15"; multicast_ip = "232.105.26.177"; rtp_enabled = true; source_ip = "192.168.200.10"; }; { destination_port = 5000; interface_ip = "192.168.210.15"; multicast_ip = "232.3.28.144"; rtp_enabled = true; source_ip = "192.168.210.10"; }; }; } result = api.single.receivers[receiverId]:patch_staged(payload) -- Example 6: stage-transportfile payload = { sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_file = { data = "v=0\13\ o=- 1496222842 1496222842 IN IP4 172.29.226.25\13\ s=IP Studio Stream\13\ t=0 0\13\ m=video 5010 RTP/AVP 103\13\ c=IN IP4 232.250.98.80/32\13\ a=source-filter:incl IN IP4 232.250.98.80 172.29.226.25\13\ a=rtpmap:103 raw/90000\13\ a=fmtp:103 sampling=YCbCr-4:2:2; width=1920; height=1080; depth=10; interlace; exactframerate=25; colorimetry=BT709; PM=2110GPM; SSN=ST2110-20:2017; TP=2110TPW; \13\ a=mediaclk:direct=1876655126 rate=90000\13\ a=extmap:1 urn:x-nmos:rtp-hdrext:origin-timestamp\13\ a=extmap:2 urn:ietf:params:rtp-hdrext:smpte-tc 3600@90000/25\13\ a=extmap:3 urn:x-nmos:rtp-hdrext:flow-id\13\ a=extmap:4 urn:x-nmos:rtp-hdrext:source-id\13\ a=extmap:5 urn:x-nmos:rtp-hdrext:grain-flags\13\ a=extmap:7 urn:x-nmos:rtp-hdrext:sync-timestamp\13\ a=extmap:9 urn:x-nmos:rtp-hdrext:grain-duration\13\ a=ts-refclk:ptp=IEEE1588-2008:08-00-11-FF-FE-21-E1-B0:0\13\ "; type = "application/sdp"; }; } result = api.single.receivers[receiverId]:patch_staged(payload) -- Example 7: unicast payload = { activation = { mode = "activate_immediate" }; master_enable = true; sender_id = "5709255c-c0ae-4e1e-99a0-e872e83e48e0"; transport_params = { { destination_port = 5000; interface_ip = "192.168.200.15"; rtp_enabled = true; source_ip = "192.168.200.10"; }; }; } result = api.single.receivers[receiverId]:patch_staged(payload)
- payload
(table) PATCH must comply with the constraints served at /constraints but not all fields are mandatory. Any fields not included in the request JSON remain unchanged, even if they are a child of a property that was included in the request. For example a request containing changes to a single transport parameter will not alter any other transport parameter, even though the
- api.single.receivers:get ()
-
List available receivers. All UUIDs are appended with / to indicate the ID forms part of the URL for the next layer down.
Returns:
-
table/sender_receiver_base[]
(status 200)
result.nil
: (array of items) Connection API sender/receiver base resource. Describes the Connection API sender/receiver base resource. +item
: (string) Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/$/
.
Example:
{ "c72cca5b-01db-47aa-bb00-03893defbfae/"; "171d5c80-7fff-4c23-9383-46503eb1c63e/"; "a2655c48-8a46-4c82-b9bc-98760d59d7f8/"; }
- api.single.senders[senderId].active:get ()
-
Get active sender parameters. When the
master_enable
parameter isfalse
senders should not transmit any media streams. For RTP senders thertp_enabled
parameter allows for the individual disabling of SMPTE 2022-7 legs. On activation all instances ofauto
must be resolved into the actual values that will be used by the sender, unless there is an error condition. For example if a sender has thedestination_ip
parameter set toauto
in /staged thendestination_ip
in /active should show the multicast IP chosen by the sender. The parameter will remain set toauto
in staged, and may be resolved to a different value on each subsequent activation. In cases, such asdestination_ip
, where the parameter changing unexpectedly at activation through re-resolution may be undesirable, care should be taken in implementation to manage this. If there is an error condition that meansauto
cannot be resolved, the active transport parameters must not change, and the underlying sender must continue as before.
Returns:
-
table/sender_response_struct
(status 200)
+
result.activation
: (table/activation_response_struct) Parameters concerned with activation of the transport parameters. +result.activation.activation_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating the absolute time the sender or receiver will or did actually activate for scheduled activations, or the time activation occurred for immediate activations. On the staged endpoint this field returns to null once the activation is completed or when the resource is unlocked by setting the activation mode to null. For immediate activations on the staged endpoint this property will be the time the activation actually occurred in the response to the PATCH request, but null in response to any GET requests thereafter. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). This parameter returns to null on the staged endpoint once an activation is completed or when it is explicitly set to null. For immediate activations, in the response to the PATCH request this field will be set to 'activate_immediate', but will be null in response to any subsequent GET requests. Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
result.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation requested. This field returns to null once the activation is completed on the staged endpoint or when the resource is unlocked by setting the activation mode to null. For an immediate activation this field will always be null on the staged endpoint, even in the response to the PATCH request. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.master_enable
: (boolean) Master on/off control for sender.result.receiver_id
: (string | nil) ID of the target Receiver of this Sender. This will be null if the sender is operating in multicast mode, or has not been assigned a receiver in unicast mode, or is sending to a non-NMOS receiver in unicast mode. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.result.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +transport_params
: (array of items) +item
: (table/sender_transport_params_rtp) Describes RTP Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. As a minimum all senders must support <code>source_ip</code>, <code>destination_ip</code>, <code>source_port</code>, <code>rtp_enabled</code> and <code>destination_port</code>. Senders supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_ip
: IP address to which RTP packets will be sent. If auto is set the sender should select a multicast address to send to itself. For example it may implement MADCAP (RFC 2730), ZMAAP, or be allocated address by some other system responsible for co-ordination multicast address use. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec_block_height
: (number/integer) height of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_block_width
: (number/integer) width of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. Possible values:{"1D","2D"}
.item.fec_type
: (string) forward error correction mode to apply. Possible values:{"XOR","Reed-Solomon"}
.item.rtcp_destination_ip
: IP address to which RTCP packets will be sent (auto = same as RTP destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) rtcp on/off.item.rtcp_source_port
: (integer | string) source port for RTCP packets (auto = RTP source_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.rtp_enabled
: (boolean) RTP transmission active/inactive.item.source_ip
: IP address from which RTP packets will be sent (IP address of interface bound to this output). The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.source_port
: (integer | string) source port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.
or
transport_params
: (array of items) +item
: (any)
or
transport_params
: (array of items) +item
: (table/sender_transport_params_websocket) Describes WebSocket Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Senders must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses formatted as connection URIs. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. A null value indicates that the sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string) Must match the pattern:
or
transport_params
: (array of items) +item
: (table/sender_transport_params_mqtt) Describes MQTT Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Senders must support all properties in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Sender should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic which MQTT status messages such as MQTT Last Will are sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured, or is not using a connection status topic.item.destination_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.destination_port
: (integer | string) Destination port for MQTT traffic. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
{ activation = { activation_time = "1496759200:0"; mode = "activate_immediate"; requested_time = "1496759200:0"; }; master_enable = true; receiver_id = "0a174530-e3cf-11e6-bf01-fe55135034f3"; transport_params = { { destination_ip = "172.29.82.95"; destination_port = 5000; fec1D_destination_port = 5002; fec1D_source_port = 5002; fec2D_destination_port = 5004; fec2D_source_port = 5004; fec_block_height = 50; fec_block_width = 50; fec_destination_ip = "172.29.82.95"; fec_enabled = true; fec_mode = "2D"; fec_type = "XOR"; rtcp_destination_ip = "172.29.82.24"; rtcp_destination_port = 5008; rtcp_enabled = true; rtcp_source_port = 5008; rtp_enabled = true; source_ip = "172.29.82.23"; source_port = 5000; }; { destination_ip = "172.30.82.95"; destination_port = 5000; fec1D_destination_port = 5002; fec1D_source_port = 5002; fec2D_destination_port = 5004; fec2D_source_port = 5004; fec_block_height = 50; fec_block_width = 50; fec_destination_ip = "172.30.82.95"; fec_enabled = true; fec_mode = "2D"; fec_type = "XOR"; rtcp_destination_ip = "172.30.82.24"; rtcp_destination_port = 5008; rtcp_enabled = true; rtcp_source_port = 5008; rtp_enabled = true; source_ip = "172.30.82.23"; source_port = 5000; }; }; }
Example 2: NormalMQTT{ activation = { activation_time = "1541508905:0"; mode = "activate_immediate"; requested_time = "1541508905:0"; }; master_enable = true; receiver_id = "69744dfb-0557-4202-b1f1-4d1a741ee2bb"; transport_params = { { broker_authorization = false; broker_protocol = "mqtt"; broker_topic = "my_topic_name"; connection_status_broker_topic = "my_status_topic_name"; destination_host = "broker.example.com"; destination_port = 1883; }; }; }
Example 3: Uninitialised{ activation = { }; master_enable = true; transport_params = { { destination_ip = "232.21.98.4"; destination_port = 5004; fec1D_destination_port = 5006; fec1D_source_port = 5006; fec2D_destination_port = 5008; fec2D_source_port = 5008; fec_block_height = 4; fec_block_width = 4; fec_destination_ip = "172.29.82.23"; fec_enabled = false; fec_mode = "1D"; fec_type = "XOR"; rtcp_destination_ip = "172.29.82.23"; rtcp_destination_port = 5005; rtcp_enabled = false; rtcp_source_port = 5005; rtp_enabled = false; source_ip = "172.29.82.23"; source_port = 5004; }; }; }
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the requested resource does not exist +Or
- api.single.senders[senderId].constraints:get ()
-
Lists the constraints for each transport parameter (e.g max/min value, enumerated values etc.) using a very limited subset of JSON schema. Every transport parameter in the staged resource must be represented here. Any minimum/maximum constraints listed here must not allow a wider range of values than those allowed by the core schema. Any enum defined on this endpoint must only contain a subset of the values allowed for that parameter in the core schema. Similarly, pattern constraints must only narrow the allowed values. If the sender does not constrain parameters beyond what is specified in the core schema then the constraints in the core schema should not be duplicated on this endpoint. Where an "auto" mode is allowed in the core schema this mode must always be supported by the sender if the parameter is exposed. If SMPTE 2022-7 is in use, two entries are in the outer array of the resource. The first entry is the constraints for the primary leg. If SMPTE 2022-7 is not in use only one entry should be present in the outer array.
Returns:
-
any
(status 200)
Example 1: SMPTE2022-7
{ { destination_ip = { }; destination_port = { maximum = 50000, minimum = 49151 }; fec1D_destination_port = { maximum = 49151, minimum = 5000 }; fec1D_source_port = { maximum = 49151, minimum = 5000 }; fec2D_destination_port = { maximum = 49151, minimum = 5000 }; fec2D_source_port = { maximum = 49151, minimum = 5000 }; fec_block_height = { maximum = 200, minimum = 4 }; fec_block_width = { maximum = 200, minimum = 4 }; fec_destination_ip = { }; fec_enabled = { }; fec_mode = { enum = { "1D", "2D" }; }; fec_type = { enum = { "XOR", "Reed-Solomon" }; }; rtcp_destination_ip = { }; rtcp_destination_port = { maximum = 49151, minimum = 5000 }; rtcp_enabled = { }; rtcp_source_port = { maximum = 49151, minimum = 5000 }; rtp_enabled = { }; source_ip = { enum = { "192.168.7.2"; "192.168.8.5"; "2001:0db8:85a3:0000:0000:8a2e:0370:7334"; "2001:0db8:85a3:0000:0000:8a2e:0370:a24b"; }; }; source_port = { maximum = 50000, minimum = 49151 }; }; { destination_ip = { }; destination_port = { maximum = 50000, minimum = 49151 }; fec1D_destination_port = { maximum = 49151, minimum = 5000 }; fec1D_source_port = { maximum = 49151, minimum = 5000 }; fec2D_destination_port = { maximum = 49151, minimum = 5000 }; fec2D_source_port = { maximum = 49151, minimum = 5000 }; fec_block_height = { maximum = 200, minimum = 4 }; fec_block_width = { maximum = 200, minimum = 4 }; fec_destination_ip = { }; fec_enabled = { }; fec_mode = { enum = { "1D", "2D" }; }; fec_type = { enum = { "XOR", "Reed-Solomon" }; }; rtcp_destination_ip = { }; rtcp_destination_port = { maximum = 49151, minimum = 5000 }; rtcp_enabled = { }; rtcp_source_port = { maximum = 49151, minimum = 5000 }; rtp_enabled = { }; source_ip = { enum = { "192.168.9.2"; "192.168.10.5"; "2001:0db8:85a3:0000:0000:8a2e:0370:2bb4"; "2001:0db8:85a3:0000:0000:8a2e:0370:433f"; }; }; source_port = { maximum = 50000, minimum = 49151 }; }; }
Example 2: RTPNo2022-7{ { destination_ip = { }; destination_port = { maximum = 50000, minimum = 49151 }; fec1D_destination_port = { maximum = 49151, minimum = 5000 }; fec1D_source_port = { maximum = 49151, minimum = 5000 }; fec2D_destination_port = { maximum = 49151, minimum = 5000 }; fec2D_source_port = { maximum = 49151, minimum = 5000 }; fec_block_height = { maximum = 200, minimum = 4 }; fec_block_width = { maximum = 200, minimum = 4 }; fec_destination_ip = { }; fec_enabled = { }; fec_mode = { enum = { "1D", "2D" }; }; fec_type = { enum = { "XOR", "Reed-Solomon" }; }; rtcp_destination_ip = { }; rtcp_destination_port = { maximum = 49151, minimum = 5000 }; rtcp_enabled = { }; rtcp_source_port = { maximum = 49151, minimum = 5000 }; rtp_enabled = { }; source_ip = { enum = { "192.168.7.2"; "192.168.8.5"; "2001:0db8:85a3:0000:0000:8a2e:0370:7334"; "2001:0db8:85a3:0000:0000:8a2e:0370:a24b"; }; }; source_port = { maximum = 50000, minimum = 49151 }; }; }
Example 3: MQTT{ { broker_authorization = { }; broker_protocol = { }; broker_topic = { enum = { "fixedTopicName1", "fixedTopicName2" }; }; connection_status_broker_topic = { enum = { "connStatusTopic" }; }; destination_host = { }; destination_port = { enum = { 1833, 8883 }; }; }; }
Example 4: WebSocketPlusExt{ { connection_authorization = { enum = { false }; }; connection_uri = { enum = { "ws://172.29.80.65:5476/websocketServer" }; }; ext_subscription_data = { enum = { "fixedConnectionParameter" }; }; }; }
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the requested resource does not exist +Or
- api.single.senders[senderId].staged:get ()
-
Get staged sender transport parameters object. In SMPTE 2022-7 operation element 0 of the
transport_params
array shall be the parameters applied to the primary leg, and element 1 the secondary leg. There shall only be one element present intransport_params
when SMPTE 2022-7 is not in use.
Returns:
-
table/sender_response_struct
(status 200) Additionally constrained by the constraints at /constraints
+
result.activation
: (table/activation_response_struct) Parameters concerned with activation of the transport parameters. +result.activation.activation_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating the absolute time the sender or receiver will or did actually activate for scheduled activations, or the time activation occurred for immediate activations. On the staged endpoint this field returns to null once the activation is completed or when the resource is unlocked by setting the activation mode to null. For immediate activations on the staged endpoint this property will be the time the activation actually occurred in the response to the PATCH request, but null in response to any GET requests thereafter. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). This parameter returns to null on the staged endpoint once an activation is completed or when it is explicitly set to null. For immediate activations, in the response to the PATCH request this field will be set to 'activate_immediate', but will be null in response to any subsequent GET requests. Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
result.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation requested. This field returns to null once the activation is completed on the staged endpoint or when the resource is unlocked by setting the activation mode to null. For an immediate activation this field will always be null on the staged endpoint, even in the response to the PATCH request. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.master_enable
: (boolean) Master on/off control for sender.result.receiver_id
: (string | nil) ID of the target Receiver of this Sender. This will be null if the sender is operating in multicast mode, or has not been assigned a receiver in unicast mode, or is sending to a non-NMOS receiver in unicast mode. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.result.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +transport_params
: (array of items) +item
: (table/sender_transport_params_rtp) Describes RTP Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. As a minimum all senders must support <code>source_ip</code>, <code>destination_ip</code>, <code>source_port</code>, <code>rtp_enabled</code> and <code>destination_port</code>. Senders supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_ip
: IP address to which RTP packets will be sent. If auto is set the sender should select a multicast address to send to itself. For example it may implement MADCAP (RFC 2730), ZMAAP, or be allocated address by some other system responsible for co-ordination multicast address use. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec_block_height
: (number/integer) height of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_block_width
: (number/integer) width of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. Possible values:{"1D","2D"}
.item.fec_type
: (string) forward error correction mode to apply. Possible values:{"XOR","Reed-Solomon"}
.item.rtcp_destination_ip
: IP address to which RTCP packets will be sent (auto = same as RTP destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) rtcp on/off.item.rtcp_source_port
: (integer | string) source port for RTCP packets (auto = RTP source_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.rtp_enabled
: (boolean) RTP transmission active/inactive.item.source_ip
: IP address from which RTP packets will be sent (IP address of interface bound to this output). The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.source_port
: (integer | string) source port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.
or
transport_params
: (array of items) +item
: (any)
or
transport_params
: (array of items) +item
: (table/sender_transport_params_websocket) Describes WebSocket Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Senders must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses formatted as connection URIs. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. A null value indicates that the sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string) Must match the pattern:
or
transport_params
: (array of items) +item
: (table/sender_transport_params_mqtt) Describes MQTT Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Senders must support all properties in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Sender should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic which MQTT status messages such as MQTT Last Will are sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured, or is not using a connection status topic.item.destination_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.destination_port
: (integer | string) Destination port for MQTT traffic. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
{ activation = { }; master_enable = true; receiver_id = "0a174530-e3cf-11e6-bf01-fe55135034f3"; transport_params = { { destination_ip = "172.29.82.95"; destination_port = 5000; fec1D_destination_port = "auto"; fec1D_source_port = 5010; fec2D_destination_port = "auto"; fec2D_source_port = 5012; fec_block_height = 50; fec_block_width = 50; fec_destination_ip = "auto"; fec_enabled = true; fec_mode = "2D"; fec_type = "XOR"; rtcp_destination_ip = "172.29.82.24"; rtcp_destination_port = 5008; rtcp_enabled = true; rtcp_source_port = 5008; rtp_enabled = true; source_ip = "172.29.82.23"; source_port = 5000; }; { destination_ip = "172.30.82.95"; destination_port = 5000; fec1D_destination_port = "auto"; fec1D_source_port = 5010; fec2D_destination_port = "auto"; fec2D_source_port = 5012; fec_block_height = 50; fec_block_width = 50; fec_destination_ip = "auto"; fec_enabled = true; fec_mode = "2D"; fec_type = "XOR"; rtcp_destination_ip = "172.30.82.24"; rtcp_destination_port = 5008; rtcp_enabled = true; rtcp_source_port = 5008; rtp_enabled = true; source_ip = "172.30.82.23"; source_port = 5000; }; }; }
Example 2: Uninitialised{ activation = { }; master_enable = true; transport_params = { { destination_ip = "auto"; destination_port = "auto"; fec1D_destination_port = "auto"; fec1D_source_port = "auto"; fec2D_destination_port = "auto"; fec2D_source_port = "auto"; fec_block_height = 4; fec_block_width = 4; fec_destination_ip = "auto"; fec_enabled = false; fec_mode = "1D"; fec_type = "XOR"; rtcp_destination_ip = "auto"; rtcp_destination_port = "auto"; rtcp_enabled = false; rtcp_source_port = "auto"; rtp_enabled = true; source_ip = "auto"; source_port = "auto"; }; }; }
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the requested resource does not exist +Or
- api.single.senders[senderId].staged:options ()
-
A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes.
Returns:
Or
Or
- api.single.senders[senderId].staged:patch (payload)
-
Update staged parameters for sender. Note that for activations the
mode
parameter will return tonull
once the activation transaction with the client is completed (i.e the response to the PATCH has been sent by the server). In SMPTE 2022-7 operation element 0 of thetransport_params
array shall be the parameters applied to the primary leg, and element 1 the secondary leg. There shall only be one element present intransport_params
when SMPTE 2022-7 is not in use.
Parameters:
- payload
(table) PATCH must comply with the constraints served at /constraints but not all fields are mandatory. Any fields not included in the request JSON remain unchanged, even if they are a child of a property that was included in the request. For example a request containing changes to a single transport parameter will not alter any other transport parameter, even though the
transport_params
property was part of the request.
args.payload
: (table/sender_stage_struct) Describes a sender. +args.payload.activation
: (table/activation_struct) Parameters concerned with activation of the transport parameters. +args.payload.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
args.payload.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation. Should be null or not present if 'mode' is null. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
args.payload.master_enable
: (boolean) Master on/off control for sender.args.payload.receiver_id
: (string | nil) ID of the target Receiver of this Sender. This will be null if the sender is operating in multicast mode, or has not been assigned a receiver in unicast mode, or is sending to a non-NMOS receiver in unicast mode. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.args.payload.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +payload.transport_params
: (array of items) +item
: (table/sender_transport_params_rtp) Describes RTP Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. As a minimum all senders must support <code>source_ip</code>, <code>destination_ip</code>, <code>source_port</code>, <code>rtp_enabled</code> and <code>destination_port</code>. Senders supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_ip
: IP address to which RTP packets will be sent. If auto is set the sender should select a multicast address to send to itself. For example it may implement MADCAP (RFC 2730), ZMAAP, or be allocated address by some other system responsible for co-ordination multicast address use. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec_block_height
: (number/integer) height of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_block_width
: (number/integer) width of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. Possible values:{"1D","2D"}
.item.fec_type
: (string) forward error correction mode to apply. Possible values:{"XOR","Reed-Solomon"}
.item.rtcp_destination_ip
: IP address to which RTCP packets will be sent (auto = same as RTP destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) rtcp on/off.item.rtcp_source_port
: (integer | string) source port for RTCP packets (auto = RTP source_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.rtp_enabled
: (boolean) RTP transmission active/inactive.item.source_ip
: IP address from which RTP packets will be sent (IP address of interface bound to this output). The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.source_port
: (integer | string) source port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.
or
payload.transport_params
: (array of items) +item
: (any)
or
payload.transport_params
: (array of items) +item
: (table/sender_transport_params_websocket) Describes WebSocket Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Senders must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses formatted as connection URIs. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. A null value indicates that the sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string) Must match the pattern:
or
payload.transport_params
: (array of items) +item
: (table/sender_transport_params_mqtt) Describes MQTT Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Senders must support all properties in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Sender should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic which MQTT status messages such as MQTT Last Will are sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured, or is not using a connection status topic.item.destination_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.destination_port
: (integer | string) Destination port for MQTT traffic. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
Returns:
-
table/sender_response_struct
(status 200) A 200 response is returned for PATCH requests where no activation has been scheduled, an activation has been cancelled, or an immediate activation has been requested. The response will always contain the full set of parameters in the response schema, and all supported transport parameters. For a request with an immediate activation the API should only return a response once the new transport parameters have been applied to the underlying sender. Note the presence of the extra
result.activation
: (table/activation_response_struct) Parameters concerned with activation of the transport parameters. +result.activation.activation_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating the absolute time the sender or receiver will or did actually activate for scheduled activations, or the time activation occurred for immediate activations. On the staged endpoint this field returns to null once the activation is completed or when the resource is unlocked by setting the activation mode to null. For immediate activations on the staged endpoint this property will be the time the activation actually occurred in the response to the PATCH request, but null in response to any GET requests thereafter. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). This parameter returns to null on the staged endpoint once an activation is completed or when it is explicitly set to null. For immediate activations, in the response to the PATCH request this field will be set to 'activate_immediate', but will be null in response to any subsequent GET requests. Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
result.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation requested. This field returns to null once the activation is completed on the staged endpoint or when the resource is unlocked by setting the activation mode to null. For an immediate activation this field will always be null on the staged endpoint, even in the response to the PATCH request. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.master_enable
: (boolean) Master on/off control for sender.result.receiver_id
: (string | nil) ID of the target Receiver of this Sender. This will be null if the sender is operating in multicast mode, or has not been assigned a receiver in unicast mode, or is sending to a non-NMOS receiver in unicast mode. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.result.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +transport_params
: (array of items) +item
: (table/sender_transport_params_rtp) Describes RTP Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. As a minimum all senders must support <code>source_ip</code>, <code>destination_ip</code>, <code>source_port</code>, <code>rtp_enabled</code> and <code>destination_port</code>. Senders supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_ip
: IP address to which RTP packets will be sent. If auto is set the sender should select a multicast address to send to itself. For example it may implement MADCAP (RFC 2730), ZMAAP, or be allocated address by some other system responsible for co-ordination multicast address use. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec_block_height
: (number/integer) height of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_block_width
: (number/integer) width of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. Possible values:{"1D","2D"}
.item.fec_type
: (string) forward error correction mode to apply. Possible values:{"XOR","Reed-Solomon"}
.item.rtcp_destination_ip
: IP address to which RTCP packets will be sent (auto = same as RTP destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) rtcp on/off.item.rtcp_source_port
: (integer | string) source port for RTCP packets (auto = RTP source_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.rtp_enabled
: (boolean) RTP transmission active/inactive.item.source_ip
: IP address from which RTP packets will be sent (IP address of interface bound to this output). The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.source_port
: (integer | string) source port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.
or
transport_params
: (array of items) +item
: (any)
or
transport_params
: (array of items) +item
: (table/sender_transport_params_websocket) Describes WebSocket Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Senders must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses formatted as connection URIs. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. A null value indicates that the sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string) Must match the pattern:
or
transport_params
: (array of items) +item
: (table/sender_transport_params_mqtt) Describes MQTT Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Senders must support all properties in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Sender should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic which MQTT status messages such as MQTT Last Will are sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured, or is not using a connection status topic.item.destination_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.destination_port
: (integer | string) Destination port for MQTT traffic. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
activation_time
parameter in the response. For immediate activation this should be the time the activation actually occurred as an absolute TAI timestamp. If no activation was requested in the PATCHactivation_time
will be setnull
.
+{ activation = { mode = "activate_immediate" }; master_enable = true; transport_params = { { destination_ip = "232.105.26.177"; destination_port = 5000; fec1D_destination_port = "auto"; fec1D_source_port = 5010; fec2D_destination_port = "auto"; fec2D_source_port = 5012; fec_block_height = 50; fec_block_width = 50; fec_enabled = true; fec_mode = "2D"; fec_type = "XOR"; rtcp_destination_ip = "232.22.4.59"; rtcp_destination_port = 5008; rtcp_enabled = true; rtcp_source_port = 5008; rtp_enabled = true; source_ip = "192.168.200.10"; source_port = 5000; }; { destination_ip = "232.3.28.144"; destination_port = 5000; fec1D_destination_port = "auto"; fec1D_source_port = 5010; fec2D_destination_port = "auto"; fec2D_source_port = 5012; fec_block_height = 50; fec_block_width = 50; fec_enabled = true; fec_mode = "2D"; fec_type = "XOR"; rtcp_destination_ip = "232.79.192.98"; rtcp_destination_port = 5008; rtcp_enabled = true; rtcp_source_port = 5008; rtp_enabled = true; source_ip = "192.168.210.10"; source_port = 5000; }; }; }
Example 2: immediate-activation{ activation = { mode = "activate_immediate" }; master_enable = true; transport_params = { { destination_ip = "232.105.26.177"; destination_port = 5000; fec1D_destination_port = "auto"; fec1D_source_port = 5010; fec2D_destination_port = "auto"; fec2D_source_port = 5012; fec_block_height = 50; fec_block_width = 50; fec_enabled = true; fec_mode = "2D"; fec_type = "XOR"; rtcp_destination_ip = "232.22.4.59"; rtcp_destination_port = 5008; rtcp_enabled = true; rtcp_source_port = 5008; rtp_enabled = true; source_ip = "192.168.200.10"; source_port = 5000; }; }; }
Or
-
table/sender_response_struct
(status 202) A 202 response is returned when a request for a scheduled activation is accepted, to indicate that while the request itself was acceptable it has not yet been acted upon by the sender. For scheduled activations
result.activation
: (table/activation_response_struct) Parameters concerned with activation of the transport parameters. +result.activation.activation_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating the absolute time the sender or receiver will or did actually activate for scheduled activations, or the time activation occurred for immediate activations. On the staged endpoint this field returns to null once the activation is completed or when the resource is unlocked by setting the activation mode to null. For immediate activations on the staged endpoint this property will be the time the activation actually occurred in the response to the PATCH request, but null in response to any GET requests thereafter. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). This parameter returns to null on the staged endpoint once an activation is completed or when it is explicitly set to null. For immediate activations, in the response to the PATCH request this field will be set to 'activate_immediate', but will be null in response to any subsequent GET requests. Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
result.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation requested. This field returns to null once the activation is completed on the staged endpoint or when the resource is unlocked by setting the activation mode to null. For an immediate activation this field will always be null on the staged endpoint, even in the response to the PATCH request. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.master_enable
: (boolean) Master on/off control for sender.result.receiver_id
: (string | nil) ID of the target Receiver of this Sender. This will be null if the sender is operating in multicast mode, or has not been assigned a receiver in unicast mode, or is sending to a non-NMOS receiver in unicast mode. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.result.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +transport_params
: (array of items) +item
: (table/sender_transport_params_rtp) Describes RTP Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. As a minimum all senders must support <code>source_ip</code>, <code>destination_ip</code>, <code>source_port</code>, <code>rtp_enabled</code> and <code>destination_port</code>. Senders supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_ip
: IP address to which RTP packets will be sent. If auto is set the sender should select a multicast address to send to itself. For example it may implement MADCAP (RFC 2730), ZMAAP, or be allocated address by some other system responsible for co-ordination multicast address use. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec_block_height
: (number/integer) height of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_block_width
: (number/integer) width of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. Possible values:{"1D","2D"}
.item.fec_type
: (string) forward error correction mode to apply. Possible values:{"XOR","Reed-Solomon"}
.item.rtcp_destination_ip
: IP address to which RTCP packets will be sent (auto = same as RTP destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) rtcp on/off.item.rtcp_source_port
: (integer | string) source port for RTCP packets (auto = RTP source_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.rtp_enabled
: (boolean) RTP transmission active/inactive.item.source_ip
: IP address from which RTP packets will be sent (IP address of interface bound to this output). The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.source_port
: (integer | string) source port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.
or
transport_params
: (array of items) +item
: (any)
or
transport_params
: (array of items) +item
: (table/sender_transport_params_websocket) Describes WebSocket Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Senders must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses formatted as connection URIs. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. A null value indicates that the sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string) Must match the pattern:
or
transport_params
: (array of items) +item
: (table/sender_transport_params_mqtt) Describes MQTT Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Senders must support all properties in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Sender should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic which MQTT status messages such as MQTT Last Will are sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured, or is not using a connection status topic.item.destination_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.destination_port
: (integer | string) Destination port for MQTT traffic. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
activation_time
should be the absolute TAI time the parameters will actually transition. For absolute scheduled activations should be the same as the requested time, but may differ if the sender is unable to schedule at the requested time. This may be because the transition may only occur, for example, at a frame boundary or end of GOP. In all other ways this response behaves identically to a 200 response.
+{ activation = { activation_time = "1496759200:5000"; mode = "activate_scheduled_relative"; requested_time = "1496759200:0"; }; master_enable = true; transport_params = { { destination_ip = "232.105.26.177"; destination_port = 5000; fec1D_destination_port = "auto"; fec1D_source_port = 5010; fec2D_destination_port = "auto"; fec2D_source_port = 5012; fec_block_height = 50; fec_block_width = 50; fec_enabled = true; fec_mode = "2D"; fec_type = "XOR"; rtcp_destination_ip = "232.22.4.59"; rtcp_destination_port = 5008; rtcp_enabled = true; rtcp_source_port = 5008; rtp_enabled = true; source_ip = "192.168.200.10"; source_port = 5000; }; }; }
Example 2: relative-scheduled-activation{ activation = { activation_time = "1496759200:0"; mode = "activate_scheduled_relative"; requested_time = "2:0"; }; master_enable = true; transport_params = { { destination_ip = "232.105.26.177"; destination_port = 5000; fec1D_destination_port = "auto"; fec1D_source_port = 5010; fec2D_destination_port = "auto"; fec2D_source_port = 5012; fec_block_height = 50; fec_block_width = 50; fec_enabled = true; fec_mode = "2D"; fec_type = "XOR"; rtcp_destination_ip = "232.79.192.98"; rtcp_destination_port = 5008; rtcp_enabled = true; rtcp_source_port = 5008; rtp_enabled = true; source_ip = "192.168.200.10"; source_port = 5000; }; }; }
Or
-
table/error
(status 400) A 400 response is returned when the request did not meet the schema and constraints.
+
result.code
: (number/integer) HTTP error code. Minimum:400
. Maximum:599
.result.debug
: (nil | string) Debug information which may assist a programmer working with the API.result.error
: (string) Human readable message which is suitable for user interface display, and helpful to the user.
{ code = 400, error = "`source_ip` must be a valid IPv4 or IPv6 address" }
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the requested resource does not exist +Or
-
table
(status 409)
result.body
: (string) Empty string.result.status
: (number) 409.
result
Returned when the requested resource is only available at a different API version. +Or
-
table
(status 423)
result.body
: (string) Empty string.result.status
: (number) 423.
result
Returned when the resource is locked because an activation has been scheduled. A resource may be unlocked by settingmode
inactivation
tonull
, which will cancel the pending activation. This may be done in the same request as a change to other parameters.
+Or
-
table/error
(status 500) A 500 response may be returned if the transport file could not be parsed, or there is some failure caused by activation which was not caused by a violation of schema or constraints.
result.code
: (number/integer) HTTP error code. Minimum:400
. Maximum:599
.result.debug
: (nil | string) Debug information which may assist a programmer working with the API.result.error
: (string) Human readable message which is suitable for user interface display, and helpful to the user.
+{ code = 500, error = "Could not establish link to hardware" }
Usage:
-- Example 1: absolute-scheduled-activation connection = require "lua-repl.lib.rest.nmos.connection" api = connection:create_api("http://connection.nmos.acme.example.com") payload = { activation = { mode = "activate_scheduled_absolute", requested_time = "1496759200:0" }; master_enable = true; transport_params = { { destination_ip = "232.105.26.177"; destination_port = 5000; rtp_enabled = true; source_ip = "192.168.200.10"; source_port = 5000; }; }; } result = api.single.senders[senderId].staged:patch(payload) -- Example 2: activation-only payload = { activation = { mode = "activate_immediate" }; } result = api.single.senders[senderId].staged:patch(payload) -- Example 3: immediate-activation payload = { activation = { mode = "activate_immediate" }; master_enable = true; transport_params = { { destination_ip = "232.105.26.177"; destination_port = 5000; rtp_enabled = true; source_ip = "192.168.200.10"; source_port = 5000; }; }; } result = api.single.senders[senderId].staged:patch(payload) -- Example 4: redundant-streams payload = { activation = { mode = "activate_immediate" }; master_enable = true; transport_params = { { destination_ip = "232.105.26.177"; destination_port = 5000; rtp_enabled = true; source_ip = "192.168.200.10"; source_port = 5000; }; { destination_ip = "232.3.28.144"; destination_port = 5000; rtp_enabled = true; source_ip = "192.168.210.10"; source_port = 5000; }; }; } result = api.single.senders[senderId].staged:patch(payload) -- Example 5: relative-scheduled-activation payload = { activation = { mode = "activate_scheduled_relative", requested_time = "2:0" }; master_enable = true; transport_params = { { destination_ip = "232.105.26.177"; destination_port = 5000; rtp_enabled = true; source_ip = "192.168.200.10"; source_port = 5000; }; }; } result = api.single.senders[senderId].staged:patch(payload) -- Example 6: unicast payload = { activation = { mode = "activate_scheduled_relative", requested_time = "2:0" }; master_enable = true; receiver_id = "0b174530-e3cf-41e6-bf01-fe55135034f3"; transport_params = { { destination_ip = "192.168.200.15"; destination_port = 5000; rtp_enabled = true; source_ip = "192.168.200.10"; source_port = 5000; }; }; } result = api.single.senders[senderId].staged:patch(payload)
- payload
(table) PATCH must comply with the constraints served at /constraints but not all fields are mandatory. Any fields not included in the request JSON remain unchanged, even if they are a child of a property that was included in the request. For example a request containing changes to a single transport parameter will not alter any other transport parameter, even though the
- api.single.senders[senderId].transportfile:get ()
-
Redirects to the location of the sender's transport file or returns the transport file directly. Check HTTP response code to determine which mode of operation is in use. When returning the transport file directly ensure that the
Content-Type
entity header is correctly set.
Returns:
-
table
(status 200)
result.body
: (string) Empty string.result.status
: (number) 200.
result
The transport file itself will be served +Or
-
table
(status 307)
result.body
: (string) Empty string.result.status
: (number) 307.
result
A temporary redirect to the transport file +Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned if the resource does not exist, or the transport type does not require a transport file, or if the sender is not currently configured. May also be returned when themaster_enable
parameter isfalse
in /active, if the sender only maintains a transport file when transmitting.
+Or
- api.single.senders[senderId].transporttype:get ()
-
Returns the URN base for the transport type employed by this sender with any subclassifications or versions removed.
Returns:
-
string/uri
(status 200)
- Transport type URN base used by the Sender or Receiver (i.e. with any subclassifications or versions removed). Possible content:
- (string) Possible values:
{"urn:x-nmos:transport:rtp","urn:x-nmos:transport:dash","urn:x-nmos:transport:websocket","urn:x-nmos:transport:mqtt"}
.
Example: - (string) Possible values:
"urn:x-nmos:transport:mqtt"
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the resource does not exist
+Or
- Transport type URN base used by the Sender or Receiver (i.e. with any subclassifications or versions removed). Possible content:
- api.single.senders[senderId]:get ()
-
List all the API endpoints for a single sender.
Returns:
-
table/connectionapi_sender[]
(status 200)
result.nil
: (array of items) Connection API /single/senders/{senderId} base resource. Describes the Connection API /single/senders/{senderId} base resource. +item
: (string) Possible values:{"constraints/","staged/","active/","transportfile/","transporttype/"}
.
Example:
{ "constraints/", "staged/", "active/", "transportfile/", "transporttype/" }
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the requested Sender ID does not exist. +Or
- api.single.senders[senderId]:get_active ()
-
Get active sender parameters. When the
master_enable
parameter isfalse
senders should not transmit any media streams. For RTP senders thertp_enabled
parameter allows for the individual disabling of SMPTE 2022-7 legs. On activation all instances ofauto
must be resolved into the actual values that will be used by the sender, unless there is an error condition. For example if a sender has thedestination_ip
parameter set toauto
in /staged thendestination_ip
in /active should show the multicast IP chosen by the sender. The parameter will remain set toauto
in staged, and may be resolved to a different value on each subsequent activation. In cases, such asdestination_ip
, where the parameter changing unexpectedly at activation through re-resolution may be undesirable, care should be taken in implementation to manage this. If there is an error condition that meansauto
cannot be resolved, the active transport parameters must not change, and the underlying sender must continue as before.
This function is alias forapi.single.senders[senderId].active:get()
.Returns:
-
table/sender_response_struct
(status 200)
+
result.activation
: (table/activation_response_struct) Parameters concerned with activation of the transport parameters. +result.activation.activation_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating the absolute time the sender or receiver will or did actually activate for scheduled activations, or the time activation occurred for immediate activations. On the staged endpoint this field returns to null once the activation is completed or when the resource is unlocked by setting the activation mode to null. For immediate activations on the staged endpoint this property will be the time the activation actually occurred in the response to the PATCH request, but null in response to any GET requests thereafter. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). This parameter returns to null on the staged endpoint once an activation is completed or when it is explicitly set to null. For immediate activations, in the response to the PATCH request this field will be set to 'activate_immediate', but will be null in response to any subsequent GET requests. Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
result.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation requested. This field returns to null once the activation is completed on the staged endpoint or when the resource is unlocked by setting the activation mode to null. For an immediate activation this field will always be null on the staged endpoint, even in the response to the PATCH request. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.master_enable
: (boolean) Master on/off control for sender.result.receiver_id
: (string | nil) ID of the target Receiver of this Sender. This will be null if the sender is operating in multicast mode, or has not been assigned a receiver in unicast mode, or is sending to a non-NMOS receiver in unicast mode. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.result.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +transport_params
: (array of items) +item
: (table/sender_transport_params_rtp) Describes RTP Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. As a minimum all senders must support <code>source_ip</code>, <code>destination_ip</code>, <code>source_port</code>, <code>rtp_enabled</code> and <code>destination_port</code>. Senders supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_ip
: IP address to which RTP packets will be sent. If auto is set the sender should select a multicast address to send to itself. For example it may implement MADCAP (RFC 2730), ZMAAP, or be allocated address by some other system responsible for co-ordination multicast address use. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec_block_height
: (number/integer) height of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_block_width
: (number/integer) width of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. Possible values:{"1D","2D"}
.item.fec_type
: (string) forward error correction mode to apply. Possible values:{"XOR","Reed-Solomon"}
.item.rtcp_destination_ip
: IP address to which RTCP packets will be sent (auto = same as RTP destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) rtcp on/off.item.rtcp_source_port
: (integer | string) source port for RTCP packets (auto = RTP source_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.rtp_enabled
: (boolean) RTP transmission active/inactive.item.source_ip
: IP address from which RTP packets will be sent (IP address of interface bound to this output). The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.source_port
: (integer | string) source port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.
or
transport_params
: (array of items) +item
: (any)
or
transport_params
: (array of items) +item
: (table/sender_transport_params_websocket) Describes WebSocket Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Senders must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses formatted as connection URIs. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. A null value indicates that the sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string) Must match the pattern:
or
transport_params
: (array of items) +item
: (table/sender_transport_params_mqtt) Describes MQTT Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Senders must support all properties in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Sender should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic which MQTT status messages such as MQTT Last Will are sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured, or is not using a connection status topic.item.destination_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.destination_port
: (integer | string) Destination port for MQTT traffic. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
{ activation = { activation_time = "1496759200:0"; mode = "activate_immediate"; requested_time = "1496759200:0"; }; master_enable = true; receiver_id = "0a174530-e3cf-11e6-bf01-fe55135034f3"; transport_params = { { destination_ip = "172.29.82.95"; destination_port = 5000; fec1D_destination_port = 5002; fec1D_source_port = 5002; fec2D_destination_port = 5004; fec2D_source_port = 5004; fec_block_height = 50; fec_block_width = 50; fec_destination_ip = "172.29.82.95"; fec_enabled = true; fec_mode = "2D"; fec_type = "XOR"; rtcp_destination_ip = "172.29.82.24"; rtcp_destination_port = 5008; rtcp_enabled = true; rtcp_source_port = 5008; rtp_enabled = true; source_ip = "172.29.82.23"; source_port = 5000; }; { destination_ip = "172.30.82.95"; destination_port = 5000; fec1D_destination_port = 5002; fec1D_source_port = 5002; fec2D_destination_port = 5004; fec2D_source_port = 5004; fec_block_height = 50; fec_block_width = 50; fec_destination_ip = "172.30.82.95"; fec_enabled = true; fec_mode = "2D"; fec_type = "XOR"; rtcp_destination_ip = "172.30.82.24"; rtcp_destination_port = 5008; rtcp_enabled = true; rtcp_source_port = 5008; rtp_enabled = true; source_ip = "172.30.82.23"; source_port = 5000; }; }; }
Example 2: NormalMQTT{ activation = { activation_time = "1541508905:0"; mode = "activate_immediate"; requested_time = "1541508905:0"; }; master_enable = true; receiver_id = "69744dfb-0557-4202-b1f1-4d1a741ee2bb"; transport_params = { { broker_authorization = false; broker_protocol = "mqtt"; broker_topic = "my_topic_name"; connection_status_broker_topic = "my_status_topic_name"; destination_host = "broker.example.com"; destination_port = 1883; }; }; }
Example 3: Uninitialised{ activation = { }; master_enable = true; transport_params = { { destination_ip = "232.21.98.4"; destination_port = 5004; fec1D_destination_port = 5006; fec1D_source_port = 5006; fec2D_destination_port = 5008; fec2D_source_port = 5008; fec_block_height = 4; fec_block_width = 4; fec_destination_ip = "172.29.82.23"; fec_enabled = false; fec_mode = "1D"; fec_type = "XOR"; rtcp_destination_ip = "172.29.82.23"; rtcp_destination_port = 5005; rtcp_enabled = false; rtcp_source_port = 5005; rtp_enabled = false; source_ip = "172.29.82.23"; source_port = 5004; }; }; }
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the requested resource does not exist +Or
- api.single.senders[senderId]:get_constraints ()
-
Lists the constraints for each transport parameter (e.g max/min value, enumerated values etc.) using a very limited subset of JSON schema. Every transport parameter in the staged resource must be represented here. Any minimum/maximum constraints listed here must not allow a wider range of values than those allowed by the core schema. Any enum defined on this endpoint must only contain a subset of the values allowed for that parameter in the core schema. Similarly, pattern constraints must only narrow the allowed values. If the sender does not constrain parameters beyond what is specified in the core schema then the constraints in the core schema should not be duplicated on this endpoint. Where an "auto" mode is allowed in the core schema this mode must always be supported by the sender if the parameter is exposed. If SMPTE 2022-7 is in use, two entries are in the outer array of the resource. The first entry is the constraints for the primary leg. If SMPTE 2022-7 is not in use only one entry should be present in the outer array.
This function is alias forapi.single.senders[senderId].constraints:get()
.Returns:
-
any
(status 200)
Example 1: SMPTE2022-7
{ { destination_ip = { }; destination_port = { maximum = 50000, minimum = 49151 }; fec1D_destination_port = { maximum = 49151, minimum = 5000 }; fec1D_source_port = { maximum = 49151, minimum = 5000 }; fec2D_destination_port = { maximum = 49151, minimum = 5000 }; fec2D_source_port = { maximum = 49151, minimum = 5000 }; fec_block_height = { maximum = 200, minimum = 4 }; fec_block_width = { maximum = 200, minimum = 4 }; fec_destination_ip = { }; fec_enabled = { }; fec_mode = { enum = { "1D", "2D" }; }; fec_type = { enum = { "XOR", "Reed-Solomon" }; }; rtcp_destination_ip = { }; rtcp_destination_port = { maximum = 49151, minimum = 5000 }; rtcp_enabled = { }; rtcp_source_port = { maximum = 49151, minimum = 5000 }; rtp_enabled = { }; source_ip = { enum = { "192.168.7.2"; "192.168.8.5"; "2001:0db8:85a3:0000:0000:8a2e:0370:7334"; "2001:0db8:85a3:0000:0000:8a2e:0370:a24b"; }; }; source_port = { maximum = 50000, minimum = 49151 }; }; { destination_ip = { }; destination_port = { maximum = 50000, minimum = 49151 }; fec1D_destination_port = { maximum = 49151, minimum = 5000 }; fec1D_source_port = { maximum = 49151, minimum = 5000 }; fec2D_destination_port = { maximum = 49151, minimum = 5000 }; fec2D_source_port = { maximum = 49151, minimum = 5000 }; fec_block_height = { maximum = 200, minimum = 4 }; fec_block_width = { maximum = 200, minimum = 4 }; fec_destination_ip = { }; fec_enabled = { }; fec_mode = { enum = { "1D", "2D" }; }; fec_type = { enum = { "XOR", "Reed-Solomon" }; }; rtcp_destination_ip = { }; rtcp_destination_port = { maximum = 49151, minimum = 5000 }; rtcp_enabled = { }; rtcp_source_port = { maximum = 49151, minimum = 5000 }; rtp_enabled = { }; source_ip = { enum = { "192.168.9.2"; "192.168.10.5"; "2001:0db8:85a3:0000:0000:8a2e:0370:2bb4"; "2001:0db8:85a3:0000:0000:8a2e:0370:433f"; }; }; source_port = { maximum = 50000, minimum = 49151 }; }; }
Example 2: RTPNo2022-7{ { destination_ip = { }; destination_port = { maximum = 50000, minimum = 49151 }; fec1D_destination_port = { maximum = 49151, minimum = 5000 }; fec1D_source_port = { maximum = 49151, minimum = 5000 }; fec2D_destination_port = { maximum = 49151, minimum = 5000 }; fec2D_source_port = { maximum = 49151, minimum = 5000 }; fec_block_height = { maximum = 200, minimum = 4 }; fec_block_width = { maximum = 200, minimum = 4 }; fec_destination_ip = { }; fec_enabled = { }; fec_mode = { enum = { "1D", "2D" }; }; fec_type = { enum = { "XOR", "Reed-Solomon" }; }; rtcp_destination_ip = { }; rtcp_destination_port = { maximum = 49151, minimum = 5000 }; rtcp_enabled = { }; rtcp_source_port = { maximum = 49151, minimum = 5000 }; rtp_enabled = { }; source_ip = { enum = { "192.168.7.2"; "192.168.8.5"; "2001:0db8:85a3:0000:0000:8a2e:0370:7334"; "2001:0db8:85a3:0000:0000:8a2e:0370:a24b"; }; }; source_port = { maximum = 50000, minimum = 49151 }; }; }
Example 3: MQTT{ { broker_authorization = { }; broker_protocol = { }; broker_topic = { enum = { "fixedTopicName1", "fixedTopicName2" }; }; connection_status_broker_topic = { enum = { "connStatusTopic" }; }; destination_host = { }; destination_port = { enum = { 1833, 8883 }; }; }; }
Example 4: WebSocketPlusExt{ { connection_authorization = { enum = { false }; }; connection_uri = { enum = { "ws://172.29.80.65:5476/websocketServer" }; }; ext_subscription_data = { enum = { "fixedConnectionParameter" }; }; }; }
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the requested resource does not exist +Or
- api.single.senders[senderId]:get_staged ()
-
Get staged sender transport parameters object. In SMPTE 2022-7 operation element 0 of the
transport_params
array shall be the parameters applied to the primary leg, and element 1 the secondary leg. There shall only be one element present intransport_params
when SMPTE 2022-7 is not in use.
This function is alias forapi.single.senders[senderId].staged:get()
.Returns:
-
table/sender_response_struct
(status 200) Additionally constrained by the constraints at /constraints
+
result.activation
: (table/activation_response_struct) Parameters concerned with activation of the transport parameters. +result.activation.activation_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating the absolute time the sender or receiver will or did actually activate for scheduled activations, or the time activation occurred for immediate activations. On the staged endpoint this field returns to null once the activation is completed or when the resource is unlocked by setting the activation mode to null. For immediate activations on the staged endpoint this property will be the time the activation actually occurred in the response to the PATCH request, but null in response to any GET requests thereafter. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). This parameter returns to null on the staged endpoint once an activation is completed or when it is explicitly set to null. For immediate activations, in the response to the PATCH request this field will be set to 'activate_immediate', but will be null in response to any subsequent GET requests. Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
result.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation requested. This field returns to null once the activation is completed on the staged endpoint or when the resource is unlocked by setting the activation mode to null. For an immediate activation this field will always be null on the staged endpoint, even in the response to the PATCH request. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.master_enable
: (boolean) Master on/off control for sender.result.receiver_id
: (string | nil) ID of the target Receiver of this Sender. This will be null if the sender is operating in multicast mode, or has not been assigned a receiver in unicast mode, or is sending to a non-NMOS receiver in unicast mode. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.result.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +transport_params
: (array of items) +item
: (table/sender_transport_params_rtp) Describes RTP Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. As a minimum all senders must support <code>source_ip</code>, <code>destination_ip</code>, <code>source_port</code>, <code>rtp_enabled</code> and <code>destination_port</code>. Senders supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_ip
: IP address to which RTP packets will be sent. If auto is set the sender should select a multicast address to send to itself. For example it may implement MADCAP (RFC 2730), ZMAAP, or be allocated address by some other system responsible for co-ordination multicast address use. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec_block_height
: (number/integer) height of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_block_width
: (number/integer) width of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. Possible values:{"1D","2D"}
.item.fec_type
: (string) forward error correction mode to apply. Possible values:{"XOR","Reed-Solomon"}
.item.rtcp_destination_ip
: IP address to which RTCP packets will be sent (auto = same as RTP destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) rtcp on/off.item.rtcp_source_port
: (integer | string) source port for RTCP packets (auto = RTP source_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.rtp_enabled
: (boolean) RTP transmission active/inactive.item.source_ip
: IP address from which RTP packets will be sent (IP address of interface bound to this output). The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.source_port
: (integer | string) source port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.
or
transport_params
: (array of items) +item
: (any)
or
transport_params
: (array of items) +item
: (table/sender_transport_params_websocket) Describes WebSocket Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Senders must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses formatted as connection URIs. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. A null value indicates that the sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string) Must match the pattern:
or
transport_params
: (array of items) +item
: (table/sender_transport_params_mqtt) Describes MQTT Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Senders must support all properties in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Sender should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic which MQTT status messages such as MQTT Last Will are sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured, or is not using a connection status topic.item.destination_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.destination_port
: (integer | string) Destination port for MQTT traffic. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
{ activation = { }; master_enable = true; receiver_id = "0a174530-e3cf-11e6-bf01-fe55135034f3"; transport_params = { { destination_ip = "172.29.82.95"; destination_port = 5000; fec1D_destination_port = "auto"; fec1D_source_port = 5010; fec2D_destination_port = "auto"; fec2D_source_port = 5012; fec_block_height = 50; fec_block_width = 50; fec_destination_ip = "auto"; fec_enabled = true; fec_mode = "2D"; fec_type = "XOR"; rtcp_destination_ip = "172.29.82.24"; rtcp_destination_port = 5008; rtcp_enabled = true; rtcp_source_port = 5008; rtp_enabled = true; source_ip = "172.29.82.23"; source_port = 5000; }; { destination_ip = "172.30.82.95"; destination_port = 5000; fec1D_destination_port = "auto"; fec1D_source_port = 5010; fec2D_destination_port = "auto"; fec2D_source_port = 5012; fec_block_height = 50; fec_block_width = 50; fec_destination_ip = "auto"; fec_enabled = true; fec_mode = "2D"; fec_type = "XOR"; rtcp_destination_ip = "172.30.82.24"; rtcp_destination_port = 5008; rtcp_enabled = true; rtcp_source_port = 5008; rtp_enabled = true; source_ip = "172.30.82.23"; source_port = 5000; }; }; }
Example 2: Uninitialised{ activation = { }; master_enable = true; transport_params = { { destination_ip = "auto"; destination_port = "auto"; fec1D_destination_port = "auto"; fec1D_source_port = "auto"; fec2D_destination_port = "auto"; fec2D_source_port = "auto"; fec_block_height = 4; fec_block_width = 4; fec_destination_ip = "auto"; fec_enabled = false; fec_mode = "1D"; fec_type = "XOR"; rtcp_destination_ip = "auto"; rtcp_destination_port = "auto"; rtcp_enabled = false; rtcp_source_port = "auto"; rtp_enabled = true; source_ip = "auto"; source_port = "auto"; }; }; }
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the requested resource does not exist +Or
- api.single.senders[senderId]:get_transportfile ()
-
Redirects to the location of the sender's transport file or returns the transport file directly. Check HTTP response code to determine which mode of operation is in use. When returning the transport file directly ensure that the
Content-Type
entity header is correctly set.
This function is alias forapi.single.senders[senderId].transportfile:get()
.Returns:
-
table
(status 200)
result.body
: (string) Empty string.result.status
: (number) 200.
result
The transport file itself will be served +Or
-
table
(status 307)
result.body
: (string) Empty string.result.status
: (number) 307.
result
A temporary redirect to the transport file +Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned if the resource does not exist, or the transport type does not require a transport file, or if the sender is not currently configured. May also be returned when themaster_enable
parameter isfalse
in /active, if the sender only maintains a transport file when transmitting.
+Or
- api.single.senders[senderId]:get_transporttype ()
-
Returns the URN base for the transport type employed by this sender with any subclassifications or versions removed.
This function is alias forapi.single.senders[senderId].transporttype:get()
.Returns:
-
string/uri
(status 200)
- Transport type URN base used by the Sender or Receiver (i.e. with any subclassifications or versions removed). Possible content:
- (string) Possible values:
{"urn:x-nmos:transport:rtp","urn:x-nmos:transport:dash","urn:x-nmos:transport:websocket","urn:x-nmos:transport:mqtt"}
.
Example: - (string) Possible values:
"urn:x-nmos:transport:mqtt"
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the resource does not exist
+Or
- Transport type URN base used by the Sender or Receiver (i.e. with any subclassifications or versions removed). Possible content:
- api.single.senders[senderId]:options_staged ()
-
A pre-flight check generally used for Cross-Origin Resource Sharing (CORS) purposes.
This function is alias for
api.single.senders[senderId].staged:options()
.Returns:
Or
Or
- api.single.senders[senderId]:patch_staged (payload)
-
Update staged parameters for sender. Note that for activations the
mode
parameter will return tonull
once the activation transaction with the client is completed (i.e the response to the PATCH has been sent by the server). In SMPTE 2022-7 operation element 0 of thetransport_params
array shall be the parameters applied to the primary leg, and element 1 the secondary leg. There shall only be one element present intransport_params
when SMPTE 2022-7 is not in use.
This function is alias forapi.single.senders[senderId].staged:patch(payload)
.Parameters:
- payload
(table) PATCH must comply with the constraints served at /constraints but not all fields are mandatory. Any fields not included in the request JSON remain unchanged, even if they are a child of a property that was included in the request. For example a request containing changes to a single transport parameter will not alter any other transport parameter, even though the
transport_params
property was part of the request.
args.payload
: (table/sender_stage_struct) Describes a sender. +args.payload.activation
: (table/activation_struct) Parameters concerned with activation of the transport parameters. +args.payload.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
args.payload.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation. Should be null or not present if 'mode' is null. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
args.payload.master_enable
: (boolean) Master on/off control for sender.args.payload.receiver_id
: (string | nil) ID of the target Receiver of this Sender. This will be null if the sender is operating in multicast mode, or has not been assigned a receiver in unicast mode, or is sending to a non-NMOS receiver in unicast mode. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.args.payload.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +payload.transport_params
: (array of items) +item
: (table/sender_transport_params_rtp) Describes RTP Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. As a minimum all senders must support <code>source_ip</code>, <code>destination_ip</code>, <code>source_port</code>, <code>rtp_enabled</code> and <code>destination_port</code>. Senders supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_ip
: IP address to which RTP packets will be sent. If auto is set the sender should select a multicast address to send to itself. For example it may implement MADCAP (RFC 2730), ZMAAP, or be allocated address by some other system responsible for co-ordination multicast address use. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec_block_height
: (number/integer) height of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_block_width
: (number/integer) width of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. Possible values:{"1D","2D"}
.item.fec_type
: (string) forward error correction mode to apply. Possible values:{"XOR","Reed-Solomon"}
.item.rtcp_destination_ip
: IP address to which RTCP packets will be sent (auto = same as RTP destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) rtcp on/off.item.rtcp_source_port
: (integer | string) source port for RTCP packets (auto = RTP source_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.rtp_enabled
: (boolean) RTP transmission active/inactive.item.source_ip
: IP address from which RTP packets will be sent (IP address of interface bound to this output). The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.source_port
: (integer | string) source port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.
or
payload.transport_params
: (array of items) +item
: (any)
or
payload.transport_params
: (array of items) +item
: (table/sender_transport_params_websocket) Describes WebSocket Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Senders must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses formatted as connection URIs. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. A null value indicates that the sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string) Must match the pattern:
or
payload.transport_params
: (array of items) +item
: (table/sender_transport_params_mqtt) Describes MQTT Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Senders must support all properties in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Sender should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic which MQTT status messages such as MQTT Last Will are sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured, or is not using a connection status topic.item.destination_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.destination_port
: (integer | string) Destination port for MQTT traffic. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
Returns:
-
table/sender_response_struct
(status 200) A 200 response is returned for PATCH requests where no activation has been scheduled, an activation has been cancelled, or an immediate activation has been requested. The response will always contain the full set of parameters in the response schema, and all supported transport parameters. For a request with an immediate activation the API should only return a response once the new transport parameters have been applied to the underlying sender. Note the presence of the extra
result.activation
: (table/activation_response_struct) Parameters concerned with activation of the transport parameters. +result.activation.activation_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating the absolute time the sender or receiver will or did actually activate for scheduled activations, or the time activation occurred for immediate activations. On the staged endpoint this field returns to null once the activation is completed or when the resource is unlocked by setting the activation mode to null. For immediate activations on the staged endpoint this property will be the time the activation actually occurred in the response to the PATCH request, but null in response to any GET requests thereafter. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). This parameter returns to null on the staged endpoint once an activation is completed or when it is explicitly set to null. For immediate activations, in the response to the PATCH request this field will be set to 'activate_immediate', but will be null in response to any subsequent GET requests. Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
result.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation requested. This field returns to null once the activation is completed on the staged endpoint or when the resource is unlocked by setting the activation mode to null. For an immediate activation this field will always be null on the staged endpoint, even in the response to the PATCH request. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.master_enable
: (boolean) Master on/off control for sender.result.receiver_id
: (string | nil) ID of the target Receiver of this Sender. This will be null if the sender is operating in multicast mode, or has not been assigned a receiver in unicast mode, or is sending to a non-NMOS receiver in unicast mode. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.result.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +transport_params
: (array of items) +item
: (table/sender_transport_params_rtp) Describes RTP Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. As a minimum all senders must support <code>source_ip</code>, <code>destination_ip</code>, <code>source_port</code>, <code>rtp_enabled</code> and <code>destination_port</code>. Senders supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_ip
: IP address to which RTP packets will be sent. If auto is set the sender should select a multicast address to send to itself. For example it may implement MADCAP (RFC 2730), ZMAAP, or be allocated address by some other system responsible for co-ordination multicast address use. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec_block_height
: (number/integer) height of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_block_width
: (number/integer) width of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. Possible values:{"1D","2D"}
.item.fec_type
: (string) forward error correction mode to apply. Possible values:{"XOR","Reed-Solomon"}
.item.rtcp_destination_ip
: IP address to which RTCP packets will be sent (auto = same as RTP destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) rtcp on/off.item.rtcp_source_port
: (integer | string) source port for RTCP packets (auto = RTP source_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.rtp_enabled
: (boolean) RTP transmission active/inactive.item.source_ip
: IP address from which RTP packets will be sent (IP address of interface bound to this output). The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.source_port
: (integer | string) source port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.
or
transport_params
: (array of items) +item
: (any)
or
transport_params
: (array of items) +item
: (table/sender_transport_params_websocket) Describes WebSocket Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Senders must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses formatted as connection URIs. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. A null value indicates that the sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string) Must match the pattern:
or
transport_params
: (array of items) +item
: (table/sender_transport_params_mqtt) Describes MQTT Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Senders must support all properties in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Sender should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic which MQTT status messages such as MQTT Last Will are sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured, or is not using a connection status topic.item.destination_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.destination_port
: (integer | string) Destination port for MQTT traffic. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
activation_time
parameter in the response. For immediate activation this should be the time the activation actually occurred as an absolute TAI timestamp. If no activation was requested in the PATCHactivation_time
will be setnull
.
+{ activation = { mode = "activate_immediate" }; master_enable = true; transport_params = { { destination_ip = "232.105.26.177"; destination_port = 5000; fec1D_destination_port = "auto"; fec1D_source_port = 5010; fec2D_destination_port = "auto"; fec2D_source_port = 5012; fec_block_height = 50; fec_block_width = 50; fec_enabled = true; fec_mode = "2D"; fec_type = "XOR"; rtcp_destination_ip = "232.22.4.59"; rtcp_destination_port = 5008; rtcp_enabled = true; rtcp_source_port = 5008; rtp_enabled = true; source_ip = "192.168.200.10"; source_port = 5000; }; { destination_ip = "232.3.28.144"; destination_port = 5000; fec1D_destination_port = "auto"; fec1D_source_port = 5010; fec2D_destination_port = "auto"; fec2D_source_port = 5012; fec_block_height = 50; fec_block_width = 50; fec_enabled = true; fec_mode = "2D"; fec_type = "XOR"; rtcp_destination_ip = "232.79.192.98"; rtcp_destination_port = 5008; rtcp_enabled = true; rtcp_source_port = 5008; rtp_enabled = true; source_ip = "192.168.210.10"; source_port = 5000; }; }; }
Example 2: immediate-activation{ activation = { mode = "activate_immediate" }; master_enable = true; transport_params = { { destination_ip = "232.105.26.177"; destination_port = 5000; fec1D_destination_port = "auto"; fec1D_source_port = 5010; fec2D_destination_port = "auto"; fec2D_source_port = 5012; fec_block_height = 50; fec_block_width = 50; fec_enabled = true; fec_mode = "2D"; fec_type = "XOR"; rtcp_destination_ip = "232.22.4.59"; rtcp_destination_port = 5008; rtcp_enabled = true; rtcp_source_port = 5008; rtp_enabled = true; source_ip = "192.168.200.10"; source_port = 5000; }; }; }
Or
-
table/sender_response_struct
(status 202) A 202 response is returned when a request for a scheduled activation is accepted, to indicate that while the request itself was acceptable it has not yet been acted upon by the sender. For scheduled activations
result.activation
: (table/activation_response_struct) Parameters concerned with activation of the transport parameters. +result.activation.activation_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating the absolute time the sender or receiver will or did actually activate for scheduled activations, or the time activation occurred for immediate activations. On the staged endpoint this field returns to null once the activation is completed or when the resource is unlocked by setting the activation mode to null. For immediate activations on the staged endpoint this property will be the time the activation actually occurred in the response to the PATCH request, but null in response to any GET requests thereafter. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.activation.mode
: Mode of activation: immediate (on message receipt), scheduled_absolute (when internal clock >= requested_time), scheduled_relative (when internal clock >= time of message receipt + requested_time), or null (no activation scheduled). This parameter returns to null on the staged endpoint once an activation is completed or when it is explicitly set to null. For immediate activations, in the response to the PATCH request this field will be set to 'activate_immediate', but will be null in response to any subsequent GET requests. Possible content: +- (string) Possible values:
{"activate_immediate","activate_scheduled_absolute","activate_scheduled_relative"}
.
or
- (nil)
- (string) Possible values:
result.activation.requested_time
: String formatted TAI timestamp (<seconds>:<nanoseconds>) indicating time (absolute or relative) for activation requested. This field returns to null once the activation is completed on the staged endpoint or when the resource is unlocked by setting the activation mode to null. For an immediate activation this field will always be null on the staged endpoint, even in the response to the PATCH request. Possible content: +- (string) Must match the pattern:
/^[0-9]+:[0-9]+$/
.
or
- (nil)
- (string) Must match the pattern:
result.master_enable
: (boolean) Master on/off control for sender.result.receiver_id
: (string | nil) ID of the target Receiver of this Sender. This will be null if the sender is operating in multicast mode, or has not been assigned a receiver in unicast mode, or is sending to a non-NMOS receiver in unicast mode. Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/
.result.transport_params
: Transport-specific parameters. If this parameter is included in a client request it must include the same number of array elements (or 'legs') as specified in the constraints. If no changes are required to a specific leg it must be included as an empty object ({}). Possible content: +transport_params
: (array of items) +item
: (table/sender_transport_params_rtp) Describes RTP Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. As a minimum all senders must support <code>source_ip</code>, <code>destination_ip</code>, <code>source_port</code>, <code>rtp_enabled</code> and <code>destination_port</code>. Senders supporting FEC and/or RTCP must support parameters prefixed with <code>fec</code> and <code>rtcp</code> respectively. +item.destination_ip
: IP address to which RTP packets will be sent. If auto is set the sender should select a multicast address to send to itself. For example it may implement MADCAP (RFC 2730), ZMAAP, or be allocated address by some other system responsible for co-ordination multicast address use. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.destination_port
: (integer | string) destination port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_destination_port
: (integer | string) destination port for RTP Column FEC packets (auto = RTP destination_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec1D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 2 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec2D_destination_port
: (integer | string) destination port for RTP Row FEC packets (auto = RTP destination_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.fec2D_source_port
: (integer | string) source port for RTP FEC packets (auto = RTP source_port + 4 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.fec_block_height
: (number/integer) height of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_block_width
: (number/integer) width of block over which FEC is calculated in packets. Minimum:4
. Maximum:200
.item.fec_destination_ip
: May be used if NAT is being used at the destination (auto = destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.fec_enabled
: (boolean) FEC on/off.item.fec_mode
: (string) forward error correction mode to apply. Possible values:{"1D","2D"}
.item.fec_type
: (string) forward error correction mode to apply. Possible values:{"XOR","Reed-Solomon"}
.item.rtcp_destination_ip
: IP address to which RTCP packets will be sent (auto = same as RTP destination_ip by default). Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.rtcp_destination_port
: (integer | string) destination port for RTCP packets (auto = RTP destination_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.item.rtcp_enabled
: (boolean) rtcp on/off.item.rtcp_source_port
: (integer | string) source port for RTCP packets (auto = RTP source_port + 1 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.item.rtp_enabled
: (boolean) RTP transmission active/inactive.item.source_ip
: IP address from which RTP packets will be sent (IP address of interface bound to this output). The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. Possible content: +- (string/ipv4) or
- (string/ipv6) or
- (string) Must match the pattern:
/^auto$/
.
item.source_port
: (integer | string) source port for RTP packets (auto = 5004 by default). Must match the pattern:/^auto$/
. Minimum:0
. Maximum:65535
.
or
transport_params
: (array of items) +item
: (any)
or
transport_params
: (array of items) +item
: (table/sender_transport_params_websocket) Describes WebSocket Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. WebSocket Senders must support all parameters in this schema. +item.connection_authorization
: (string | boolean) Indication of whether authorization is required to make a connection. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on its own internal configuration. Possible values:{"auto",true,false}
.item.connection_uri
: URI hosting the WebSocket server as defined in RFC 6455 Section 3. The sender should provide an enum in the constraints endpoint, which should contain the available interface addresses formatted as connection URIs. If the parameter is set to auto the sender should establish for itself which interface it should use, based on routing rules or its own internal configuration. A null value indicates that the sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/uri) Must match the pattern:
/^wss?://.*/
.
or
- (nil)
- (string) Must match the pattern:
or
transport_params
: (array of items) +item
: (table/sender_transport_params_mqtt) Describes MQTT Sender transport parameters. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint. MQTT Senders must support all properties in this schema. +item.broker_authorization
: (string | boolean) Indication of whether authorization is used for communication with the broker. If the parameter is set to auto the Sender should establish for itself whether authorization should be used, based on a discovery mechanism or its own internal configuration. Possible values:{"auto",true,false}
.item.broker_protocol
: (string) Indication of whether TLS is used for communication with the broker. 'mqtt' indicates operation without TLS, and 'secure-mqtt' indicates use of TLS. If the parameter is set to auto the Sender should establish for itself which protocol it should use, based on a discovery mechanism or its own internal configuration. Possible values:{"auto","mqtt","secure-mqtt"}
.item.broker_topic
: (string | nil) The topic which MQTT messages will be sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured.item.connection_status_broker_topic
: (string | nil) The topic which MQTT status messages such as MQTT Last Will are sent to on the MQTT broker. A null value indicates that the Sender has not yet been configured, or is not using a connection status topic.item.destination_host
: Hostname or IP hosting the MQTT broker. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. A null value indicates that the Sender has not yet been configured. Possible content: +- (string) Must match the pattern:
/^auto$/
.
or
- (string/hostname) or
- (string/ipv4) or
- (string/ipv6) or
- (nil)
- (string) Must match the pattern:
item.destination_port
: (integer | string) Destination port for MQTT traffic. If the parameter is set to auto the Sender should establish for itself which broker it should use, based on a discovery mechanism or its own internal configuration. Must match the pattern:/^auto$/
. Minimum:1
. Maximum:65535
.
activation_time
should be the absolute TAI time the parameters will actually transition. For absolute scheduled activations should be the same as the requested time, but may differ if the sender is unable to schedule at the requested time. This may be because the transition may only occur, for example, at a frame boundary or end of GOP. In all other ways this response behaves identically to a 200 response.
+{ activation = { activation_time = "1496759200:5000"; mode = "activate_scheduled_relative"; requested_time = "1496759200:0"; }; master_enable = true; transport_params = { { destination_ip = "232.105.26.177"; destination_port = 5000; fec1D_destination_port = "auto"; fec1D_source_port = 5010; fec2D_destination_port = "auto"; fec2D_source_port = 5012; fec_block_height = 50; fec_block_width = 50; fec_enabled = true; fec_mode = "2D"; fec_type = "XOR"; rtcp_destination_ip = "232.22.4.59"; rtcp_destination_port = 5008; rtcp_enabled = true; rtcp_source_port = 5008; rtp_enabled = true; source_ip = "192.168.200.10"; source_port = 5000; }; }; }
Example 2: relative-scheduled-activation{ activation = { activation_time = "1496759200:0"; mode = "activate_scheduled_relative"; requested_time = "2:0"; }; master_enable = true; transport_params = { { destination_ip = "232.105.26.177"; destination_port = 5000; fec1D_destination_port = "auto"; fec1D_source_port = 5010; fec2D_destination_port = "auto"; fec2D_source_port = 5012; fec_block_height = 50; fec_block_width = 50; fec_enabled = true; fec_mode = "2D"; fec_type = "XOR"; rtcp_destination_ip = "232.79.192.98"; rtcp_destination_port = 5008; rtcp_enabled = true; rtcp_source_port = 5008; rtp_enabled = true; source_ip = "192.168.200.10"; source_port = 5000; }; }; }
Or
-
table/error
(status 400) A 400 response is returned when the request did not meet the schema and constraints.
+
result.code
: (number/integer) HTTP error code. Minimum:400
. Maximum:599
.result.debug
: (nil | string) Debug information which may assist a programmer working with the API.result.error
: (string) Human readable message which is suitable for user interface display, and helpful to the user.
{ code = 400, error = "`source_ip` must be a valid IPv4 or IPv6 address" }
Or
-
table
(status 404)
result.body
: (string) Empty string.result.status
: (number) 404.
result
Returned when the requested resource does not exist +Or
-
table
(status 409)
result.body
: (string) Empty string.result.status
: (number) 409.
result
Returned when the requested resource is only available at a different API version. +Or
-
table
(status 423)
result.body
: (string) Empty string.result.status
: (number) 423.
result
Returned when the resource is locked because an activation has been scheduled. A resource may be unlocked by settingmode
inactivation
tonull
, which will cancel the pending activation. This may be done in the same request as a change to other parameters.
+Or
-
table/error
(status 500) A 500 response may be returned if the transport file could not be parsed, or there is some failure caused by activation which was not caused by a violation of schema or constraints.
result.code
: (number/integer) HTTP error code. Minimum:400
. Maximum:599
.result.debug
: (nil | string) Debug information which may assist a programmer working with the API.result.error
: (string) Human readable message which is suitable for user interface display, and helpful to the user.
+{ code = 500, error = "Could not establish link to hardware" }
Usage:
-- Example 1: absolute-scheduled-activation connection = require "lua-repl.lib.rest.nmos.connection" api = connection:create_api("http://connection.nmos.acme.example.com") payload = { activation = { mode = "activate_scheduled_absolute", requested_time = "1496759200:0" }; master_enable = true; transport_params = { { destination_ip = "232.105.26.177"; destination_port = 5000; rtp_enabled = true; source_ip = "192.168.200.10"; source_port = 5000; }; }; } result = api.single.senders[senderId]:patch_staged(payload) -- Example 2: activation-only payload = { activation = { mode = "activate_immediate" }; } result = api.single.senders[senderId]:patch_staged(payload) -- Example 3: immediate-activation payload = { activation = { mode = "activate_immediate" }; master_enable = true; transport_params = { { destination_ip = "232.105.26.177"; destination_port = 5000; rtp_enabled = true; source_ip = "192.168.200.10"; source_port = 5000; }; }; } result = api.single.senders[senderId]:patch_staged(payload) -- Example 4: redundant-streams payload = { activation = { mode = "activate_immediate" }; master_enable = true; transport_params = { { destination_ip = "232.105.26.177"; destination_port = 5000; rtp_enabled = true; source_ip = "192.168.200.10"; source_port = 5000; }; { destination_ip = "232.3.28.144"; destination_port = 5000; rtp_enabled = true; source_ip = "192.168.210.10"; source_port = 5000; }; }; } result = api.single.senders[senderId]:patch_staged(payload) -- Example 5: relative-scheduled-activation payload = { activation = { mode = "activate_scheduled_relative", requested_time = "2:0" }; master_enable = true; transport_params = { { destination_ip = "232.105.26.177"; destination_port = 5000; rtp_enabled = true; source_ip = "192.168.200.10"; source_port = 5000; }; }; } result = api.single.senders[senderId]:patch_staged(payload) -- Example 6: unicast payload = { activation = { mode = "activate_scheduled_relative", requested_time = "2:0" }; master_enable = true; receiver_id = "0b174530-e3cf-41e6-bf01-fe55135034f3"; transport_params = { { destination_ip = "192.168.200.15"; destination_port = 5000; rtp_enabled = true; source_ip = "192.168.200.10"; source_port = 5000; }; }; } result = api.single.senders[senderId]:patch_staged(payload)
- payload
(table) PATCH must comply with the constraints served at /constraints but not all fields are mandatory. Any fields not included in the request JSON remain unchanged, even if they are a child of a property that was included in the request. For example a request containing changes to a single transport parameter will not alter any other transport parameter, even though the
- api.single.senders:get ()
-
Sender root.
Returns:
-
table/sender_receiver_base[]
(status 200) List Available Senders. All UUIDs are appended with / to indicate the ID forms part of the URL for the next layer down.
result.nil
: (array of items) Connection API sender/receiver base resource. Describes the Connection API sender/receiver base resource. +item
: (string) Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/$/
.
Example:
{ "c72cca5b-01db-47aa-bb00-03893defbfae/"; "171d5c80-7fff-4c23-9383-46503eb1c63e/"; "a2655c48-8a46-4c82-b9bc-98760d59d7f8/"; }
- api.single:get_receivers ()
-
List available receivers. All UUIDs are appended with / to indicate the ID forms part of the URL for the next layer down.
This function is alias for
api.single.receivers:get()
.Returns:
-
table/sender_receiver_base[]
(status 200)
result.nil
: (array of items) Connection API sender/receiver base resource. Describes the Connection API sender/receiver base resource. +item
: (string) Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/$/
.
Example:
{ "c72cca5b-01db-47aa-bb00-03893defbfae/"; "171d5c80-7fff-4c23-9383-46503eb1c63e/"; "a2655c48-8a46-4c82-b9bc-98760d59d7f8/"; }
- api.single:get_senders ()
-
Sender root.
This function is alias for
api.single.senders:get()
.Returns:
-
table/sender_receiver_base[]
(status 200) List Available Senders. All UUIDs are appended with / to indicate the ID forms part of the URL for the next layer down.
result.nil
: (array of items) Connection API sender/receiver base resource. Describes the Connection API sender/receiver base resource. +item
: (string) Must match the pattern:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/$/
.
Example:
{ "c72cca5b-01db-47aa-bb00-03893defbfae/"; "171d5c80-7fff-4c23-9383-46503eb1c63e/"; "a2655c48-8a46-4c82-b9bc-98760d59d7f8/"; }
- lua-repl.lib.rest.nmos.connection.api:get ()
-
List of modes available from this API - single and bulk. Both are compulsory parts of the spec.
Returns:
-
table/connectionapi_base[]
(status 200)
result.nil
: (array of items) Connection API base resource. Describes the Connection API base resource. +item
: (string) Possible values:{"bulk/","single/"}
.
Example:
{ "bulk/", "single/" }
- lua-repl.lib.rest.nmos.connection.api:get_bulk ()
-
Senders / receivers options.
This function is alias for
api.bulk:get()
.Returns:
-
table/connectionapi_bulk[]
(status 200)
result.nil
: (array of items) Connection API /bulk base resource. Describes the Connection API /bulk base resource. +item
: (string) Possible values:{"senders/","receivers/"}
.
Example:
{ "senders/", "receivers/" }