Cinegy Air HTTP API to Control Layers (Devices)
Reading time ~3 minutes
Main URL Definition
Main URL is http://NAME:PORT/DEVICE
where:
-
NAME is the server name or IP address,
-
PORT is 5521 plus the instance number,
-
DEVICE is the device name, possible values are:
-
video
-
titler_0
-
logo
-
cg_0 … cg_8
-
cg_logo
-
gfx_0 … gfx_8
-
gfx_logo
-
gfx_0 … gfx_8
-
gfx_logo
-
audio
-
All names are in lowercase letters, uppercase is "macro". Can be dependent on the engine version and configuration (gfx layers, ovl layers).
Note
|
The audio device is designed for overlaying audio over video file. |
Commands
Command URL is http://NAME:PORT/DEVICE/command
The request method should be POST, the request body should be XML with command request and Content-Type in the request header should be text/xml.
General request XML is:
<?xml version="1.0" encoding="utf-8"?>
<Request>
<!-- Here should be one or more command tags -->
</Request>
Request tags are:
<Cue Id="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"/>
<StartCued />
<GPI Commercial="y" Preroll="10" />
<GPI Commercial="n" Preroll="10" />
<Event Device="" Cmd="" Op1="" Op2="" Op3=""
Name="" Description="" ThirdPartyId=""
Id="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}">
<Op1></Op1>
<Op2></Op2>
<Op3></Op3>
</Event>
<SetOutput State="Normal|Black|Bypass|Clean"/>
<ExitSceneLoop/>
<SetVariables>
<Variable Name="Name1" Value="Val1"/>
<Variable Name="Name2" Value="Val2"/>
<!-- More like above -->
</SetVariables>
General response is:
<?xml version="1.0" encoding="utf-8"?>
<Reply Sucess="n" Status="Error">
<!-- Here should be one or more response tags like following -->
<Result Sucess="y" Status="OK" />
<Result Sucess="n" Status="0x8XXXXXXX" />
</Reply>
Upper success is "yes" only if all commands were successfully executed. Syntax error can lead to the partial command execution. Bad command result does not stop the execution.
Status
Status URL is http://NAME:PORT/DEVICE/status
Method is GET.
Result XML is:
<?xml version="1.0" encoding="utf-8"?>
<Status>
<Active Id="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"/>
<Cued Id="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"/>
<License State="Licensed|Not Licensed|Demo"/>
<Output State="Normal|Black|Bypass|Clean"/>
<Client Connected="y|n" Identity="IdentityString"/>
</Status>
Status for active item URL is http://NAME:PORT/DEVICE/status/active
Status for cued item URL is http://NAME:PORT/DEVICE/status/cued
Method is GET.
Result XML is the same as for items list request.
List and Items
List URL is http://NAME:PORT/DEVICE/list
Method is GET.
Result XML is:
<?xml version="1.0" encoding="utf-8"?>
<List>
<Item Id="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"
Name="Name" Description="Desc" ThirdPartyId="3rd ID" SubtitleId="CCC"
ProxyProgress="0" ProxyError="y"
ScheduledAt="yyyy-mm-ddThh:mm:ss.mssZ" Duration="hh:mm:ss.mss" IsEmpty="y"
Clocked="y" ManualEnd="y" JipSkipable="y"
LoopBody="y" LoopStart="y" ManualStart="y"
TrickLoop="y" />
<!-- More like above -->
</List>
Item URL is http://NAME:PORT/DEVICE/list/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Method is GET.
Result XML is:
<?xml version="1.0" encoding="utf-8"?>
<Item Id="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"
Name="Name" Description="Desc" ThirdPartyId="3rd ID" SubtitleId="CCC"
AvailId="AA" EpgId="EEEE"
ProxyProgress="0" ProxyError="y"
ScheduledAt="yyyy-mm-ddThh:mm:ss.mssZ" Duration="hh:mm:ss.mss" IsEmpty="y"
Clocked="y" ManualEnd="y" JipSkipable="y"
LoopBody="y" LoopStart="y" ManualStart="y"
TrickLoop="y" />
All "yes" values are present only if they are "yes", and absent if they are "no". Absent proxy status means that proxy is disabled or not relevant for this device. Other absent values actually mean that they are empty strings. "SheduledAt" and "Duration" are always filled, the first is just approximation made by plain list analysis but actual time depends on loops and manual status.