v4
Retrieves a list of your virtual linear playlists.
Request
Request syntax:
GET /linear-playlist
Request syntax (filtered):
GET /linear-playlist?desc=Description&active=Status
Query string parameters:
Filter the response by passing the following query string parameters:
| Parameter | Description |
|---|---|
| desc | Replace Description with the desired playlist description. The response will only include playlists whose description is an exact match to the specified value. |
| active | Replace Status with either of the following values: 0: Filter by disabled playlists. 1: Filter by enabled playlists. |
Response
The response for a successful request contains the following properties:
| Name | Data Type | Description |
|---|---|---|
| @id | String | Indicates the relative path to this endpoint. |
| @type | String | Returns Collection. |
| items | List of dictionaries | Contains a list of virtual linear playlists. |
| total_items | Integer | Indicates the total number of virtual linear playlists. |
items List
The items list describes each virtual linear playlist via the following properties:
| Name | Data Type | Description |
|---|---|---|
| @id | String | Indicates the relative path to this endpoint. |
| @type | String | Returns LinearPlaylist. |
| active | Integer | Determines the playlist's status. Valid values are: 0: Inactive 1: Active |
| ad_slate_fill | Integer | Determines whether ad breaks with insufficient ads will be filled with ad slate. Valid values are: 0: Disables ad slate and returns back to content. 1: Enables ad slate. |
| beam_break_duration | Integer | Determines whether ad breaks defined within an asset are honored and their duration. Valid values are: 0: Ad breaks are ignored. #: Sets the duration, in seconds, for all ad breaks. |
| desc | String | Sets the virtual linear playlist's description. |
| id | String | Indicates the virtual linear playlist system-defined ID. |
| playlist | List | Contains an ordered list of assets and ad breaks. A virtual linear playlist supports up to 100 assets. |
| profile | String | Reserved for future use. |
| repeat | Integer | Determines the number of times that the playlist will be repeated. Valid values are: 0: The playlist will not repeat. -1: The playlist will repeat indefinitely. * #: The playlist will repeat the specified number of times. |
| skip_drm | Integer | Determines whether playback of the virtual linear playlist requires a digital signature. Valid values are: 0: Playback requires a digital signature. 1: Playback is allowed without a digital signature. This property takes precedence over an asset's Require a token for playback setting. |
| studio_drm_required | Integer | Determines whether playback of the virtual linear playlist will be secured via Studio DRM. Valid values are: 0: Playback is not secured by Studio DRM. 1: Playback is secured via DRM. This property takes precedence over an asset's Require studio approved DRM for playback setting. |
playlist List
The playlist list defines a virtual linear playlist via the following properties:
| Name | Data Type | Description |
|---|---|---|
| beam | Dictionary | Contains an id property. |
| id | String | beam dictionary Indicates the system-defined ID for the asset that will be added to the virtual linear playlist. |
| ad | Dictionary | Contains a dur property. |
| dur | Integer | ad dictionary Indicates the duration, in seconds, for an ad break that occurs immediately after the asset defined within the beam dictionary. |
Sample Request/Response
The code below (Python 3) shows how to retrieve all virtual playlists.
This code imports names from the api_auth module for V4 APIs (see below).
🦉
API Auth for Classic Authentication (V4 APIs)
Open Recipe
import requests
from api_auth import APICredentials, APIParams
class VirtualLinearPlaylists:
def __init__(self):
self.host = "https://services.uplynk.com"
def run(self):
self._get_all_virtual_linear_playlists()
def _get_all_virtual_linear_playlists(self):
url = "{}{}".format(self.host, "/api/v4/linear-playlist")
headers = {'Content-Type': 'application/json'}
response = requests.get(
url, params=APIParams(APICredentials()).get_params({}), headers=headers
)
print(response.json())
VirtualLinearPlaylists().run()Response:
{
"@id": "/api/v4/linear-playlist/?desc=Sample+Playlist",
"@type": "Collection",
"items": [{
"@id": "/api/v4/linear-playlist/abce801613f94955b17db4f7c8e8137c",
"@type": "LinearPlaylist",
"id": "abce801613f94955b17db4f7c8e8137c",
"desc": "Sample Playlist",
"repeat": -1,
"profile": "",
"beam_break_duration": 30,
"ad_slate_fill": 0,
"active": 1,
"skip_drm": 0,
"studio_drm_required": 0,
"playlist": [{
"beam":{
"id":"abc123456defghi789jklmno012345pq"
}
}, {
"ad":{
"dur": 20
}
}, {
"beam":{
"id":"1df8d13992cd4222a7343b8fafd89cd7"
}
}
]
}
],
"total_items": 1
}