Playlists

Playlists are are collection of VoD assets that can be used to create the input for Serverside.ai VoD channels. Additionally the playlist items can hold the information for ad markers.

If you want to have pre roll ads simply create a ad with the start position at 0 seconds.

Create and read playlists

/playlists

GET https://admin.serverside.ai/api/v2/playlists

Listing all playlists

Query Parameters

NameTypeDescription

offset

number

Start with item "offset" of the list (default: 0)

limit

number

Entries pert page. (default: 20 - maximum: 100)

Headers

NameTypeDescription

x-api-key

string

[
    {
        "status": "enabled",
        "name": "Example Playlist",
        "type": "vod2live",
        "startDate": "2020-05-24T14:02",
        "contents": [
            {
                "sourceType": "url",
                "spliceType": "seconds",
                "cuePoints": [
                    {
                        "spliceTime": 30,
                        "maxAds": 1,
                        "maxDuration": 30
                    },
                ]
            }
        ],
        "createdBy": "test@nowtilus.tv",
        "createdAt": "2020-05-19T12:01:12.660Z",
        "tenant": "Nowtilus GmbH",
        "modifiedAt": "2020-05-24T11:28:22.071Z",
        "modifiedBy": "made_up_inc7@ingo-eichhorst.de"
    }
]

/playlists

POST https://admin.serverside.ai/api/v2/playlists

Create a playlist

Path Parameters

NameTypeDescription

x-api-key

string

Request Body

NameTypeDescription

id

string

unique identifier (an uuid v4 will be created if not provided)

contents[].cuePoints[].maxDuration

number

duration in seconds (float: e.g. 10 or 10.1234)

contents[].cuePoints[].maxAds

number

maximum number of ads

contents[].cuePoints[].spliceTime

number

in seconds or percent, depending on spliceType

contents[].spliceType

string

'seconds' or 'percent'

contents[].duration

number

e.g. 42.42 (in seconds)

contents[].url

string

only for sourceType 'url' url of the hls or dash VoD manifest

contents[].sourceType

string

'url' or 'placeholder'

type

string

'vod2live' or 'vod'

name

string

status

string

'enabled' or 'disabled' (defaults to 'disabled')

{
    "status": "enabled",
    "id": "7451079a-870c-4e64-9915-8f5d07b4edc6",
    "name": "Example Playlist",
    "type": "vod2live",
    "startDate": "2020-05-24T14:02",
    "contents": [
        {
            "sourceType": "url",
            "spliceType": "seconds",
            "cuePoints": [
                {
                    "spliceTime": 30,
                    "maxAds": 1,
                    "maxDuration": 30
                },
            ]
        }
    ],
    "createdBy": "test@nowtilus.tv",
    "createdAt": "2020-05-19T12:01:12.660Z",
    "tenant": "Nowtilus GmbH",
    "modifiedAt": "2020-05-24T11:28:22.071Z",
    "modifiedBy": "made_up_inc7@ingo-eichhorst.de"
}

/playlists/:id

GET https://admin.serverside.ai/api/v2/playlists/:id

Retrieve a playlist entry

Path Parameters

NameTypeDescription

id

string

id of playlist

Query Parameters

NameTypeDescription

content

string

url to content that will be replaced if the content is from sourceType 'placeholder'

format

string

'mrss' or 'json'

Headers

NameTypeDescription

accept

string

to get MRSS: appliation/rss+xml

x-api-key

string

{
    "status": "enabled",
    "id": "7451079a-870c-4e64-9915-8f5d07b4edc6",
    "name": "Example Playlist",
    "type": "vod2live",
    "startDate": "2020-05-24T14:02",
    "contents": [
        {
            "sourceType": "url",
            "spliceType": "seconds",
            "cuePoints": [
                {
                    "spliceTime": 30,
                    "maxAds": 1,
                    "maxDuration": 30
                },
            ]
        }
    ],
    "createdBy": "test@nowtilus.tv",
    "createdAt": "2020-05-19T12:01:12.660Z",
    "tenant": "Nowtilus GmbH",
    "modifiedAt": "2020-05-24T11:28:22.071Z",
    "modifiedBy": "test@nowtilus.tv"
}

/playlists/:id

PUT https://admin.serverside.ai/api/v2/playlists/:id

Update one playlist entry

Path Parameters

NameTypeDescription

id

string

id of the playlist

Request Body

NameTypeDescription

status

string

'enabled' or 'disabled' (defaults to 'disabled')

name

string

type

string

'vod2live' or 'vod'

contents[].sourceType

string

'url' or 'placeholder'

contents[].url

string

only for sourceType 'url'. URL of the HLS or DASH VoD manifest

contents[].duration

string

e.g. 42.42 (in seconds)

contents[].spliceType

string

'seconds' or 'percent'

contents[].cuePoints[].spliceTime

number

in seconds or percent, depending on spliceType

contents[].cuePoints[].maxDuration

number

duration in seconds (float: e.g. 10 or 10.1234)

contents[].cuePoints[].maxAds

number

maximum number of ads number of ads

{
    "status": "enabled",
    "id": "7451079a-870c-4e64-9915-8f5d07b4edc6",
    "name": "Example Playlist",
    "type": "vod2live",
    "startDate": "2020-05-24T14:02",
    "contents": [
        {
            "sourceType": "url",
            "spliceType": "seconds",
            "cuePoints": [
                {
                    "spliceTime": 30,
                    "maxAds": 1,
                    "maxDuration": 30
                },
            ]
        }
    ],
    "createdBy": "test@nowtilus.tv",
    "createdAt": "2020-05-19T12:01:12.660Z",
    "tenant": "Nowtilus GmbH",
    "modifiedAt": "2020-05-24T11:28:22.071Z",
    "modifiedBy": "test@nowtilus.tv"
}

/playlists/:id

DELETE https://admin.serverside.ai/api/v2/playlists/:id

Delete one playlist entry

Path Parameters

NameTypeDescription

id

string

id of playlist

Auto-Generate a playlist

As a shortcut you do not necessarily need to create a database entry in order to support a simple playlist.

/playlists/generate

GET http://admin.serverside.ai/api/unsecured-v2/playlists/generate

Automatically

Query Parameters

NameTypeDescription

packaging

string

'hls' or 'dash'

format

string

'mrss' or 'json' - defaults to 'json'

markers

string

colon ";" separated list of ad-marker in the format: <seconds>,<maxAds>,<maxDuration> (e.g. 0,2,20;90,1,30)

content

string

url of the content to create a playlist from

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:ad="http://admin.serverside.ai/mrss/" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
        <title>Generated Playlist</title>
        <link>https://admin.serverside.ai</link>
        <description>Generated Playlist</description>
        <item>
            <title>url</title>
            <media:category>content</media:category>
            <media-content url="http.mpd" type="application/vnd.apple.mpegurl"></media-content>
            <ad:cuepoints>
                <cuepoint id="adpod-0">
                    <splicetime>0</splicetime>
                    <maxcount>2</maxcount>
                    <duration>20</duration>
                </cuepoint>
            </ad:cuepoints>
        </item>
    </channel>
</rss>

Last updated