Viz Mosart Media Router Guide
Version 5.1 | Published November 01, 2022 ©
Media Router REST Protocol
This section contains the REST protocol used to communicate with the Viz Mosart Media Router.
The REST protocol is based upon using HTTP GET for all protocols, even for setting crosspoints and properties on the server. This makes it easy to test all functionalities using the REST protocol via a web browser.
This section will cover the following topics:
Viz Mosart Media Router REST Command Format
The following command is the general Mosart Media Router REST protocol command:
http:
//[hostname]:[port]/MosartMediaRouter/Rest.svc/<command>?<params>
hostname: Server name or IP-address for the Mosart Media Router REST service.
port: TCP/IP port for the Mosart Media Router REST service. Default 8094.
<command>: Command issued.
<params>: Optional parameters for the command.
For simplicity, the service part of the REST URI templates will be replaced with [service] in the following. i.e:
[service] = http://[hostname]:[port]/MosartMediaRouter/Rest.svc
REST Commands
The available commands via the REST protocol are as follows:
Command |
Description |
Retrieves information of all clients. |
|
Retrieves information of all sources. |
|
Retrieves information of all inports or inports connected to a given source |
|
Retrieves information of all outports or outports connected to a given client |
|
Retrieves information of a single or multiple salvos |
|
Retrieves information of the current state of the router |
|
Retrieves information of the pending state of the router |
|
Retrieves information of the current or salvo specific configuration for a given client |
|
Retrieves information of changed crosspoints from a given timestamp |
|
Sets a specified crosspoint |
|
Fires a specified salvo |
|
Returns current Media Router status |
To communicate with the Mosart Media Router REST service, the event client requires an authentication process. Depending on who the user is, some parts of the router may be restricted. The specifications for authentication are provided in the Retrieval Commands. The authentication process is based on OAuth, a common protocol for web services for this purpose. Details of this authentication process are still under development.
Retrieval Commands
This section contains commands for obtaining information.
clients
The clients command is used to obtain information about the clients of the Mosart Media Router. A typical client is a Mosart Server or Omnibus.
The REST URI template for the clients command:
[Service]/clients
sources
The sources command is used to obtain information about the sources of the Mosart Media Router. A typical source is a video playout server.
The REST URI template for the sources command:
[Service]/sources
inports
The inports command is used to obtain information about the inports of the Mosart Media Router. A typical inport is a port of a video playout server. Two variants of this command exist. One for retrieving all inports and one for retrieving inports for a given source. The REST URI template for the inports command:
[Service]/inports
[Service]/inports?source=[source]
source: Name of the source to obtain inports for.
outports
The outports command is used to obtain information about the outports of the Mosart Media Router. A typical outport is a port used by a Mosart Server. Two variants of this command exist. One for retrieving all outports and one for retrieving outports for a given client. The REST URI template for the outports command:
[Service]/outports
[Service]/outports?client=[client]
client: Name of the client to obtain outports for.
salvos
The salvos command is used to obtain information about the registered salvos within the Mosart Media Router. Two variants of this command exist. One for retrieving information for all salvos and one for retrieving information for a given salvo.
The REST URI template for the salvos command:
[Service]/salvos
[Service]/salvos?salvo=[salvo]
salvo: Name of the salvo to obtain information for.
current
The current command is used to obtain information about the current salvo within the Mosart Media Router. The current salvo is the same as the current state of the Mosart Media Router.
The REST URI template for the current command:
[Service]/current
pending
The pending command is used to obtain information about the pending salvo within the Mosart Media Router. The pending salvo is the same as the current state but may contain crosspoints that are not verified (pending) by the clients.
The REST URI template for the pending command:
[Service]/pending
config
The config command is used to obtain information about the crosspoints for a given client either for the current or a specified
The REST URI template for the config command:
[Service]/config?client=[client]
[Service]/config?client=[client]&salvo=[salvo]
client: Name of the client to obtain the configuration for.
salvo: Name of the salvo to obtain the client configuration for, if specified.
crosspoints
The crosspoints command is used to obtain information about the crosspoint that have been changed since a given timestamp. This command is normally used to poll the Mosart Media Router for its current state.
The REST URI template for the crosspoints command:
[Service]/crosspoints?from=[timestamp]
timestamp: Returns all crosspoints changed after the specified timestamp.
Control Commands
Commands in this section control the Mosart Media Router, by changing the state of the Mosart Media Router.
Note: The HTTP GET protocol is used instead of HTTP PUT. This makes it possible to test the commands using an ordinary web browser.
setcrosspoint
The setcrosspoint command is used to set a crosspoint in any salvo. If no salvo is given the crosspoint is set in the pending salvo to be executed immediately. If the specified salvo does not exist, a new salvo with the corresponding name shall be generated.
The REST URI template for the setcrosspoint command:
[Service]/setcrosspoint/[inport]/[outport]
[Service]/setcrosspoint/[inport]/[outport]?salvo=[salvo]
inport: Specifies the inport of the crosspoint.
outport: Specifies the outport of the crosspoint.
salvo: Specifies the salvo where the crosspoint shall be set. If no salvo is given, the crosspoint is set directly in the router (pending salvo).
setsalvo
The setsalvo command is used to fire a salvo.
The REST URI template for the setsalvo command:
[Service]setsalvo/[salvo]
salvo: Specifies the salvo to fire.