TV & Big Screen Graphics

M/IC provides dynamic data for example poll results, which can easily be fed into TV Graphics or other systems. This data is provided via the server-side Control API. If you have previously used feeds, these are still available but no longer supported. Here is the guide on Migrating private feeds to Control API

Overview

Your graphics system will need to make an HTTP request using a token, and then parse the JSON data that is returned in order to locate the poll data and display it on-screen. Instructions on getting that token are below.

M/IC's information heirarchy is Project > Event > Element, whereby Project is your application, Event is the live event, and Element is Poll, Quiz or another element from where you want to pull the data.

If you know the unique Element ID for a poll you can make this request in one go. This data can be retrieved from LViS Studio and passed from content producer to TV graphics operator for manual configuration.

However, if want to make your request more dynamic, you can provide a Project ID query the list of events in a project, then drill down into an event, and traverse all elements to identify the one you want.

However, there is a way to elect only certain polls to provide their data, and then using the "filter" attribute in the API you can retrieve a sub-selection of poll data. This is useful if your timeline is full of content that is not relevant to on-screen graphics.

Getting your access token

Access is authenticated using an oAuth 2.0 Bearer token. The Bearer token is linked to an M/IC Studio user account and can be retracted at any time by the user. The Bearer token needs to be passed along with the request in the Authorization HTTP header.

Your Bearer token is available from the API CREDENTIALS tab on the Profile Info page, accessed via the drop-down shown below:

Select Profile Info from the Account Menu

On the API CREDENTIALS tab you can generate/regenerate/revoke the token. The token provides the same level of access via the Control API as the user has via LViS Studio UI.

Fetching all published Elements
Response
Fetching all published Elements
curl -H "Content-type: application/json" -H "Authorization: Bearer Yx3_Pnrdy4A46tdvfMrKEEQuczDyAUyh" "https://environment.lvis.io/api/v2/projects/b9435779-ca90-4264-ad0b-745e22c6a9fc/events?filter[state]=current,past&include=stats"
Response
{
"data": [
{
"id": "df60a378-f9df-4e13-94d1-a2913fa368b6",
"type": "events",
"attributes": {
"name": "Event name",
"duration": 3600,
"original_duration": 3600,
"start_mode": "clock",
"repeat": false,
"repeat_in": null,
"live_stats_uuid": null,
"on_demand_duration": null,
"extra_time_duration": 0,
"start_at": 1538399247,
"start_at_iso": "2018-10-01T13:07:27Z",
"end_at": 1538402847,
"end_at_iso": "2018-10-01T14:07:27Z",
"settings": [],
"state": "past"
},
"relationships": {
"elements": {
"links": {
"related": "https://environment.lvis.io/api/v2/events/df60a378-f9df-4e13-94d1-a2913fa368b6/elements"
}
},
"pause_markers": {
"links": {
"related": "https://environment.lvis.io/api/v2/events/df60a378-f9df-4e13-94d1-a2913fa368b6/pause_markers"
}
},
"stats": {
"data": {
"id": "df60a378-f9df-4e13-94d1-a2913fa368b6",
"type": "stats"
}
},
"project": {
"data": {
"id": "b9435779-ca90-4264-ad0b-745e22c6a9fc",
"type": "projects"
}
}
},
"links": {
"self": "https://environment.lvis.io/api/v2/events/df60a378-f9df-4e13-94d1-a2913fa368b6"
}
},
],
"included": [
{
"id": "df60a378-f9df-4e13-94d1-a2913fa368b6",
"type": "stats",
"attributes": {
"interactions": 0,
"peak_concurrency": 0,
"current_concurrency": 0,
"unique_users": 0,
"average_session_length": 0,
"elements_count": 3
}
},
],
"links": {
"prev": "https://environment.lvis.io/api/v2/projects/b9435779-ca90-4264-ad0b-745e22c6a9fc/events?filter[state]=current%2Cpast&page[count]=20&page[cursor]=eyJmcm9tIjoxNTM4Mzk5MjQ3MDAwLCJvcmRlciI6InN0YXJ0X3RpbWUiLCJpZCI6IjI1IiwiZm9yd2FyZCI6ZmFsc2V9",
"next": "https://environment.lvis.io/api/v2/projects/b9435779-ca90-4264-ad0b-745e22c6a9fc/events?filter[state]=current%2Cpast&page[count]=20&page[cursor]=eyJmcm9tIjoxNTYwNDk1NzM0MDAwLCJvcmRlciI6InN0YXJ0X3RpbWUiLCJpZCI6IjQwNTEiLCJmb3J3YXJkIjp0cnVlfQ%3D%3D"
}
}

Query param "filter[state]" is required and only future, current, on_demand, past states are allowed and must be separated by comma.

The output is a JSON document adhering to the JSONAPI specification. There are also a number of existing libraries for different languages.

If you have used LViS feeds before, here is the guide Migrating private feeds to Control API