Introduction

TelemetryTV has Overrides.  These are essentially standalone playlist pages that can be sent by a user to supersede whatever page a playlist is currently displaying on a device. After creating an Override using the TelemetryTV website, they can be programmatically updated to start or pause by sending a request in JSON format to TelemetryTV through a simple REST API HTTPS PATCH

Authenticating

Before using the TelemetryTV API you must first acquire an API Token.  You can do so on the API Token page.  Copy the generated token for safekeeping.
The token must be sent to TelemetryTV as part of the HTTP PATCH in the Authorization header either as the username (with a blank password) using HTTP basic or following the plaintext "Token" keyword in the Authorization header.

REST API Endpoint

In order to communicate to the API you must make an HTTP PATCH with application/json as your content-type to:

https://api.telemetrytv.com/overrides/overrideID 

Where overrideID matches the ID of the Override you wish to start or stop.
The simplest way to find this ID is to go to your Overrides page on our website, highlight the desired Override, and then copy the final part of the url that displays in the address bar. (The last 24 digits, from the last '/' until the end)

Pausing and Starting Overrides

Telling an Override to start or stop programmatically requires making an HTTP PATCH with a JSON structure with a "scheduling" parameter, setting the "paused" value within the structure to either true or false

{
    "scheduling": {
        "paused": true,
        "scheduling": "Scheduled",
        "day_recurrence": "Every Day",
        "duration": 60,
        "end_at": 1531511373,
        "hour": "12:00:00",
        "period": 120,
        "period_end": "17:00:00",
        "period_start": "08:00:00",
        "start_at": 1531507773,
        "time_recurrence": "Once per Day"
    }
}

The "scheduling" struct

When sending an update to pause or play an Override, the scheduling struct should match what the existing Override is doing (apart from the "paused" field). The simplest way to ensure this is to open the details of the Override on our website, then entering them in the corresponding fields.

However, if the Override doesn't have complex scheduling and is only ever in a paused or unpaused state, you could simplify the request by passing a vastly simplified structure, as below:

{
    "scheduling": {
    "scheduling": "Immediate",
    "paused": false
    }
}

Below is an example of sending this a request to unpause an Override using cURL:

curl -u APITOKEN: 
     -d '{"scheduling":{"scheduling":"Immediate", "paused":false}}'
     -H 'Content-Type:application/json'
     -X PATCH https://api.telemetrytv.com/overrides/BOARDID
Did this answer your question?