Introduction

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

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

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

Skip Next

Skip the next item in the rundown.

GET api/v1/command/skip-next

Unskip Next

Unskip a previously skipped item in the rundown.

GET api/v1/command/un-skip-next

Skip Next Sub Item

Skip the next sub item in the rundown.

GET api/v1/command/skip-next-sub-item

Unskip Next Sub Item

Unskip a previously skipped sub item in the rundown.

GET api/v1/command/un-skip-next-sub-item

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) and which bus (optional).

GET api/v1/command/template?type={template-type}&variant={variant}&bus={preview|program}

For example,
GET api/v1/command/template?type=Camera&variant=CAM1

Here Camera and CAM1 are the current type and name of the desired template cut to program.

GET api/v1/command/template?type=Camera&variant=CAM1&bus=PREVIEW

Here Camera and CAM1 are the actual type and name of the desired template put into preview.

Trigger a DirectTake Template

Trigger a given DirectTake template. You must provide the number of desired template.

GET api/v1/command/directtake?number={number}

Trigger Control Command

Trigger a control command in Mosart.

Here is a list of the Control Commands supported by the API along with the parameters the command takes.

Control Command

Parameters (case sensitive)

start_from_top

switch_rehearsal_mode

Action: TOGGLE | ACTIVATE | DEACTIVATE
If no Action parameter is passed, it will DEACTIVATE.

autotake

Action: TRUE | ACTIVATE | FALSE | DEACTIVATE | TOGGLE
If no Action parameter is passed, it will TOGGLE

play_story

Story+Name: String

videowallmode

MicEffect: string

release_background

CueOnly: bool

overlay_graphics

Render: string
Action: CONTINUE | TAKE_MANUAL_OUT | TAKE_ALL_OUT | TAKE_LAST_OUT | PRETAKE_NEXT | CLEAR | MACRO | TAKE_NAMED_OVERLAY
Parameter: string
Value: string

marked

Description: string

directtake

Template: number

accessories

ncs

Action: START_STATUS | STOP_STATUS
Parameter: string

rundown_ncs_resync

user_message

Message: string

overlay_to_manual

Target: SELECTED | ONAIR | PREVIEW
Handlers: string
TakeOutMethod: AUTOMATIC | MANUAL
storyid: string

gui

asrunlog_event

Action: RemotePanelFunctions
Parameter: string

switch_graphics_mirroring

Action: TOGGLE | ACTIVATE | DE-ACTIVATE

enable_graphics_mirroring

Target: NONE | OVERLAY
Action: bool

switch_genlock_mode

Action: TOGGLE | ACTIVATE

engine_switcher

Action: INIT | PRESET_STYLE | GOTO_PREV_PRESET
PresetName: string
Transition: CUT | TAKE

autotrans

MixEffect: PP | PROGRAM | ME1 | ME2 | ME3
Transitionrate: string

video_server_goto

ServerChannel: CURRENT | ONAIR | PREVIEW
frame: number

dve

Direction: FORWARD | FWD | REVERSE | REV | BACKWARD

fullscreen_graphics

Engine: string
Action: CONTINUE | MACRO
Parameter: string

audio

Action: FADE_MANUAL | FADE_OUT_KEEPS | FREEZE_AUDIO | SET_LEVEL_2_PREVIEW | SET_LEVEL_2_ONAIR | FADE_DOWN_ALL_MAINS | FADE_DOWN_SECONDARY_AUDIO | FADE_UP_LAST_MAINS | FADE_UP_SECONDARY_AUDIO
Faderate: number

light

Scene: number

sequence

Action: START | STOP | LOOP | STOPLOOP

take_server_to_program

MixEffect: PP | PROGRAM | ME1 | ME2 | ME3
Transitionrate: number

video_port

Action: PLAY_PAUSE | PLAY | PAUSE | PLAY_CONTINUE | STOP | CUE | RECUE | SET_LOOP | SET_LOOP_OFF | PLAY_TAIL | CUE_TAIL
VideoPort: string
Parameter: string

get_player_status

VideoPort: string

weather

Action: PLAY | CONTINUE | GOTO_FIRST

graphicsprofile

Name: string

studiosetup

Name: string

set_aux_crosspoint

Bus: string
CrossPoint: string

set_crosspoint

MixEffect: PP | PROGRAM | ME1 | ME2 | ME3
Bus: A | B | C | D | KEY1 | KEY2 | KEY3 | KEY4
CrossPoint: string

transition_type

TransitionType: MIX | WIPE | EFFECT | Default | Toggle | Cut | None
Value: number

record

Command: PREPARE | START | STOP | STOP_AND_DETACH | DELETE | GETSOM
ClipName: string
PortName: string
Group: string
Recorder: string
Duration: number
IgnoreClipNamePattern: bool

device_properties

For audio mixer device properties:
Parameter1: AUDIO
Parameter2: string
The key of the property you want to set.
Parameter3: string
The value of the property you want to set.

set_videoserver_salvo

Salvo: string

switch_videoserver_mirroring

GET api/v1/command/controlcommand/{command}?params…

Load Rundown

Load/Open a specific rundown in Mosart. This only works with MOS-based rundowns, and you have to provide the ID of the rundown that you want to open. In Vizrt’s Showmaker, you can get this ID by opening a rundown, then copying the ID from the URL.

GET api/v1/command/open-rundown?id={rundown-id}

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.

Remote Control Dispatcher Service (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.

%ProgramData%\Mosart Medialab\ConfigurationFiles\RemoteDispatcherServiceConfig.xml
<?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"

Warning: All the above commands will impact the live show on your Mosart server.