Customer Sign In

upLynk

Integration APIs: Live Events

Overview

The live event APIs can be used for basic information retrieval about upcoming live events for your upLynk account and to modify those events.

/api2/liveevents2/list

Returns a list of of LiveEvent2 objects determined by the search criteria

Request Parameters
limit integer (optional) Cap the number of items returned, maximum of 100 items.
skip integer (optional) Skip the first N results. The skip and limit parameters can be used together for paginated results.
start integer (optional) The beginning of a time range to search in UTC milliseconds since the epoch. The system will search for events that are scheduled to begin during the specified time range based on the event's expected_start field.
stop integer (optional*) Only valid if start is also included. Marks the end of a time range to search in UTC milliseconds since the epoch. If start is included but stop is omitted, it will default to start + 8 hours.
order string (optional) Sort the results by the given field. Supported fields include: desc, created, lastmod, expected_start, external_id, and operator. Prefix the sort field with a minus sign for descending order (e.g. order='-desc' to retrieve values in reverse alphabetical order)
fields string (optional) Comma-separated list of fields to return in the event object in the events array.

* stop is only valid if start is also included.

Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Find all events that are scheduled to start on 4 May 2013 ordered by their expected_start time
Call(
    '/api2/liveevents2/list', 
    start=1367625600000, 
    stop=1367711999000, 
    order='expected_start', 
    fields='id,expected_start,require_drm,desc'
)

{
  "events": [
    {
      "id": "0ba5fb90b3144c06be19645b9efa07eb",
      "expected_start": 1462356000000,
      "require_drm": true,
      "desc": "Concert of the Year"
    },
    {
      "id": "e0139ec1bd11468f91f0645f07bf875a",
      "expected_start": 1462379400000,
      "require_drm": false,
      "desc": "Concert Afterparty"
    }
  ],
  "error": 0
}

            

/api2/liveevents2/get

Retrieves one or more specific live event(s) from your account.

Request parameters
id string (optional) The live event’s ID
external_id string (optional) The live event’s external ID
ids string (optional) Comma-separated list of live event IDs to be returned as a list of live events
external_ids string (optional) Comma-separated list of live event external IDs to be returned as a list of live events
fields string (optional) Comma-separated list of fields to return in the event object in the events array.

* One of id, external_id, ids, external_ids must be specified.

Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Call('/api2/liveevents2/get', external_id='id1234')

{
    "events": [
      {
        "desc": "Really Awesome Live Event",
        "pre_slate": null,
        "ad_slate": null,
        "ad_pods": [],
        "post_slate": null,
        "meta": {},
        "log": [
            {
                "username": "richard.roe@example.com",
                "user_id": "060aedf2f12c4d4fba4cd573befc973a",
                "timestamp": 1463781985360,
                "event": "Event Created"
            },
            {
                "timestamp": 1463782375482,
                "event": "Switched to slicer example_slicer_01"
            }
        ],
        "operator": "7e23d7b5d0ea461181d302396a6fd70d",
        "id": "004870dc7e8044728dbf0ec9c97d0564",
        "expected_start_lastmod": null,
        "testing_complete": null,
        "deleted": 0,
        "vod_duration": 0,
        "state": "pre",
        "embed_domains": null,
        "embed_id": "2au2v3okikxpav6cb89pfV",
        "testing_start": null,
        "vod_replayable": false,
        "require_drm": true,
        "external_id": "id1234",
        "actual_start": null,
        "actual_stop": null,
        "expected_start": null,
        "expected_stop": null,
        "conflicts": [
            {
                "owner": "f4e3035377f84a31953f475971f5544f",
                "id": "3824837c5ccc4827a890c74aa86372a6"
            },
            {
                "owner": "040aedf2f12c4d4fba4cd573befc973a",
                "id": "566f73c8fd9a4528b4864413c512ccc8"
            }
        ],
        "slicers": [
            {
                "id": "example_slicer_01",
                "owner": "f4e3035377f84a31953f475971f5544f"
            },
            {
                "id": "example_slicer_02",
                "owner": "7e23d7b5d0ea461181d302396a6fd70d"
            },
        ],
        "autoexpire_hours": null,
        "vod_autoexpire_hours": null
      }
  ],
  "error": 0
}

