Overview
LVS Playlists enable an application to compile and save a fixed sequence of video clips that can be requested using a playlist ID and automatically assembled.
The building block of an LVS Playlist is an Element, which represents a timecode range (offset & duration) for a specific asset. A single Element can contain an optional name (e.g. "John Paxon's game-winning 3pt shot") and tags (e.g. "playoffs", "3pt"), and can be reused across multiple Playlists.
Creating a playlist involves placing multiple Elements in a sequence and giving the Playlist a name (e.g. "Chicago Bulls' 25 Greatest Moments").
In addition to the endpoints for building Playlists, there are endpoints for generating lists of Playlists and Elements for use in content management workflows or end-user facing interfaces (e.g. a list of sports highlight reels, lecture highlights for a particular course, etc.).
Element Operations API Endpoints
Create an Element for a specific Asset
POST /v3/element - Click here for this endpoint's full API specs and testing tool (LVS login required)
Purpose
Use this endpoint to define a reusable Element from a timecode range of a specific asset.
Example
POST https://api.lvs.linius.com/v3/element
Request Body:
{ "assetId": 1016426, "duration": 22, "name": "My Element", "offset": 10.5, "tags": [ "tag1", "tag2", "tag3" ], "thumbnailUrl": "\"https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Big_buck_bunny_poster_big.jpg/800px-Big_buck_bunny_poster_big.jpg" } |
Response Body:
{ "id": 1018131, "name": "My Element", "asset": { "id": "1016426", "name": "Destination Earth", "duration": 819.688, "tags": [ "public domain", "test" ], "thumbnailUrl": "https://api.lvs.linius.com/v2/assembly/thumbnail/1016426.jpg", "activated": true, "representations": [ { "id": "17918410", "format": "MP4", "sourceUrl": "https://s3-eu-west-2.amazonaws.com/samples.cdn.linius.com/LVS-samples/Destination_Earth.mp4", "sourceIdentifier": "HTTP", "meta": { "width": 640, "height": 478 }, "duration": 819688, "created": "2022-05-11T01:39:21.645+0000", "secure": false } ], "created": "2022-05-11T01:39:21.128+0000" }, "offset": 10.5, "duration": 22, "tags": [ "tag1", "tag2", "tag3" ], "thumbnailUrl": "\"https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Big_buck_bunny_poster_big.jpg/800px-Big_buck_bunny_poster_big.jpg" } |
Update Element for Asset
PUT /v3/element/{elementId} - Click here for this endpoint's full API specs and testing tool (LVS login required)
Purpose
Use this endpoint to modify an existing Element (e.g. change source asset, change start and end times, rename, re-tag).
Example
Response Body:
PUT https://api.lvs.linius.com/v3/element/64
Request Body:
{ "assetId": "113", "duration": 25, "name": "Test Element 2", "offset": 22.5, "tags": [ "tagTest1", "tagTest2" ], "thumbnailUrl": "https://images-na.ssl-images-amazon.com/images/I/51YmOkDNssL._SX342_.jpg"} Response Body: { "id": 64, "name": "Test Frame 2", "asset": { "id": 113, "name": "Big Buck Bunny Demo03", "duration": 596.5216666666666, "tags": [ "bunny003", "test003" ], "thumbnailUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/big_buck_bunny_poster_big.jpg/800px-big_buck_bunny_poster_big.jpg", "trackMeta": [ { "height": 720, "width": 1280, "type": "VIDEO" }, { "height": 0, "width": 0, "type": "AUDIO" } ], "meta": { "width": 1280, "height": 720 } }, "offset": 22.5, "duration": 25, "tags": [ "tagtest2", "tagtest1" ],"thumbnailUrl": "https://images-na.ssl-images-amazon.com/images/I/51YmOkDNssL._SX342_.jpg" |
Delete a specific Element
DELETE /assembly/element/{elementId} - Click here for this endpoint's full API specs and testing tool (LVS login required)
Purpose
Permanently delete an Element by specifying an Element ID.
- Need to re-test what happens if you delete an element that is being used by one or more playlists.
Example DELETE https://api.lvs.linius.com/v3/element/1018131
Get List with details for all existing Elements
GET /assembly/element?page=x&size=y&text=z&tags=w - Click here for this endpoint's full API specs and testing tool (LVS login required)
Purpose:
This endpoint enables you to generate a list of all Elements that have been defined for a specific tenant. You may filter and sort list using such criteria as: date Element was created; Element tags, and min/max duration.
Example:
GET https://api.lvs.linius.com/v3/element?createdWhen=LAST_DAY
Response Body
{ "content": [ { "id": 1018132, "name": "My Element", "asset": { "id": "947155", "name": "Test Discover", "duration": 8078.757, "tags": [], "thumbnailUrl": "https://api.lvs.linius.com/v2/assembly/thumbnail/947155.jpg", "activated": true, "representations": [ { "id": "16148182", "format": "MP4", "sourceUrl": "https://s3-eu-west-2.amazonaws.com/samples.cdn.linius.com/Miller/BCvsND-wflow1.mp4", "sourceIdentifier": "HTTP", "meta": { "width": 640, "height": 360 }, "duration": 8078757, "created": "2022-02-14T20:40:10.871+0000", "secure": false } ], "created": "2022-02-14T20:40:10.422+0000" }, "offset": 10.5, "duration": 22, "tags": [ "tag1", "tag2", "tag3" ], "thumbnailUrl": "\"https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Big_buck_bunny_poster_big.jpg/800px-Big_buck_bunny_poster_big.jpg" }, { "id": 1018097, "name": "My Element", "asset": { "id": "1016426", "name": "Destination Earth", "duration": 819.688, "tags": [ "public domain", "test" ], "thumbnailUrl": "https://api.lvs.linius.com/v2/assembly/thumbnail/1016426.jpg", "activated": true, "representations": [ { "id": "17918410", "format": "MP4", "sourceUrl": "https://s3-eu-west-2.amazonaws.com/samples.cdn.linius.com/LVS-samples/Destination_Earth.mp4", "sourceIdentifier": "HTTP", "meta": { "width": 640, "height": 478 }, "duration": 819688, "created": "2022-05-11T01:39:21.645+0000", "secure": false } ], "created": "2022-05-11T01:39:21.128+0000" }, "offset": 10.5, "duration": 22, "tags": [ "tag1", "tag2", "tag3" ], "thumbnailUrl": "\"https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Big_buck_bunny_poster_big.jpg/800px-Big_buck_bunny_poster_big.jpg" } ], "first": true, "last": true, "number": 0, "numberOfElements": 2, "size": 50, "sort": null, "totalElements": 2, "totalPages": 1} |
Get details about a specific Element
GET /v3/element/{elementId} - Click here for this endpoint's full API specs and testing tool (LVS login required)
Purpose:
Specify an Element id to get information about that Element (e.g. Element name, asset Id, offset & duration, tags.)
Example:
GET https://api.lvs.linius.com/v3/element/1018097
Response Body:
{ "id": 1018097, "name": "My Element", "asset": { "id": "1016426", "name": "Destination Earth", "duration": 819.688, "tags": [ "public domain", "test" ], "thumbnailUrl": "https://api.lvs.linius.com/v2/assembly/thumbnail/1016426.jpg", "activated": true, "representations": [ { "id": "17918410", "format": "MP4", "sourceUrl": "https://s3-eu-west-2.amazonaws.com/samples.cdn.linius.com/LVS-samples/Destination_Earth.mp4", "sourceIdentifier": "HTTP", "meta": { "width": 640, "height": 478 }, "duration": 819688, "created": "2022-05-11T01:39:21.645+0000", "secure": false } ], "created": "2022-05-11T01:39:21.128+0000" }, "offset": 10.5, "duration": 22, "tags": [ "tag1", "tag2", "tag3" ], "thumbnailUrl": "\"https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Big_buck_bunny_poster_big.jpg/800px-Big_buck_bunny_poster_big.jpg" } |
Playlist Operations API Endpoints
Updated response body examples needed for operations below. These examples do not contain the fields related to secure discovery that you see in the current playlist responses.
Create a Playlist
POST /v3/playlist - Click here for this endpoint's full API specs and testing tool (LVS login required).
Purpose
This endpoint enables you to build and name a playlist by defining ordered sequence of Element IDs. You may also apply tags that will help you locate this Playlist in a list of Playlists.
POST https://api.lvs.linius.com/v3/playlist
Request Body:
{ "elements": [ "64", "65" ], "name": "Test Playlist 01 ", "tags": [ "BBB Playlist", "BBB" ], "thumbnailUrl": "https://images-na.ssl-images-amazon.com/images/I/51YmOkDNssL._SX342_.jpg"} Response Body: { "id": 66, "name": "Test Playlist 01 ", "tags": [ "bbb playlist", "bbb" ], "elements": [ { "id": 64, "name": "Test Element 2", "asset": { "id": 113, "name": "Big Buck Bunny Demo03", "duration": 596.5216666666666, "tags": [ "bunny003", "test003" ], "thumbnailUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/big_buck_bunny_poster_big.jpg/800px-big_buck_bunny_poster_big.jpg", "trackMeta": [ { "height": 720, "width": 1280, "type": "VIDEO" }, { "height": 0, "width": 0, "type": "AUDIO" } ], "meta": { "width": 1280, "height": 720 } }, "offset": 22.5, "duration": 25, "tags": [ "tagtest2", "tagtest1" ], "thumbnailUrl": "https://images-na.ssl-images-amazon.com/images/I/51YmOkDNssL._SX342_.jpg" }, { "id": 65, "name": "Test Element 3", "asset": { "id": 114, "name": "Big Buck Bunny Demo4", "duration": 596.5216666666666, "tags": [ "test004", "bunny004", "big buck bunny" ], "thumbnailUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Big_buck_bunny_poster_big.jpg/800px-Big_buck_bunny_poster_big.jpg", "trackMeta": [ { "height": 720, "width": 1280, "type": "VIDEO" }, { "height": 0, "width": 0, "type": "AUDIO" } ], "meta": { "width": 1280, "height": 720 } }, "offset": 22.5, "duration": 25, "tags": [ "tagtest4", "tagtest5" ], "thumbnailUrl": "https://images-na.ssl-images-amazon.com/images/I/51YmOkDNssL._SX342_.jpg" } ], "thumbnailUrl": "https://images-na.ssl-images-amazon.com/images/I/51YmOkDNssL._SX342_.jpg"}
|
Update a Playlist
PUT /v3/playlist/{playlistId} - Click here for this endpoint's full API specs and testing tool (LVS login required)
Purpose:
Use this endpoint to change such playlist attributes as:
- Playlist name
- Playlist contents (i.e. the specific Elements used and/or the order in which they are sequenced)
- Playlist tags
Example:
PUT https://api.lvs.linius.com/v3/playlist/66
Request Body:
{ "elements": [ "64", "65", "52" ], "name": "Test Playlist 01 ", "tags": [ "BBB Playlist", "BBB" ], "thumbnailUrl": "https://images-na.ssl-images-amazon.com/images/I/51YmOkDNssL._SX342_.jpg"} |
Response Body:
{ "id": 66, "name": "Test Playlist 01 ", "tags": [ "bbb playlist", "bbb" ], "elements": [ { "id": 64, "name": "Test Element 2", "asset": { "id": 113, "name": "Big Buck Bunny Demo03", "duration": 596.5216666666666, "tags": [ "bunny003", "test003" ], "thumbnailUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/big_buck_bunny_poster_big.jpg/800px-big_buck_bunny_poster_big.jpg", "trackMeta": [ { "height": 720, "width": 1280, "type": "VIDEO" }, { "height": 0, "width": 0, "type": "AUDIO" } ], "meta": { "width": 1280, "height": 720 } }, "offset": 22.5, "duration": 25, "tags": [ "tagtest2", "tagtest1" ], "thumbnailUrl": "https://images-na.ssl-images-amazon.com/images/I/51YmOkDNssL._SX342_.jpg" }, { "id": 65, "externalId": "Test004-Element02", "name": "Test Element 3", "asset": { "id": 114, "name": "Big Buck Bunny Demo4", "duration": 596.5216666666666, "tags": [ "test004", "bunny004", "big buck bunny" ], "thumbnailUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Big_buck_bunny_poster_big.jpg/800px-Big_buck_bunny_poster_big.jpg", "trackMeta": [ { "height": 720, "width": 1280, "type": "VIDEO" }, { "height": 0, "width": 0, "type": "AUDIO" } ], "meta": { "width": 1280, "height": 720 } }, "offset": 22.5, "duration": 25, "tags": [ "tagtest4", "tagtest5" ], "thumbnailUrl": "https://images-na.ssl-images-amazon.com/images/I/51YmOkDNssL._SX342_.jpg" }, { "id": 52, "asset": { "id": 1, "name": "SpanishGatewayTest", "duration": 27.766666666666666, "tags": [], "thumbnailUrl": "https://api.lvs.linius.com/v3/assembly/thumbnail/1", "trackMeta": [ { "height": 464, "width": 848, "type": "VIDEO" }, { "height": 0, "width": 0, "type": "AUDIO" } ], "meta": { "width": 848, "height": 464 } }, "offset": 0, "duration": 15, "tags": [], "thumbnailUrl": "https://api.lvs.linius.com/v3/thumbnail/52" } ], "thumbnailUrl": "https://images-na.ssl-images-amazon.com/images/I/51YmOkDNssL._SX342_.jpg" } |
Delete a Playlist
DELETE /v3/playlist/{playlistId} - Click here for this endpoint's full API specs and testing tool (LVS login required)
Purpose:
Use this Playlist to PERMANENTLY remove a Playlist from your tenant’s collection of Playlist. Please note: Deleting a Playlist does not delete the Elements contained within it. Those Elements may remain in use by other Playlists.
List all Playlists
GET /v3/playlist - Click here for this endpoint's full API specs and testing tool (LVS login required)
Purpose:
Use this endpoint to get a list of all Playlists defined for your tenant. You may filter and sort this list by such criteria as: Playlist name; date created; Playlist tags; Playlist duration.
Use cases may include user interfaces that show a list of sports highlight reels, compilations of lecture highlights for a particular course, etc.
Example
GET https://api.lvs.linius.com/v3/playlist?sortMode=Name
ResponseBody:
{ "content": [ { "id": 55, "name": "BartekBunny", "tags": [], "elements": [ { "id": 54, "asset": { "id": 105, "name": "BartekBunny", "duration": 596.5216666666666, "tags": [ "bartek", "bunny" ], "thumbnailUrl": "https://api.lvs.linius.com/v3/thumbnail/105", "trackMeta": [ { "height": 720, "width": 1280, "type": "VIDEO" }, { "height": 0, "width": 0, "type": "AUDIO" } ], "meta": { "width": 1280, "height": 720 } }, "offset": 0, "duration": -1, "tags": [ "tagtest3" ], "thumbnailUrl": "https://api.lvs.linius.com/v3/thumbnail/54" } ], "thumbnailUrl": "https://api.lvs.linius.com/v3/thumbnail/55" }, { "id": 53, "name": "pl1", "tags": [ "tag1" ], "elements": [ { "id": 52, "asset": { "id": 1, "name": "SpanishGatewayTest", "duration": 27.766666666666666, "tags": [], "thumbnailUrl": "https://api.lvs.linius.com/v3/thumbnail/1", "trackMeta": [ { "height": 464, "width": 848, "type": "VIDEO" }, { "height": 0, "width": 0, "type": "AUDIO" } ], "meta": { "width": 848, "height": 464 } }, "offset": 0, "duration": 15, "tags": [], "thumbnailUrl": "https://api.lvs.linius.com/v3/thumbnail/52" } ], "thumbnailUrl": "https://static.pexels.com/photos/127028/pexels-photo-127028.jpeg" }, { "id": 66, "name": "Test Playlist 01 ", "tags": [ "bbb playlist", "bbb" ], "elements": [ { "id": 64, "name": "Test Element 2", "asset": { "id": 113, "name": "Big Buck Bunny Demo03", "duration": 596.5216666666666, "tags": [ "bunny003", "test003" ], "thumbnailUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/big_buck_bunny_poster_big.jpg/800px-big_buck_bunny_poster_big.jpg", "trackMeta": [ { "height": 720, "width": 1280, "type": "VIDEO" }, { "height": 0, "width": 0, "type": "AUDIO" } ], "meta": { "width": 1280, "height": 720 } }, "offset": 22.5, "duration": 25, "tags": [ "tagtest2", "tagtest1" ], "thumbnailUrl": "https://images-na.ssl-images-amazon.com/images/I/51YmOkDNssL._SX342_.jpg" }, { "id": 65, "name": "Test Frame 3", "asset": { "id": 114, "name": "Big Buck Bunny Demo4", "duration": 596.5216666666666, "tags": [ "test004", "bunny004", "big buck bunny" ], "thumbnailUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Big_buck_bunny_poster_big.jpg/800px-Big_buck_bunny_poster_big.jpg", "trackMeta": [ { "height": 720, "width": 1280, "type": "VIDEO" }, { "height": 0, "width": 0, "type": "AUDIO" } ], "meta": { "width": 1280, "height": 720 } }, "offset": 22.5, "duration": 25, "tags": [ "tagtest4", "tagtest5" ], "thumbnailUrl": "https://images-na.ssl-images-amazon.com/images/I/51YmOkDNssL._SX342_.jpg" }, { "id": 52, "asset": { "id": 1, "name": "SpanishGatewayTest", "duration": 27.766666666666666, "tags": [], "thumbnailUrl": "https://api.lvs.linius.com/v3/thumbnail/1", "trackMeta": [ { "height": 464, "width": 848, "type": "VIDEO" }, { "height": 0, "width": 0, "type": "AUDIO" } ], "meta": { "width": 848, "height": 464 } }, "offset": 0, "duration": 15, "tags": [], "thumbnailUrl": "https://api.lvs.linius.com/v3/thumbnail/52" } ], "thumbnailUrl": "https://images-na.ssl-images-amazon.com/images/I/51YmOkDNssL._SX342_.jpg" } ], "totalPages": 1, "totalElements": 3, "last": true, "numberOfElements": 3, "sort": [ { "direction": "ASC", "property": "name", "ignoreCase": false, "nullHandling": "NATIVE", "descending": false, "ascending": true } ], "first": true, "size": 50, "number": 0}
|
Get details about specific Playlist
GET /v3/playlist/{playlistId} - Click here for this endpoint's full API specs and testing tool (LVS login required)
Specify a Playlist id to information about that Playlist (e.g. date created, Playlist name, elements used, duration, tags, etc).
Comments
0 comments
Article is closed for comments.