Skip to content

Server API Reference

Introduction

Ease Live Server handles authorisation, manages users and events. Our cloud based production system, Cockpit, pushes events to the event server and makes them available to the clients.

The event server is the heart of the Ease Live system, making sure all events are collected and distributed as needed.

REST API

The ELS REST API enables producer applications (e.g. data importers, producer dashboards, Vizrt, Ross, vision mixers, etc.) to implement support for publishing events to Ease Live.

Any HTTP client library can be used to access the API. For Node/browser environments, there is a client bundled with the NPM package @ease-live/ease-live-client.

Base URL

The base URL of the APIs is https://<account_id>.cloud.easelive.tv/api/v1/.

Authentication

The API uses the OAuth2 password credentials flow to authenticate users.

After obtaining an access token from the /token endpoint the token should be stored in the client application, and be sent in the Authorization header on subsequent requests. If sending headers is not supported by the client, the token can optionally be sent in an access_token value in the body of the request.

Client ID

When requesting a token from an application that should publish events to the event server a client_id must be provided to identify the type of application. This should be one of:

client_idDescription
EaseLiveEventServerTestUsed for test runs on the event server
WebProducerDashboarda producer dashboard web app
BlackmagicAtemmixer transmitter app for Blackmagic ATEM mixers
RossDashBoardOG script in Ross DashBoard
RossXPressionevent transmitter app for Ross XPression
VizrtMediaSequencerevent transmitter app for Vizrt Media Sequencer

TIP

Just use WebProducerDashboard as the client_id value. The API doesn't distinguish between these Client IDs anymore, but at the moment it is still a requirement to login.

POST /token

Authenticates the user and returns an access token that will be used to authorize the user on other requests.

On successful login the reponse will contain an access_token value. This should be stored in the client application, and be sent in the Authorization header on subsequent requests to other endpoints.

HeaderValue
Content-Typeapplication/json
KeyValueTypeRequired
grant_typepasswordstringyes
usernameThe username of the user to grant access tostringyes
passwordThe user's passwordstringyes

It is also possible to authenticate using a Sixty ID token:

KeyValueTypeRequired
grant_types_id_tokenstringyes
tokenThe Sixty ID tokenstringyes
Success response
KeyValueType
access_tokenstring containing signed JWTstring
token_typeType of the token. Will be Bearerstring
expires_inThe lifetime in seconds of the access tokeninteger
Error responses
StatusErrorDescription
400unsupported_grant_typeOnly supports password
400invalid_clientThe client is not authorized (missing client_id value)
400invalid_requestThe user could not be authenticated
401bad_credentialsInvalid username or password
429slow_downThe client sent too many requests
Example
bash
curl -H "Content-Type: application/json" \
-X POST \
-d '{"grant_type":"password","client_id":"EaseLiveEventServerTest","username":"producer","password":"password"}' \
http://localhost:4001/api/v1/token
json
{
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InByb2R1Y2VyIiwicm9sZSI6InByb2R1Y2VyIiwidXNlcklkIjoiYjYxOTIyMmEtMzIyNS00MDE0LTkyZmMtNjUyMzY0ZjAwOTQzIiwiaWF0IjoxNDc4Njk5Nzc1LCJleHAiOjE0Nzg3ODYxNzV9.oSnoqh4nhfvNjsGiIMosbUnCG_ttyImbFYrKbtC_-cA",
  "token_type": "Bearer",
  "expires_in": 86400
}

Programs

POST /programs

Create a new program.

HeaderValue
AuthorizationBearer $ACCESS_TOKEN
Content-Typeapplication/json
KeyValueTypeRequired
idID of the programstringyes
nameName of the programstringyes
scheduledStartTimeStart timedateno
scheduledEndTimeEnd timedateno

GET /programs/:id

Get a program.

HeaderValue
AuthorizationBearer $ACCESS_TOKEN
Content-Typeapplication/json
KeyValueTypeRequired
idID of the programstringyes

GET /programs/:id/lastUpdate

Get the last event update timestamp for the program.

PUT /programs/:id

Update program.