/api2/liveevents2/create

Creates a new live event in your account.

Request parameters
auto_start_stopbool(optional) Specify true to allow the event to auto start/stop at the start/stop times set for the event. Default=false
autoexpire_hoursint(optional) The number of hours after an event's final vod asset is ready that the event's other assets will be deleted. A zero indicates the assets will remain indefinitely. When null, the account's settings are used. Default=null
vod_autoexpire_hoursint(optional) The number of hours after an event's final vod asset is ready that the final vod asset will be deleted. A zero indicates the asset will remain indefinitely. When null, the account's settings are used. Default=null
descstring(optional) A description of the live event
external_idstring(optional*) A new external_id for the asset. Note: if you retrieved the asset by external ID, you cannot also update the external ID at the same time.
embed_domainsstring(optional) Comma seperated list of domain patterns used to restrict embedded players access. For example: 'somedomain.com,*.yourdomain.com'
expected_startint(optional) Timestamp (number of milliseconds since midnight on January 1, 1970) of when the event is expected to start.
expected_stopint(optional) Timestamp (number of milliseconds since midnight on January 1, 1970) of when the event is expected to stop.
metastring(optional) The metadata to set on the event. This must be a dictionary in JSON format. If the event has existing meta, any new meta will be merged. To clear all metadata, set to '{}'.
operatorstring(optional) The ID of the user who is authorized to operate live events in the dashboard on behalf of the owner account.
post_slatestring(optional) Asset ID to loop after the event is completed.
pre_slatestring(optional) Asset ID to loop in pre-event mode.
require_drmbool(optional) Specify false to disable required tokens. Default=true
slicers string (optional) Set the slicer IDs available for use during this event. The list should be in the format:

