WebSockets API
The OSC and WebSocket APIs allow for low latency communication to Ontime server.
Since the WebSocket API is used by Ontime, this cannot be configured by the user other than changing its port.
The WebSocket server is at the same IP address and port as the main application at
State
Get Ontime version
Request
Response
Get Ontime runtime state
Request
Response
The response of a poll request is a runtime data object
Change event
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) |
duration | number (in seconds) |
timeStart | number (in seconds) |
timeEnd | number (in seconds) |
Example: change title of event
Request
Response
Example: change a custom field
The custom field must exist in the project to be accepted by the API.
See more on custom fields
Request
Response
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
Request
Response
Example: secondary source in the timer view
Request
Request
Request
Response
Example: blackout timer screens
You can remotely blackout every screen that is in the timer view.
Request
Request
Response
Playback
The following endpoints allow controlling the Ontime’s playback.
The payload response is the current state of the message data
Start event
Start loaded event
Request
Start event at index
Request
Start event with ID
Request
Start event with cue
Request
Start next event
Request
Start previous event
Request
Pause running timer
Request
Load event
Load event at index
Request
Load event with ID
Request
Load event with cue
Request
Load next event
Request
Load previous event
Request
Reload current event
Request
Stop playback
Activate Roll mode
Request
User added time
Add time
Request
Remove time
Request
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
Request
Set auxiliary timer direction
Auxiliary timer can count up or count down.
Set auxiliary timer to count up
Request
Set auxiliary timer to count down
Request
Start auxiliary timer
Request
Pause auxiliary timer
Request
Stop auxiliary timer
Request