HeaderValue
AuthorizationBearer $ACCESS_TOKEN
Content-Typeapplication/json
KeyValueTypeRequired
idID of the programstringyes
nameName of the programstringyes
scheduledStartTimeStart timedateyes
scheduledEndTimeEnd timedateyes

DELETE /programs/:id

Delete a program. Note that this will also delete any events created in this program.

HeaderValue
AuthorizationBearer $ACCESS_TOKEN
Content-Typeapplication/json
KeyValueTypeRequired
idID of the programstringyes

GET /programs

Get a list of programs that the logged in producer can publish events to. To find expired/old programs, use the GET /programs/filter endpoint.

HeaderValue
AuthorizationBearer $ACCESS_TOKEN
Content-Typeapplication/json
Success response
KeyValueType
[0].idID of the program in the databasestring
[0].createdTimeThe ISO 8601 datetime the program was stored to the databasestring
[0].nameThe title of the programstring
[0].scheduledStartTimeThe time the program is scheduled to startstring
[0].scheduledEndTimeThe time the program is scheduled to endstring
Error responses
StatusErrorDescription
401invalid_tokenThe token is missing or expired. Client should request a new token
403insufficient_scopeThe token doesn't have publishing access
400invalid_requestSome parameter is missing or has invalid value
Example
bash
curl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InByb2R1Y2VyIiwicm9sZSI6InByb2R1Y2VyIiwidXNlcklkIjoiYjYxOTIyMmEtMzIyNS00MDE0LTkyZmMtNjUyMzY0ZjAwOTQzIiwiaWF0IjoxNDc4Njk5Nzc1LCJleHAiOjE0Nzg3ODYxNzV9.oSnoqh4nhfvNjsGiIMosbUnCG_ttyImbFYrKbtC_-cA" \
http://localhost:4001/api/v1/programs
json
[
  {
    "createdTime": "2016-11-09T15:37:23.817Z",
    "id": "dd4d5f3e-5723-4587-b1d4-c24",
    "name": "FC Bayern M\u00fcnchen - Real Madrid CF",
    "scheduledEndTime": "2016-11-09T19:30:00.000Z",
    "scheduledStartTime": "2016-11-09T17:00:00.000Z"
  },
  {
    "createdTime": "2016-11-09T15:39:12.611Z",
    "id": "ac4aab4e-4523-9842-a3d4-a12",
    "name": "Brann - Rosenborg",
    "scheduledEndTime": "2016-11-09T21:30:00.000Z",
    "scheduledStartTime": "2016-11-09T19:45:00.000Z"
  }
]

GET /programs/filter

Search/filter programs. Note that like /programs, this endpoint only returns programs that the logged in user has publish access to.

HeaderValue
AuthorizationBearer $ACCESS_TOKEN
Content-Typeapplication/json
KeyValueTypeRequired
orderno
sortno
limitno
skipno
searchno
statusno
projectIdFilter programs by project. Set to 'undefiend' to find programs without projectsno
fromdateno
todateno
liveFind programs by live status (based on scheduled start/end time).booleanno
idsno

Events

Methods for publishing change in the state of the on-air graphics or data that should be propagated to Ease Live clients connected to the program on which the event was published. For example if the producer shows a lower third with information about a player, an event Player#show should be posted, and when he hides it Player#hide. Events can also be used to update data on the clients without triggering a change of visibility of a component, for example a LeagueTable#update event.

GET /programs/:id/events

Get all program events for a given program. If the to parameter is included, a cache header will be applied.

HeaderValue
AuthorizationBearer $ACCESS_TOKEN
Content-Typeapplication/json
KeyValueTypeRequired
fromprogram events with timecode greater than or equal to this valueintegerno
toprogram events with timecode less than or equal to this valueintegerno
includeCreatedcan be used in combination with from/to to consider event creation time in addition to just the timecodebooleanno

GET /programs/:id/events/filter

Search/filter program events.

HeaderValue
AuthorizationBearer $ACCESS_TOKEN
Content-Typeapplication/json
KeyValueTypeRequired
orderno
sortno
limitno
skipno
searchno
statusno
idsno