[
    {"id": <the slicer ID>, "owner": <guid of the owner for this slicer>},
    {"id": <another slicer ID>, "owner": <guid of this slicer's owner>}
]
statestring(optional) The current state of the event. (pre,post,slate,slicing) Default=pre
vod_replayablebool(optional) If true, the event be a replayable as On Demand video after the event is over. Default=false
mid_slate_librarystring(optional) ID of the library to be used for mid slate selection. Defaults to the account mid slate library when not set.

* Either id or external_id must be specified.

Response
(Same as for liveevents2/get)
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Call('/api2/liveevents2/create', desc='Really Awesome Live Event')

{
    "event": {
        "desc": "Really Awesome Live Event",
        "pre_slate": null,
        "ad_slate": null,
        "ad_pods": [],
        "post_slate": null,
        "meta": {},
        "log": [
            "username": "richard.roe@example.com",
            "user_id": "060aedf2f12c4d4fba4cd573befc973a",
            "timestamp": 1463781985360,
            "event": "Event Created"
        ]
        "operator": "7e23d7b5d0ea461181d302396a6fd70d",
        "id": "004870dc7e8044728dbf0ec9c97d0564",
        "expected_start_lastmod": null,
        "testing_complete": null,
        "deleted": 0,
        "vod_duration": 0,
        "mid_slate_library": null,
        "state": "pre",
        "embed_domains": null,
        "embed_id": "2au2v3okikxpav6cb89pfV",
        "testing_start": null,
        "vod_replayable": false,
        "require_drm": true,
        "external_id": "id1234",
        "actual_start": null,
        "actual_stop": null,
        "expected_start": null,
        "expected_stop": null,
        "conflicts": [
            {
                "owner": "f4e3035377f84a31953f475971f5544f",
                "id": "3824837c5ccc4827a890c74aa86372a6"
            },
            {
                "owner": "040aedf2f12c4d4fba4cd573befc973a",
                "id": "566f73c8fd9a4528b4864413c512ccc8"
            }
        ],
        "auto_start_stop": false,
        "slicers": [
            {
                "id": "example_slicer_01",
                "owner": "f4e3035377f84a31953f475971f5544f"
            },
            {
                "id": "example_slicer_02",
                "owner": "7e23d7b5d0ea461181d302396a6fd70d"
            },
        ],
        "autoexpire_hours": null,
        "vod_autoexpire_hours": null
    },
    "error": 0
}

/api2/liveevents2/update

Modifies a live event in your account.

Request parameters
auto_start_stopbool(optional) Specify true to allow the event to auto start/stop at the start/stop times set for the event. Default=false
ad_podslist(optional) A list of dictionaries in JSON format. Required fileds include: name (string), duration (int), and metas (dict). Example: [{ "name": "Ad Pod 1", "duration": 150, metas: { "key": "value", ... } }]. Default=[]
autoexpire_hoursint(optional) The number of hours after an event's final vod asset is ready that the event's other assets will be deleted. A zero indicates the assets will remain indefinitely. When null, the account's settings are used. Default=null
vod_autoexpire_hoursint(optional) The number of hours after an event's final vod asset is ready that the final vod asset will be deleted. A zero indicates the asset will remain indefinitely. When null, the account's settings are used. Default=null
descstring(optional) A description of the live event
external_idstring(optional*) A new external_id for the asset. Note: if you retrieved the asset by external ID, you cannot also update the external ID at the same time.
embed_domainsstring(optional) Comma seperated list of domain patterns used to restrict embedded players access. For example: 'somedomain.com,*.yourdomain.com'
expected_startint(optional) Timestamp (number of milliseconds since midnight on January 1, 1970) of when the event is expected to start.
expected_stopint(optional) Timestamp (number of milliseconds since midnight on January 1, 1970) of when the event is expected to stop.
metadict(optional) The metadata to set on the event. This must be a dictionary in JSON format. If the event has existing meta, any new meta will be merged. To clear all metadata, set to '{}'.
operatorstring(optional) The ID of the user who is authorized to operate live events in the dashboard on behalf of the owner account.
post_slatestring(optional) Asset ID to loop after the event is completed.
pre_slatestring(optional) Asset ID to loop in pre-event mode.
require_drmbool(optional) Specify false to disable required tokens. Default=true
slicersstring(optional) Set the slicer IDs available for use during this event.
statestring(optional) The current state of the event. (pre,post,slate,slicing) Default=pre
vod_replayablebool(optional) If true, the event be a replayable as On Demand video after the event is over. Default=false
mid_slate_librarystring(optional) ID of the library to be used for mid slate selection. Defaults to the account mid slate library when not set.

* Either id or external_id must be specified.

Response
(Same as for liveevents2/get)
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Call('/api2/liveevents2/update', id='004870dc7e8044728dbf0ec9c97d0564', desc='New Desc')

{
    "event": {
        "desc": "New Desc",
        "pre_slate": null,
        "ad_slate": null,
        "ad_pods": [],
        "post_slate": null,
        "meta": {},
        "log": [
            {
                "username": "richard.roe@example.com",
                "user_id": "060aedf2f12c4d4fba4cd573befc973a",
                "timestamp": 1463781985360,
                "event": "Event Created"
            },
            {
                "timestamp": 1463782375482,
                "event": "Switched to slicer example_slicer_01"
            }
        ],
        "operator": "7e23d7b5d0ea461181d302396a6fd70d",
        "id": "004870dc7e8044728dbf0ec9c97d0564",
        "expected_start_lastmod": null,
        "testing_complete": null,
        "deleted": 0,
        "vod_duration": 0,
        "mid_slate_library": null,
        "state": "pre",
        "embed_domains": null,
        "embed_id": "2au2v3okikxpav6cb89pfV",
        "testing_start": null,
        "vod_replayable": false,
        "require_drm": true,
        "external_id": "id1234",
        "actual_start": null,
        "actual_stop": null,
        "expected_start": null,
        "expected_stop": null,
        "conflicts": [
            {
                "owner": "f4e3035377f84a31953f475971f5544f",
                "id": "3824837c5ccc4827a890c74aa86372a6"
            },
            {
                "owner": "040aedf2f12c4d4fba4cd573befc973a",
                "id": "566f73c8fd9a4528b4864413c512ccc8"
            }
        ],
        "auto_start_stop": false,
        "slicers": [
            {
                "id": "example_slicer_01",
                "owner": "f4e3035377f84a31953f475971f5544f"
            },
            {
                "id": "example_slicer_02",
                "owner": "7e23d7b5d0ea461181d302396a6fd70d"
            },
        ],
        "autoexpire_hours": null,
        "vod_autoexpire_hours": null,
    },
    "error": 0
}

Note that external IDs are opaque values to the upLynk system so it is up to you to use a convention that ensures uniqueness within your content library. If you assign the same external ID to multiple assets, the system will choose one arbitrarily when you try to access the asset by its external ID.

/api2/liveevents2/delete

Deletes one or more live events from your account.

Request parameters
idstring(optional*) the live event’s ID
external_idstring(optional*) the live event’s external ID
idslist(optional*) A list of IDs of live events to be deleted.
external_idslist(optional*) A list of external IDs of live events to be deleted.

* One of id, external_id, ids, external_ids must be specified.

Response parameters
deletedlistA list of live events that were deleted. Each item in the list contains id and external_id members.
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
Call('/api2/liveevents2/delete', external_ids=['event10115', 'challenge_s01e03'])

{
    "deleted": [
        {
            "external_id": "challenge_s01e03",
            "id": "54e40044a5f84050a483a5ce91cedab1"
        },
        {
            "external_id": "event10115",
            "id": "9c4e00aab263489aa7fd275a0c5cc478"
        }
    ],
    "error": 0
}

/api2/liveevents2/operator/list

Gets the list of other accounts who are authorized to operate live events in the dashboard on behalf of this account. This list will be composed of people who've been granted the "Write" or the "Assigned" permission in the CMS's settings (gear tab) > Account Access Settings page.

Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
Call('/api2/liveevents2/operator/list')

{
  "owners": [
    {
      "id": "f4e3035377f84a31953f475971f5544f",
      "username": "john.doe@example.com"
    },
    {
      "id": "7e23d7b5d0ea461181d302396a6fd70d",
      "username": "richard.roe@example.com"
    }
  ],
  "error": 0
}
            

/api2/liveevents2/slate/list

Gets the list of slates which have been designated as slate by putting them in a library, and specifying that library as a pre-, post-, or mid-event slate library in the CMS's settings (gear tab) > Slate > Live Event Slates section.

Request parameters
slate_typestringThe slate type that you are requesting (pre, mid, post, missing_content, ad).
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Call('/api2/liveevents2/slate/list')
{
   "desc":"Pre Event Slate",
   "cms_session_fingerprint":"cd610c433836d1cdbae4d8c43bf7abcb5d37055e",
   "id":"2fe75892123a436685aa3739c19fa9d3",
   "assets":[
      {
         "orig_filename":null,
         "ttml_url":"",
         "lastmod":1461011640977,
         "require_drm":0,
         "created":1458256110985,
         "mp4_url":"",
         "autoexpire":0,
         "slices":0,
         "job_type":"vod",
         "test_players":[
            {
               "url":"http://content.uplynk.dev:8000/player/5KaAUVMlh2KnYsR3893R0Esa.html",
               "expire":null,
               "params":"",
               "id":"5KaAUVMlh2KnYsR3893R0E",
               "desc":"5KaAUVMlh2KnYsR3893R0E"
            }
         ],
         "libraries":[
            {
               "id":"2fe75892123a436685aa3739c19fa9d3",
               "desc":"Pre Event Slate"
            }
         ],
         "test_player_url":"http://content.uplynk.dev:8000/player/5KaAUVMlh2KnYsR3893R0Esa.html",
         "state":"ready",
         "rays":7,
         "poster_url":"https://stg-ec-ore-u.uplynk.com/slices/05d/95cf96f52a8c42dbb8601c3e6103a8e5/05d9eba80aa5419e89363250cc972bdb/00000000.jpg",
         "duration":3.970625,
         "embed_player_url":"https://content.uplynk.dev:8000/player/7fRj7sjUJdxjhA4ZER23mCea.html",
         "external_id":"",
         "id":"05d9eba80aa5419e89363250cc972bdb",
         "thumb_url":"https://stg-ec-ore-u.uplynk.com/slices/05d/95cf96f52a8c42dbb8601c3e6103a8e5/05d9eba80aa5419e89363250cc972bdb/00000000.jpg",
         "desc":"Pre Slate"
      }
   ]
}