Viz Mosart Administrator Guide
Version 5.4 | Published July 22, 2024 ©
Mosart Remote Control REST API
The Mosart Remote Control Service (RCS) provides a REST API for controlling Viz Mosart rundowns using REST. This interface in effect duplicates some GPI/O calls (0-4) for rundown operations.
Working with the REST API
Working with the REST API
Prerequisites/Conditions
-
The descriptions below of the command assume that RCS and the user work on the same machine and its name is localhost.
-
The API hosted by RCS and configured to run on port 55167. This port can not be configured.
-
Employs API key-based authentication where the key needs to be passed in a HTTP header called "X-API-key". See Authentication below.
-
All routes under "/api/v1/command" are protected.
-
All commands of this API are accessible only when RCS is running.
Swagger Documentation
-
The Swagger documentation that describes every command can be found at http://localhost:55167/swagger/.
Command Descriptions
Reload rundown
The reload endpoint allows you to reload the current rundown. It will trigger a rundown reload event. I.e. the timeline will be stopped and the current rundown will be reloaded from the NRCS cache. No additional parameters.
GET api/v1/command/reload
Start/Continue Rundown
Start or continue the rundown. You can use some optional parameters - see the swagger documentation.
GET api/v1/command/start-continue
Start Rundown from Top
Restart the rundown from the first story. No additional parameters.
GET api/v1/command/start-from-top
Enable/disable Rehearsal Mode
Enable/disable/toggle rehearsal mode:
GET api/v1/command/rehearsal-mode?state=true
GET api/v1/command/rehearsal-mode?state=false
GET api/v1/command/rehearsal-mode
Take a Template
Takes the template by its type and variant (name).
GET
api/v1/command/template?type={template-type}&variant={variant}
For example,
GET
api/v1/command/template?type=Camera&variant=CAM1
Here Camera and CAM1 are the actual type and name of the desired template.
Trigger a DirectTake Template
Triger a given DirectTake template. You must provide the number of desired template.
GET api/v1/command/directtake?number={number}
an
Authentication
All commands require the special API key as a sign that the action has been authorized. This key should be passed in HTTP header called X-API-key.
RCS configuration file
The RCS configuration file contains a new setting RestApi. It's value can be randomly generated to be robust and sustainable against brute-force attack. Each REST call will compare the passed in header key X-API-key with the value from the RestApi setting first.
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<
RemoteServiceConfig
>
<
Properties
>
...
<
item
name
=
"RestApiKey"
value
=
"test-api-key"
/>
curl -X GET
"http://localhost:55167/api/v1/command/reload"
-H
"accept: */*"
-H
"X-API-Key: test-api-key"
Info: All the above commands will impact the live show on your Mosart Server.