DELETE /programs/:id/events

Delete all program events for a given program.

HeaderValue
AuthorizationBearer $ACCESS_TOKEN
Content-Typeapplication/json
Success response
KeyValueType
deletedNumber of events deletedinteger

DELETE /programs/:id/events/:eventId

GET /programs/:id/events/:eventId

PUT /programs/:id/events/:eventId

POST /programs/:id/events

Create new events. The events will be pushed to all clients connected to the program. It is also possible to create a batch of events at once by using the events option.

HeaderValue
AuthorizationBearer $ACCESS_TOKEN
Content-Typeapplication/json
KeyValueTypeRequired
eventslist of events, when using batch createarrayno
eventevent name in format Component#actionstringyes
timestampwhen the event occured in milliseconds since 1970-01-01T00:00:00Z. if left out, it will be set to current server timeintegerno
metadataextra data for the eventobjectno
Success response
KeyValueType
idID of the event in the databasestring
programIdID of the program that was published tostring
createdTimeThe ISO 8601 datetime the event was stored to the databasestring
timestampwhen the event occuredinteger
eventevent namestring
metadataextra data for the eventobject
Error responses
StatusErrorDescription
401invalid_tokenThe token is missing or expired. Client should request a new token
403insufficient_scopeThe token doesn't have publishing access
400invalid_requestSome parameter is missing or has invalid value
Example
bash
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InByb2R1Y2VyIiwicm9sZSI6InByb2R1Y2VyIiwidXNlcklkIjoiYjYxOTIyMmEtMzIyNS00MDE0LTkyZmMtNjUyMzY0ZjAwOTQzIiwiaWF0IjoxNDc4Njk5Nzc1LCJleHAiOjE0Nzg3ODYxNzV9.oSnoqh4nhfvNjsGiIMosbUnCG_ttyImbFYrKbtC_-cA" \
-d '{"event":"ScoreBug#show","timestamp":1478106472323,"metadata":{"home":1,"away":3}}' \
http://localhost:4001/api/v1/programs/dd4d5f3e-5723-4587-b1d4-c24/events
json
{
  "event": "ScoreBug#show",
  "timestamp": 1478106472323,
  "metadata": {
    "away": 3,
    "home": 0
  },
  "programId": "dd4d5f3e-5723-4587-b1d4-c24",
  "createdTime": "2016-11-08T10:04:05.995Z",
  "id": "88c26ebc-4f2d-41b2-bbc9-15e4537079d9"
}

POST /programs/:id/events/import

Batch import of program events, mainly for use with non-live programs. Imported events will not be pushed to clients unless they reconnect.

NOTE: This will delete any existing events in the program. For pushing multiple events without deleting, use the regular POST /programs/:id/events endpoint.

HeaderValue
AuthorizationBearer $ACCESS_TOKEN
Content-Typeapplication/json
KeyValueTypeRequired
programIdID of the program to published tostring
eventsarray of event objectsarrayyes

GET /programs/:id/events/export

Projects

GET /projects

POST /projects

GET /projects/:id

PUT /projects/:id

DELETE /projects/:id

GET /projects/:id/users

GET /projects/:id/programs

Application revisions

An application revision has the following properties:

  • id
  • projectId
  • title
  • description
  • version
  • status (published, draft)
  • content (json object)
  • createdBy
  • updatedBy
  • createdTime
  • updatedTime
GET /projects/:id/application

Returns latest application revision with published status (shortcut for /status/published)

GET /projects/:id/application/status/:status

Returns latest application revision with given status

GET /projects/:id/application/version/latest

Returns latest published version, or falls back to latest draft version.

GET /projects/:id/application/version/:version

Returns application revision by version (either version ID or string).

GET /projects/:id/application/live/:version

Returns an end-user revision by version (either version ID or string). This is used by end-users and is stripped of sensitive data such as credentials not needed for mass consumption.

GET /projects/:id/application/revisions(?status=draft/publish)

List all revisions, optionally filtered

POST /projects/:id/application/revisions

Create new revision

GET /projects/:id/application/revisions/:id

Get a specific revision by ID

