OSC API
The OSC and WebSocket APIs allow for low latency communication to Ontime server.
Change event
Section titled “Change event”/ontime/change/<event-id>/<field> <new-value>
The change endpoint allows changing some of the properties of a given event (below).
The request should contain a patch of the event to be changed, along with the ID of the event to change.
You can change any field in an event using this endpoint. See below a description of expected values.
Property | Value type |
---|---|
title | string |
note | string |
cue | string (value should be kept under 8 characters) |
isPublic | boolean |
skip | boolean |
colour | string (# hex colour or named css colour) |
custom | target the specific custom field with custom:<fieldname> |
timeWarning | number (in seconds) |
timeDanger | number (in seconds) |
endAction | string (none / load-next / play-next / stop) |
timerType | string (count-down / count-up / time-to-end / clock / none) |
duration | number (in seconds) |
timeStart | number (in seconds) |
timeEnd | number (in seconds) |
Example: change title of event
Section titled “Example: change title of event”OSC Message
/ontime/change/<event-id>/title <new-value>
Example: change a custom field
Section titled “Example: change a custom field”The custom field must exist in the project to be accepted by the API.
See more on custom fields
OSC Message
/ontime/change/<event-id>/custom:<field-name> <new-value>
Message
Section titled “Message”The following endpoints allow controlling the messages Ontime sends to the timer view.
The payload response is the current state of the message data.
Example: change the external message text
Section titled “Example: change the external message text”OSC Message
# Note that this will set the text, however setting its visibility is a separate operation.# See below/ontime/message/external <new-text>
Example: secondary source in the timer view
Section titled “Example: secondary source in the timer view”OSC Message
/ontime/message/timer/secondarySource 'aux'
OSC Message
/ontime/message/timer/secondarySource 'external'
OSC Message
# Note: The secondary source can be `aux` or `external`, any other value will assign the property to null (ie: off)/ontime/message/timer/secondarySource 'off'
Example: blackout timer screens
Section titled “Example: blackout timer screens”You can remotely blackout every screen that is in the timer view.
OSC Message
/ontime/message/timer/blackout true
OSC Message
/ontime/message/timer/blackout false
Playback
Section titled “Playback”The following endpoints allow controlling the Ontime’s playback.
Start event
Section titled “Start event”Start loaded event
Section titled “Start loaded event”OSC Message
/ontime/start
Start event at index
Section titled “Start event at index”OSC Message
/ontime/start/index <event-index>
Start event with ID
Section titled “Start event with ID”OSC Message
/ontime/start/id <event-id>
Start event with cue
Section titled “Start event with cue”OSC Message
/ontime/start/cue <event-cue>
Start next event
Section titled “Start next event”OSC Message
/ontime/start/next
Start previous event
Section titled “Start previous event”OSC Message
/ontime/start/previous
Pause running timer
Section titled “Pause running timer”OSC Message
/ontime/pause
Load event
Section titled “Load event”Load event at index
Section titled “Load event at index”OSC Message
/ontime/load/index <event-index>
Load event with ID
Section titled “Load event with ID”OSC Message
/ontime/load/id <event-id>
Load event with cue
Section titled “Load event with cue”OSC Message
/ontime/load/cue <event-cue>
Load next event
Section titled “Load next event”OSC Message
/ontime/load/next
Load previous event
Section titled “Load previous event”OSC Message
/ontime/load/previous
Reload current event
Section titled “Reload current event”OSC Message
/ontime/reload
Stop playback
Section titled “Stop playback”OSC Message
/ontime/stop
Activate Roll mode
Section titled “Activate Roll mode”OSC Message
/ontime/roll
User added time
Section titled “User added time”Add time
Section titled “Add time”OSC Message
/ontime/addtime/add <value-in-seconds>
Remove time
Section titled “Remove time”OSC Message
/ontime/addtime/remove <value-in-seconds>
Auxiliary timer
Section titled “Auxiliary timer”Ontime provides an auxiliary timer which does not affect the current playback.
This can be controlled using the API as shown below
Set auxiliary timer duration
Section titled “Set auxiliary timer duration”OSC Message
/ontime/auxtimer/1/duration <value-in-seconds>
Set auxiliary timer direction
Section titled “Set auxiliary timer direction”Auxiliary timer can count up or count down.
Set auxiliary timer to count up
Section titled “Set auxiliary timer to count up”OSC Message
/ontime/auxtimer/1/direction count-up
Set auxiliary timer to count down
Section titled “Set auxiliary timer to count down”OSC Message
/ontime/auxtimer/1/direction count-down
Start auxiliary timer
Section titled “Start auxiliary timer”OSC Message
/ontime/auxtimer/1/start
Pause auxiliary timer
Section titled “Pause auxiliary timer”OSC Message
/ontime/auxtimer/1/pause
Stop auxiliary timer
Section titled “Stop auxiliary timer”OSC Message
/ontime/auxtimer/1/stop
Add / remove time to auxiliary timer
Section titled “Add / remove time to auxiliary timer”OSC Message
/ontime/auxtimer/1/addtime <value-in-seconds>