Advanced Control

primary

post

any api command can be sent as a POST request body to this endpoint

Body
commandstringOptionalExample: getTime
parametersobjectOptionalExample: {"key1":"value1","key2":"value2"}
variablesobjectOptionalExample: {"key1":"value1","key2":"value2"}
Responses
200
successful operation
application/json
post
POST /api HTTP/1.1
Host: 127.0.0.1:9022
Content-Type: application/json
Accept: */*
Content-Length: 114

{
  "command": "getTime",
  "parameters": {
    "key1": "value1",
    "key2": "value2"
  },
  "variables": {
    "key1": "value1",
    "key2": "value2"
  }
}
{
  "result": {
    "success": true,
    "ANY_ADDITIONAL_PROPERTY": "text"
  }
}

schedule

post

Internal version of the scheduleAction command.

Query parameters
requestIdstringOptional

optional id to track this command, will be returned in the response

Example: 123
idstringOptional

optional: UUID of title/layer to operate on

titlestringOptional

optional: Name (or UUID) of the title to operate on.

Example: Test
channelnumberOptional

channel to query or -1 for all; channels are numbered from left to right starting at 0 regardless of their names in the project

Example: -1
actionstringRequired

(REQUIRED) ONE OF: animateIn, animateOut, alert, cutin, cutout, render, update, still, automatic

Example: animateIn
queuestringOptional

optional A "queue" name used internally

Example: AlertQueue
markInstringOptional

optional

markOutstringOptional

optional

timestringOptional

When should this action fire? Time is specified in seconds since program launch. See command: getTime

Body
Other propertiesstringOptional
Responses
200
successful operation
application/json
post
POST /api/command/schedule HTTP/1.1
Host: 127.0.0.1:9022
Content-Type: application/json
Accept: */*
Content-Length: 33

{
  "key1": "value1",
  "key2": "value2"
}
{
  "result": {
    "command": "schedule",
    "reply": "schedule",
    "requestId": "123",
    "success": true
  }
}

customMessage

get

The command doesn't have to be "customMessage". It can be anything you want, just so long as the to field has been set. If the to field names a listening controller, this command will result in a success message. Otherwise, the result will be an error. In either case, the message will be sent as a notification to all controllers.

Query parameters
requestIdstringOptional

optional id to track this command, will be returned in the response

tostringRequired

By convention, is usually the name of another input. When set, this message is passed to all data controllers as a notification (including itself) but will not be handled by Captivate at all. If this is missing, Captivate will treat this like a normal command, and it might cause undesired results.

Example: My Controller: Instance 1
senderstringOptional

You can specify a "sender" for this message. The sender defaults to the empty string and is internally known as the "default" sender. Controllers that subscribe to notifications can choose which "sender" to listen to. Currently, only some API methods support filtering messages by sender, but making use of sender values in your controllers is good practice.

Example: My Controller: Instance 2
key1anyOptional

Any valid JSON object

Example: value
Responses
200
successful operation
application/json
get
GET /api/command/customMessage HTTP/1.1
Host: 127.0.0.1:9022
Accept: */*
{
  "result": {
    "command": "customMessage",
    "error": "No such input",
    "reply": "customMessage",
    "sender": "",
    "success": true,
    "to": "Some+Listener"
  }
}

macro

get

High level title playback control.

Query parameters
requestIdstringOptional

optional id to track this command, will be returned in the response

idstringOptional

optional: UUID of title/layer to operate on

titlestringOptional

comma-separated list of title names. In direct case, prepend 'name:' to title id, ie 'name:{id...}'

Example: Title Name
channelnumberOptional

channel to query or -1 for all; channels are numbered from left to right starting at 0 regardless of their names in the project

Example: -1
eventstringRequired

(REQUIRED) ONE OF: auto, in, out, stop, cut, update, still, play, setvars, show, hide, take, takein, link, unlink, activate, deactivate

Example: auto
timestringOptional

When should this action fire? Time is specified in seconds since program launch. See command: getTime

Responses
200
successful operation
application/json
get
GET /api/command/macro HTTP/1.1
Host: 127.0.0.1:9022
Accept: */*
{
  "result": {
    "command": "macro",
    "macroEvent": "auto",
    "reply": "macro",
    "success": true
  }
}

Last updated