PUT /projects/:id/application/revisions/:id

Update revision

PATCH /projects/:id/application/revisions/:id

Patch revision. Patch can be supplied using either the JSON Patch or JSON Merge Patch standards.

POST /projects/:id/revisions

Create new revision

Application proxy requests

Proxy requests an API data source setup in Studio, instead of executing the request in the browser. If any headers, query params or body params are missing, the defaults in the data source will be used.

Supports the request methods below:

GET /projects/:id/application/requests/:version/:dataSourceId
POST /projects/:id/application/requests/:version/:dataSourceId
PUT /projects/:id/application/requests/:version/:dataSourceId
DELETE /projects/:id/application/requests/:version/:dataSourceId

Project storage

It is possible to store any JSON payload in a project scope. The value will be non-guaranteed persisted in the cache layer, but the GET HTTP request to retrieve the value will be cached for 24h. This is useful for sharing information between clients in a live setting.

GET /storage/:projectId/:itemId
Success response
KeyValueType
idUUIDstring
metadataJSON data structureobject
createdTimeThe ISO 8601 datetime the metadata was storedstring

Example response:

json
{
  "id": "k3M2ChfEcs4vYz5GsyH6jG",
  "metadata": {
    "myProperty": "myValue"
  },
  "createdTime": "2021-09-08T10:04:05.995Z",
}
POST /storage/projectId

If you don't specify an id, the API will create it for you.

HeaderValue
Content-Typeapplication/json
KeyValueTypeRequired
idID of the value so you can retrieve itstringno
metadatajson objectobjectyes
Success response
KeyValueType
idUUIDstring
metadataJSON data structureobject
createdTimeThe ISO 8601 datetime the metadata was storedstring

Example response:

json
{
  "id": "k3M2ChfEcs4vYz5GsyH6jG",
  "metadata": {
    "myProperty": "myValue"
  },
  "createdTime": "2021-09-08T10:04:05.995Z",
}

Project analytics

* /api/v1/projects/:projectId/analytics

Matomo proxy for fetching reports. Limited to the project's idSite

GET /api/v1/projects/:projectId/analytics/site

Verify the Matomo config, to ensure it has a Matomo site with the correct dimensions and reports. If there is an existing site, but it has issues that can't be automatically solved by PUT (or POST in the case of 'not-created'), it returns { status: 'errors' }.

Success response
KeyValueType
status'ok' / 'incomplete' / 'errors' / 'not-created'string
messageA more detailed reason for the returned statusstring
idSiteThe ID of the project's Matomo sitestring
siteThe full Matomo metadata for the siteobject
dimensionsAll the site's custom dimensions as returned by Matomoarray
dimensionIdsDimension ID's mapped to camelCase keys of their names, split into { visit, action }object
reportsThe site's custom reportsarray
reportIdsCustom report ID's mapped to camelCase keys of their namesobject
badReportsAny reports that are incorrectly configuredarray
missingReportsAny reports that are missingarray
proxyHasAccessWhether SixtyReadOnly has 'view' accessboolean
Error responses
StatusErrorDescription
404Not foundThe site ID in the metadata does not exist
500Any other error returned by Matomo
POST /api/v1/projects/:projectId/analytics/site

Create a new Matomo site from scratch, fully configured with dimensions and reports. It will:

  1. Create a new Matomo site
  2. Add our custom dimensions
  3. Add our custom reports
  4. Write the Matomo ID to the project's metadata
  5. Write the custom dimension ID's to the project's metadata
  6. Give the SixtyReadOnly user 'view' access to the new site
Success response

POST returns the same status response as GET when successful.

Error responses
StatusErrorDescription
500Already existsThe project already has a Matomo ID. Verify it with GET, and finish setup with PUT if incomplete.
500Any other error returned by Matomo
PUT /api/v1/projects/:projectId/analytics/site

