Skip to content

HTTP API

You can control most of the playback functions of Ontime over HTTP protocol.
This could be handy for integration with third party software, including vMix.

The following endpoints allow querying Ontime for its current state

Request

Terminal window
GET <localhost:4001>/api/version

Response

{"payload":"3.0.0"}

Request

Terminal window
GET <localhost:4001> /api/poll

Response
The response of a poll request is a runtime data object

{"payload": <runtime-data>}

With the HTTP API, in addition to controlling the application, you can also retrieve its data.
There is no expected payload for these GET requests

Address Description
GET <localhost:4001>/data/automations Get project automations
GET <localhost:4001>/data/custom-fields Get registered custom fields
GET <localhost:4001>/data/db Get currently loaded project file
GET <localhost:4001>/data/project Get current project data
GET <localhost:4001>/data/report Get current session report
GET <localhost:4001>/data/rundowns Get all rundowns in the project
GET <localhost:4001>/data/rundowns/current Get the current rundown
GET <localhost:4001>/data/session Get current session stats.
GET <localhost:4001>/data/settings Get current application settings
GET <localhost:4001>/data/url-presets Get currently defined URL Presets
GET <localhost:4001>/data/view-settings Get currently defined settings for views
Terminal window
GET <localhost:4001>/api/change/<event-id>/<property>/<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)
skip boolean
colour string (# hex colour or named css colour)
custom target the specific custom field with custom:<fieldname>
timeWarning number (in milliseconds)
timeDanger number (in milliseconds)
endAction string (none / load-next / play-next)
timerType string (count-down / count-up / clock / none)
duration number (in milliseconds)
timeStart number (in milliseconds)
timeEnd number (in milliseconds)

Request

Terminal window
GET <localhost:4001>/api/change/<my-event-id>?title=new-title

Response

{"payload":"success"}

The custom field must exist in the project to be accepted by the API.
See more on custom fields

Request

Terminal window
GET <localhost:4001>/api/change/<my-event-id>?custom:<field-name>=new-value

Response

{"payload":"success"}

You can change multiple fields in a single request by using adding on more query parameters. \

Request

Terminal window
GET <localhost:4001>/api/change/<my-event-id>?title=new-title&cue=new-cue

Response

{"payload":"success"}

The following endpoints allow controlling the messages Ontime sends to the stage timer view.
The payload response is the current state of the message data.

Example: change the secondary message text

Section titled “Example: change the secondary message text”

Request

Terminal window
GET <localhost:4001>/api/message/secondary/new text

Response

{
"payload": {
"secondary": "new text",
"timer": {
"text": "",
"visible": true,
"blink": false,
"blackout": false,
"secondarySource": null
},
}
}

Example: secondary source in the stage timer view

Section titled “Example: secondary source in the stage timer view”

Request

Show auxiliary timer as secondary field
<localhost:4001>/api/message/timer?secondarySource=aux

Request

Show secondary message as secondary field
<localhost:4001>/api/message/timer?secondarySource=secondary

Request

Hide secondary field
# Note: The secondary source can be `aux` or `secondary`, any other value will assign the property to null (ie: off)
<localhost:4001>/api/message/timer?secondarySource=off

Response

{
"payload": {
"secondary": "new text",
"timer": {
"text": "",
"visible": true,
"blink": false,
"blackout": false,
"secondarySource": "secondary"
},
}
}

You can remotely blackout every screen that is in the stage timer view.

Request

Blackout timer screen
<localhost:4001>/api/message/timer?blackout=true

Request

Disable timer screen blackout
GET <localhost:4001>/api/message/timer?blackout=false

Response

{
"payload": {
"secondary": "",
"timer": {
"text": "",
"visible": true,
"blink": true,
"blackout": false,
"secondarySource": null
},
}
}

The following endpoints allow controlling the Ontime’s playback.
The payload response is the current state of the message data

Request

Terminal window
GET <localhost:4001>/api/start

Response

{"payload":"success"}

Request

Terminal window
GET <localhost:4001>/api/start/index/<event-index>

Response

{"payload":"success"}

Request

Terminal window
GET <localhost:4001>/api/start/id/<event-id>

Response

{"payload":"success"}

Request

Terminal window
GET <localhost:4001>/api/start/cue/<event-cue>

Response

{"payload":"success"}

Request

Terminal window
GET <localhost:4001>/api/start/next

Response

{"payload":"success"}

Request

Terminal window
GET <localhost:4001>/api/start/previous

Response

{"payload":"success"}

Request

Terminal window
GET <localhost:4001>/api/pause

Response

{"payload":"success"}

Request

Terminal window
GET <localhost:4001>/api/load/index/<event-index>

Response

{"payload":"success"}

Request

Terminal window
GET <localhost:4001>/api/load/id/<event-id>

Response

{"payload":"success"}

Request

Terminal window
GET <localhost:4001>/api/load/index/<event-cue>

Response

{"payload":"success"}

Request

Terminal window
GET <localhost:4001>/api/load/next

Response

{"payload":"success"}

Request

Terminal window
GET <localhost:4001>/api/load/previous

Response

{"payload":"success"}

Request

Terminal window
GET <localhost:4001>/api/reload

Response

{"payload":"success"}

Request

Terminal window
GET <localhost:4001>/api/stop

Response

{"payload":"success"}

Request

Terminal window
GET <localhost:4001>/api/roll

Response

{"payload":"success"}

Request

Terminal window
GET <localhost:4001>/api/addtime/add/<value-in-milliseconds>

Response

{"payload":"success"}

Request

Terminal window
GET <localhost:4001>/api/addtime/remove/<value-in-milliseconds>

Response

{"payload":"success"}

Ontime provides an auxiliary timer which does not affect the current playback.
This can be controlled using the API as shown below

Request

Terminal window
GET <localhost:4001>/api/auxtimer/1/duration/<value-in-milliseconds>

Auxiliary timer can count up or count down.

Request

Terminal window
GET <localhost:4001>/api/auxtimer/1/direction/count-up

Request

Terminal window
GET <localhost:4001>/api/auxtimer/1/direction/count-down

Request

Terminal window
GET <localhost:4001>/api/auxtimer/1/start

Request

Terminal window
GET <localhost:4001>/api/auxtimer/1/pause

Request

Terminal window
GET <localhost:4001>/api/auxtimer/1/stop

Request

Terminal window
GET <localhost:4001>/api/auxtimer/1/addtime/<value-in-milliseconds>