Web server query interface

The query interface of a Controller provides access to timeline status information, text slot contents, etc. for custom web pages.

Syntax

If you GET the URL:

http://xxx.xxx.xxx.xxx/query/command[?args]

and command and args are recognised, the controller will return the result of the query, else, it will return a 204 (No Response) HTTP header.

Data will be returned as XML. Recognised commands are:

Commands

Get Controller Settings

Get a summary of the Controller's settings.

Sample Response
<response>

  <hardwareType>LPC2</hardwareType>

  <serialNumber>002056</serialNumber>

  <firmwareVersion>

    <major>1</major>

    <minor>7</minor>

    <point>133</point>

  </firmwareVersion>

  <networkInterface>

    <ipAddress>172.20.1.9</ipAddress>

    <subnetMask>255.255.0.0</subnetMask>

    <gateway>172.20.0.250</gateway>

  </networkInterface>

  <cfCardSizeKb>1024</cfCardSizeKb>

  <date>2010-04-23</date>

  <time>08:59:14</time>

  <sunrise>06:55:00</sunrise>

  <sunset>19:02:00</sunset>

  <projectName>My First Show</projectName>

  <projectAuthor>Joe Bloggs</projectAuthor>

  <projectUuid>00000000-0000-0000-0000-000000000000</projectUuid>

  <projectUploadDate>2010-04-21T13:36:18</projectUploadDate>

  <controllerNumber>1</controllerNumber>

</response>

Notes

<date>, <time>, <sunrise> and <sunset> are in local time.

LPC X will have a <networkInterface2> tag with the network details of the second interface.

AVC will not have a <projectUploadDate> tag.

Get Current Time

Get a time and date from the Controller's system clock in local time.

Sample Response
<response>

  <currentTime>

    <date>2002-05-30</date>

    <time>09:00:00</time>

  </currentTime>

</response>

Get Timelines

Get a list of timelines in the project. id is the timeline number.

Sample Response
<response>

  <timeline id = "1">

    <name>My First Timeline</name>

    <length>P00H30M00.00S</length>

    <timeSource>

      <type>Timecode</type>

      <bus>2</bus>

    </timeSource>

    <timeOffset>P00H00M00.00S</timeOffset>

    <timeFormat>SMPTE30</timeFormat>

  </timeline>

  <timeline id = "3">

    ...

  </timeline>

</response>

Get Timeline Statuses

Gets the current status of timelines in the project. id is the timeline number.

Sample Response
<response>

  <timelineStatus id = "1">

    <playState>Running</playState>

    <position>P00H14M03.50S</position>

    <onStage>true</onStage>

  </timelineStatus>

  <timelineStatus id = "3">

    <playState>Released</playState>

  </timelineStatus>

</response>

Notes

Valid values for <playState> are:

Get Text Slots

Get a list of text slots in the project, along with their current values.

Sample Response
<response>

  <textSlot name = "slot_name">slot value</textSlot>

</response>

Notes

Multiple text slots can be requested by adding multiple query arguments, for example:

GET http://xxx.xxx.xxx.xxx/query/textSlot?slot1&slot2&slot3

If a slot name is not recognised, it will be ignored.

Get Global Lua Variables

Get the value of a global Lua variable.

Sample Response
<response>

  <variable name = "variable_name">variable value</variable>

</response>

Notes

Multiple variables can be requested by adding multiple query arguments, for example:

GET http://xxx.xxx.xxx.xxx/query/variable?variable1&variable2&variable3

If a variable name is not recognised, or if the variable's value cannot be represented as text, the <variable> tag will contain no value.

If a variable name is a Lua table it will be returned in an XML format as follows:

<response>

  <variable name="variable1">

    <variable name="1a">value 1a</variable>

    <variable name="1b">value 1b</variable>

  </variable>

  <variable name="variable2">value 2</variable>

   ...

</response>

Example

An example file can be found here.

Related Topics Link IconRelated Topics