Finish the setup of an existing site (only works if the project metadata contains a Matomo ID, and as long as GET doesn't return { status: 'errors' }). It will:

  1. Add our custom dimensions if they don't exist
  2. Add any missing custom reports
  3. Update the project's metadata with the site and dimension ID's
  4. Give the SixtyReadOnly user 'view' access to the site
Success response

PUT returns the same status response as GET when successful.

Error responses
StatusErrorDescription
404Not foundThe site ID in the metadata does not exist
500Bad configThere are problems with the config. Call GET for details.
500Any other error returned by Matomo

Users

GET /users/me

GET /users

POST /users

Create user.

HeaderValue
AuthorizationBearer $ACCESS_TOKEN
Content-Typeapplication/json
KeyValueTypeRequired
roleUser role (one of admin/producer/user/client)stringyes
usernamestringyes
passwordstringyes
namestringno
emailstringno

GET /users/:id

PUT /users/:id

DELETE /users/:id

GET /users/roles

Returns an array of strings with role names, e.g.:

[
    "admin",
    "producer",
    "client",
    "user"
]

Statistics

GET /statistics/dashboard

GET /statistics/filtered

Status

Methods for informing the server about the status of the client and getting the status of the server from the client.

GET /version

Returns information about version, buld number, and build date.

POST /ping

Let the server know that the client is still online. Recommended to call on an interval of 1 minute when no events are being sent.

HeaderValue
AuthorizationBearer $ACCESS_TOKEN
Content-Typeapplication/json
Success response
KeyValueType
current_timeThe current time on the serverinteger
Error responses
StatusErrorDescription
401invalid_tokenThe token is missing or expired. Client should request a new token
400invalid_requestSome parameter is missing or has invalid value
Example
bash
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InByb2R1Y2VyIiwicm9sZSI6InByb2R1Y2VyIiwidXNlcklkIjoiYjYxOTIyMmEtMzIyNS00MDE0LTkyZmMtNjUyMzY0ZjAwOTQzIiwiZXZlbnRQdWJsaXNoZXJJZCI6IjU1ZjcyYzA2LTkwODQtNGIzOC04NTcxLWJkMjlmOGY0ZDAwYSIsImV2ZW50UHVibGlzaGVyTmFtZSI6IkVhc2UgTGl2ZSBFdmVudCBTZXJ2ZXIgVGVzdCIsImlhdCI6MTQ3ODUzODYzNiwiZXhwIjoxNDc4NjI1MDM2fQ.-Cr-D99d8ziRBcADuWWSsjY35YUE1GcHKqMBGHBxBik" \
http://localhost:4001/api/v1/ping

POST /servertime

Gets the current time on the server. If the client can not be synced with NTP, and assuming the server is synced with NTP, this can be used in the client to calculate a more accurate timestamp for events sent by the client.

KeyValueTypeRequired
requestTimetime on the client when the request was sent, in milliseconds since 1970-01-01T00:00:00Zintegerno
Success response
KeyValueType
serverTimeThe current time on the server, in milliseconds since 1970-01-01T00:00:00Zinteger
requestTimeThe argument for the requestTime parameter, if availableinteger
Example
bash
curl -X POST \
-H "Content-Type: application/json" \
-d '{"requestTime":1478600537319}' \
http://localhost:4001/api/v1/servertime

WS API

admin/getLivePrograms

Returns a list of active programs. Only available if the statistics module is enabled.

admin/createProgram

Same as POST /programs.

admin/deleteProgram

Same as DELETE /programs/:id.

updateProgram

Same as PUT /programs/:id.

Previously: admin/updateProgram. This alias will be removed in a future major release.

deleteAllProgramEvents

Same as DELETE /programs/:id/events.

Previously: admin/deleteAllProgramEvents. This alias will be removed in a future major release.

getProducerPrograms

Same as GET /programs.

getProgram

Same as GET /programs/:id.

getProgramEvents

Same as GET /programs/:id/events.

Previously: admin/getProgramEvents. This alias will be removed in a future major release.

importProgramEvents

Import events. Same as POST /programs/:programId/events/import.

login

Authenticate user. Same as POST /token.

producer

Publish events. Same as POST /programs/:id/events.

servertime

Same as POST /servertime.

subscribe

Subscribe to program/channel.

unsubscribe

Unsubscribe from program/channel.