Certain features are incompatible with live channels that can leverage schedule entries.
Learn more.
You must determine whether a live channel may leverage schedule entries upon its creation. Additionally, you cannot enable or disable the scheduling feature on existing live channels.
Use the Live Channel API, which is a versioned API, to:
Administer live channels via the following endpoints:
Endpoint | Description |
---|---|
POST /channels
|
Creates a live channel. |
DELETE /channels/Live Channel ID
|
Deletes a live channel. |
GET /channels
|
Retrieves all of your live channels. |
GET /channels/Live Channel ID
|
Retrieves a specific live channel. |
PATCH /channels/Live Channel ID
|
Updates a specific live channel. |
Administer schedule entries associated with a live channel through the following endpoints:
Endpoint | Description |
---|---|
POST /channels/Live Channel ID/schedules
|
Adds a schedule entry to a live channel. |
Add Schedule Entries by Playlist POST /channels/Live Channel ID/schedule-playlist
|
Adds a playlist's assets and ad breaks as entries within a live channel's schedule. |
Delete Multiple Schedule Entries DELETE /channels/Live Channel ID/schedules
|
Deletes all schedule entries that fall within the specified date range. |
Delete Schedule Entry / Linked Schedule Entries DELETE /channels/Live Channel ID/schedules/Schedule Entry ID
Delete linked schedule entries: DELETE /channels/Live Channel ID/schedules/Schedule Entry ID?include_linked=true
|
Deletes a schedule entry from a live channel. If the entry was scheduled as a result of a playlist, then you may also delete all of the other entries that were scheduled at that time. |
GET /channels/Live Channel ID/schedules
|
Retrieves the set of schedule entries associated with a live channel for a specific time period. |
GET /channels/Live Channel ID/schedules/Schedule Entry ID
|
Retrieves a specific schedule entry. |
PATCH /channels/Live Channel ID/schedules/Schedule Entry ID
|
Updates a specific schedule entry. |
Administer blackout configurations via the following endpoints:
Endpoint | Description |
---|---|
POST /channels/Live Channel ID/blackouts
|
Adds a blackout configuration to a live channel. |
DELETE /channels/Live Channel ID/blackouts/Blackout ID
|
Deletes a blackout configuration from a live channel. |
GET /channels/Live Channel ID/blackouts/Blackout ID
|
Retrieves a blackout configuration associated with a specific live channel. |
GET /channels/Live Channel ID/blackouts
|
Retrieves either all or recently updated blackout configurations associated with a specific live channel. |
PATCH /channels/Live Channel ID/blackouts/Blackout ID
|
Updates a specific blackout configuration. |
Learn more about blackout and how to set it up through audiences, rules, and blackouts.
Use the following base URL:
Creates a live channel.
Request syntax:
Request body parameters:
Pass the following request body parameters:
Name |
Data Type |
Description |
---|---|---|
desc Required |
String |
Defines the live channel's name. |
external_id |
String |
Sets the live channel's external ID. |
slicer_id |
String |
Identifies the live channel's Live Slicer by its case-sensitive ID. Default value: Omitting this property sets it to the live channel's system-defined ID. |
use_chsched |
Integer |
Determines whether the live channel supports schedule entries. Valid values are:
A live channel's support for schedule entries is determined upon its creation. After which, you may not modify this property. Default value: 1
|
Pass a digital signature based off of msg.
The response for a successful request contains the following properties:
Name |
Data Type |
Description |
---|---|---|
@id |
String |
Indicates the relative path to an endpoint that returns this live channel. |
@type |
String |
Returns Channel. |
ad_slate |
String |
Indicates the asset that will be served for the live channel's ad slate by its system-defined ID (i.e., asset IDThis unique ID identifies an asset. View this ID by navigating to the Content tab, selecting the desired asset, and then viewing the GUID option from the Details tab.). |
blackout_slate |
String |
Indicates the asset that will be served for the live channel's blackout slate by its system-defined ID (i.e., asset IDThis unique ID identifies an asset. View this ID by navigating to the Content tab, selecting the desired asset, and then viewing the GUID option from the Details tab.). You may not use blackout with live channels that can leverage schedule entries. |
created |
String |
Indicates the timestamp (UTC) at which the live channel was created. Syntax (ISO 8601): YYYY-MM-DDThh:mm:ss.sssZ
|
dash_url |
String |
Indicates the live channel's DASH playback URL. |
desc |
String |
Indicates the live channel's name. |
embed_domains |
String |
Indicates a comma-separated list of domains on which the live channel's embedded HTML5 player (embed_html5_player_url) may be hosted. Set this property to an empty value to authorize playback on any domain. Use an * as a wildcard character. Example: *.example.com,www.example.org,www.example.*
|
embed_html5_player_url |
String |
Indicates the URL for the live channel's embedded HTML5 player. |
external_id |
String |
Indicates the live channel's external ID. |
hls_url |
String |
Indicates the live channel's HLS playback URL. |
id |
String |
Identifies this live channel by its system-defined ID. |
meta |
Dictionary |
Contains the live channel's metadata fields. Each field is a key-value pair with the following syntax: 'Field Name': 'Field Value'
|
missing_content_slate |
String |
Indicates the asset that will be served for missing content slate by its system-defined ID (i.e., asset IDThis unique ID identifies an asset. View this ID by navigating to the Content tab, selecting the desired asset, and then viewing the GUID option from the Details tab.). |
override |
Dictionary |
use_chsched = 2 Only Indicates whether a live channel's source is being overridden. This property returns an empty dictionary when the live channel's source is not being overridden. |
override_slicer_id |
String |
The behavior of this property varies according to whether schedule entry support has been enabled on this live channel.
|
require_drm |
Integer |
Indicates whether playback requires a digital signature. Valid values are:
|
require_studio_drm |
Integer |
Indicates whether Studio DRM will be enforced on this live channel. Valid values are:
|
slicer_id |
String |
Indicates the live channel's Live Slicer by its case-sensitive ID. |
test_players |
List of dictionaries |
Contains a list of restriction-free players through which you may test your live channel's feed. |
thumb_url |
String |
Indicates the URL to a live channel's thumbnail preview image. |
use_chsched |
Integer |
Indicates whether the live channel supports schedule entries. Valid values are:
A live channel's support for schedule entries is determined upon its creation. After which, you may not modify this property. |
The override dictionary contains the following properties when you are overriding the live channel's source:
Name |
Data Type |
Description |
---|---|---|
id |
String |
Identifies a Live Slicer by its case-sensitive ID. |
start |
String |
Indicates the timestamp at which a live channel's source was overridden by the Live Slicer identified by the id property. Syntax: YYYY-MM-DDThh:mm:ss.ffffffZ
|
type |
String |
Returns slicer when a live channel's source is being manually overridden. |
The test_players list describes each test player through the following properties:
Name |
Data Type |
Description |
---|---|---|
desc |
String |
Indicates the test player's name. |
id |
String |
Indicates the test player's system-defined ID. |
expire |
String |
Indicates the test player's expiration date in Unix time (milliseconds). |
params |
String |
Reserved for future use. |
whitelist |
Boolean |
Indicates whether the test player will be placed on an allowlist. |
url |
String |
Indicates the test player's URL. |
url_html5 |
String |
Indicates the test player's HTML5 URL. |
view |
String |
Reserved for internal use. |
Call the add_live_channel module (Python 3) to create a live channel. This module imports names from the api_auth module.
import json, requests, datetime, time from api_auth import APICredentials, APIParams class LiveChannel: def __init__(self): self.host = "https://services.uplynk.com" def run(self): """ Create a live channel. """ self._create_live_channel() def _create_live_channel(self): url = "{}{}".format(self.host, "/api/v4/channels") payload = { 'desc': 'My New Live Channel', # Replace with the live channel's name. 'slicer_id': 'mySlicer1', # Replace with the desired Live Slicer ID. 'use_chsched': 2 # Enables scheduling. } headers = {'Content-Type': 'application/json'} response = requests.post( url, params=APIParams(APICredentials()).get_params({}), data=json.dumps(payload), headers=headers ) print(response.json()) LiveChannel().run()
Response:
{ '@id': '/channels/a6aa35d4b523498aab7227ed9510c138', '@type': 'Channel', 'id': 'a6aa35d4b523498aab7227ed9510c138', 'desc': 'My Live Channel', 'created': '2021-04-30T16:19:48.215Z', 'external_id': '', 'use_chsched': 2, 'ad_slate': '80292e78be6843fa8398827589748782', 'blackout_slate': '860cbd66462a43b799ce044e6045f63d', 'missing_content_slate': '48d8de0bdb0b4f2493310ad868525fb8', 'embed_domains': '', 'meta': {}, 'thumb_url': '', 'slicer_id': 'MyLiveSlicer1', 'hls_url': 'https://content.uplynk.com/channel/a6aa35d4b523498aab7227ed9510c138.m3u8', 'dash_url': 'https://content.uplynk.com/channel/a6aa35d4b523498aab7227ed9510c138.mpd', 'test_players': [{ 'desc': '5ExtMIB5AUzLtAAYvNF2NG', 'id': '5ExtMIB5AUzLtAAYvNF2NG', 'expire': None, 'params': '', 'whitelist': False, 'url': 'https://content.uplynk.com/player/5ExtMIB5AUzLtAAYvNF2NGsc.html', 'url_html5': 'https://content.uplynk.com/player5/5ExtMIB5AUzLtAAYvNF2NGsc.html' } ], 'embed_html5_player_url': 'https://content.uplynk.com/player5/32jMLROxrcW8JNFJNglmIVec.html', 'require_drm': 1, 'require_studio_drm': 0 }
Deletes a live channel.
Request syntax:
Define the following variable when submitting the above request:
VariableA variable represents a value that must be replaced. A variable consists of either a URL segment (e.g., "0001" in /0001/) or a query string value (e.g., "3" in mediaTypes=3). | Description |
---|---|
Required |
Identifies a live channel by its system-defined ID. |
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 Channel. |
message |
String |
Returns Deleted when the specified live channel has been successfully deleted. |
Call the delete_live_channel module (Python 3) to delete a live channel. This module imports names from the api_auth module.
import json, requests from api_auth import APICredentials, APIParams channel_id = 'Hak3zjnPLSW5o0j8GMpzRMsa' # Replace with the ID for the desired live channel. class DeleteLiveChannel: def __init__(self): self.host = "https://services.uplynk.com" def run(self): """ Deletes a live channel. """ self._delete_live_channel() def _delete_live_channel(self): url = "{}{}{}".format(self.host, "/api/v4/channels/", channel_id) response = requests.delete( url, params=APIParams(APICredentials()).get_params({}) ) print(response.json()) DeleteLiveChannel().run()
Response:
{ '@id': '/channels/Hak3zjnPLSW5o0j8GMpzRMsa', '@type': 'Channel', 'message': 'Deleted' }
Retrieves all of your live channels.
Request syntax:
Pass a digital signature based off of msg.
The response for a successful request contains the following properties:
Name |
Data Type |
Description |
---|---|---|
@id |
String |
Indicates the relative path to the requested endpoint. |
@type |
String |
Returns Collection. |
items |
List of dictionaries |
Contains a list of live channels. |
total_items |
Integer |
Indicates the total number of live channels. |
The items list describes each live channel via the following properties:
Name |
Data Type |
Description |
---|---|---|
@id |
String |
Indicates the relative path to an endpoint that returns this live channel. |
@type |
String |
Returns Channel. |
created |
String |
Indicates the timestamp (UTC) at which the live channel was created. Syntax (ISO 8601): YYYY-MM-DDThh:mm:ss.sssZ
|
desc |
String |
Indicates the live channel's name. |
external_id |
String |
Indicates the live channel's external ID. |
id |
String |
Identifies this live channel by its system-defined ID. |
slicer_id |
String |
Indicates the live channel's Live Slicer by its case-sensitive ID. |
thumb_url |
String |
Indicates the URL to a live channel's thumbnail preview image. |
use_chsched |
Integer |
Indicates whether the live channel supports schedule entries. Valid values are:
A live channel's support for schedule entries is determined upon its creation. After which, you may not modify this property. |
Call the get_all_live_channels module (Python 3) to retrieve all of your live channels. This module imports names from the api_auth module.
import json import requests from api_auth import APICredentials, APIParams class LiveChannel: def __init__(self): self.host = "https://services.uplynk.com" def run(self): self._get_all_live_channels() def _get_all_live_channels(self): url = "{}{}".format(self.host, "/api/v4/channels") headers = {'Content-Type': 'application/json'} response = requests.get( url, params=APIParams(APICredentials()).get_params({}), headers=headers ) print(response.json()) LiveChannel().run()
Response:
{ 'total_items': 3, 'items': [{ 'use_chsched': 1, 'created': '2016-10-04T17:09:41.570Z', '@id': '/channels/c8929b67f1354607877b319edb0c01ag', 'id': 'c8929b67f1354607877b319edb0c01ag', 'slicer_id': 'sales03', 'thumb_url': '', 'external_id': '', '@type': 'Channel', 'desc': 'Sales Conferences' }, { 'use_chsched': 2, 'created': '2021-01-25T23:31:29.773Z', '@id': '/channels/a4481b4f12ae471d9b727a6e27ea4285', 'id': 'a4481b4f12ae471d9b727a6e27ea4285', 'slicer_id': 'marketing01', 'thumb_url': '', 'external_id': '', '@type': 'Channel', 'desc': 'Marketing Conferences' }, { 'use_chsched': 2, 'created': '2021-02-05T23:25:30.364Z', '@id': '/channels/02ed9f65570746528e7b3d0628960025', 'id': '02ed9f65570746528e7b3d0628960025', 'slicer_id': 'products04', 'thumb_url': '', 'external_id': '', '@type': 'Channel', 'desc': 'Widgets' } ], '@id': '/channels', '@type': 'Collection' }
Retrieves a live channel.
Request syntax:
Define the following variable when submitting the above request:
VariableA variable represents a value that must be replaced. A variable consists of either a URL segment (e.g., "0001" in /0001/) or a query string value (e.g., "3" in mediaTypes=3). | Description |
---|---|
Required |
Identifies a live channel by its system-defined ID. |
Pass a digital signature based off of msg.
The response for a successful request contains the following properties:
Name |
Data Type |
Description |
---|---|---|
@id |
String |
Indicates the relative path to an endpoint that returns this live channel. |
@type |
String |
Returns Channel. |
ad_slate |
String |
Indicates the asset that will be served for the live channel's ad slate by its system-defined ID (i.e., asset IDThis unique ID identifies an asset. View this ID by navigating to the Content tab, selecting the desired asset, and then viewing the GUID option from the Details tab.). |
blackout_slate |
String |
Indicates the asset that will be served for the live channel's blackout slate by its system-defined ID (i.e., asset IDThis unique ID identifies an asset. View this ID by navigating to the Content tab, selecting the desired asset, and then viewing the GUID option from the Details tab.). You may not use blackout with live channels that can leverage schedule entries. |
created |
String |
Indicates the timestamp (UTC) at which the live channel was created. Syntax (ISO 8601): YYYY-MM-DDThh:mm:ss.sssZ
|
dash_url |
String |
Indicates the live channel's DASH playback URL. |
desc |
String |
Indicates the live channel's name. |
embed_domains |
String |
Indicates a comma-separated list of domains on which the live channel's embedded HTML5 player (embed_html5_player_url) may be hosted. Set this property to an empty value to authorize playback on any domain. Use an * as a wildcard character. Example: *.example.com,www.example.org,www.example.*
|
embed_html5_player_url |
String |
Indicates the URL for the live channel's embedded HTML5 player. |
external_id |
String |
Indicates the live channel's external ID. |
hls_url |
String |
Indicates the live channel's HLS playback URL. |
id |
String |
Identifies this live channel by its system-defined ID. |
meta |
Dictionary |
Contains the live channel's metadata fields. Each field is a key-value pair with the following syntax: 'Field Name': 'Field Value'
|
missing_content_slate |
String |
Indicates the asset that will be served for missing content slate by its system-defined ID (i.e., asset IDThis unique ID identifies an asset. View this ID by navigating to the Content tab, selecting the desired asset, and then viewing the GUID option from the Details tab.). |
override |
Dictionary |
use_chsched = 2 Only Indicates whether a live channel's source is being overridden. This property returns an empty dictionary when the live channel's source is not being overridden. |
override_slicer_id |
String |
The behavior of this property varies according to whether schedule entry support has been enabled on this live channel.
|
require_drm |
Integer |
Indicates whether playback requires a digital signature. Valid values are:
|
require_studio_drm |
Integer |
Indicates whether Studio DRM will be enforced on this live channel. Valid values are:
|
slicer_id |
String |
Indicates the live channel's Live Slicer by its case-sensitive ID. |
test_players |
List of dictionaries |
Contains a list of restriction-free players through which you may test your live channel's feed. |
thumb_url |
String |
Indicates the URL to a live channel's thumbnail preview image. |
use_chsched |
Integer |
Indicates whether the live channel supports schedule entries. Valid values are:
A live channel's support for schedule entries is determined upon its creation. After which, you may not modify this property. |
The override dictionary contains the following properties when you are overriding the live channel's source:
Name |
Data Type |
Description |
---|---|---|
id |
String |
Identifies a Live Slicer by its case-sensitive ID. |
start |
String |
Indicates the timestamp at which a live channel's source was overridden by the Live Slicer identified by the id property. Syntax: YYYY-MM-DDThh:mm:ss.ffffffZ
|
type |
String |
Returns slicer when a live channel's source is being manually overridden. |
The test_players list describes each test player through the following properties:
Name |
Data Type |
Description |
---|---|---|
desc |
String |
Indicates the test player's name. |
id |
String |
Indicates the test player's system-defined ID. |
expire |
String |
Indicates the test player's expiration date in Unix time (milliseconds). |
params |
String |
Reserved for future use. |
whitelist |
Boolean |
Indicates whether the test player will be placed on an allowlist. |
url |
String |
Indicates the test player's URL. |
url_html5 |
String |
Indicates the test player's HTML5 URL. |
view |
String |
Reserved for internal use. |
Call the get_live_channel module (Python 3) to retrieve a live channel. This module imports names from the api_auth module.
import json import requests from api_auth import APICredentials, APIParams channel_id = 'a6aa35d4b523498aab7227ed9510c138' # Replace with the ID for the desired live channel. class LiveChannel: def __init__(self): self.host = "https://services.uplynk.com" def run(self): self._get_live_channel() def _get_live_channel(self): url = "{}{}{}".format(self.host, "/api/v4/channels/", channel_id) headers = {'Content-Type': 'application/json'} response = requests.get( url, params=APIParams(APICredentials()).get_params({}), headers=headers ) print(response.json()) LiveChannel().run()
Response:
{ '@id': '/channels/a6aa35d4b523498aab7227ed9510c138', '@type': 'Channel', 'id': 'a6aa35d4b523498aab7227ed9510c138', 'desc': 'My Live Channel', 'created': '2021-04-30T16:19:48.215Z', 'external_id': '', 'use_chsched': 2, 'ad_slate': '80292e78be6843fa8398827589748782', 'blackout_slate': '860cbd66462a43b799ce044e6045f63d', 'missing_content_slate': '48d8de0bdb0b4f2493310ad868525fb8', 'embed_domains': '', 'meta': {}, 'thumb_url': '', 'slicer_id': 'MyLiveSlicer1', 'hls_url': 'https://content.uplynk.com/channel/a6aa35d4b523498aab7227ed9510c138.m3u8', 'dash_url': 'https://content.uplynk.com/channel/a6aa35d4b523498aab7227ed9510c138.mpd', 'test_players': [{ 'desc': '5ExtMIB5AUzLtAAYvNF2NG', 'id': '5ExtMIB5AUzLtAAYvNF2NG', 'expire': None, 'params': '', 'whitelist': False, 'url': 'https://content.uplynk.com/player/5ExtMIB5AUzLtAAYvNF2NGsc.html', 'url_html5': 'https://content.uplynk.com/player5/5ExtMIB5AUzLtAAYvNF2NGsc.html' } ], 'embed_html5_player_url': 'https://content.uplynk.com/player5/32jMLROxrcW8JNFJNglmIVec.html', 'require_drm': 1, 'require_studio_drm': 0 }
Updates a specific live channel.
Request syntax:
Define the following variable when submitting the above request:
VariableA variable represents a value that must be replaced. A variable consists of either a URL segment (e.g., "0001" in /0001/) or a query string value (e.g., "3" in mediaTypes=3). | Description |
---|---|
Required |
Identifies a live channel by its system-defined ID. |
Request body:
Define a live channel through the following properties:
Name |
Data Type |
Description |
---|---|---|
ad_slate |
String |
Identifies the asset that will be served for the live channel's ad slate by its system-defined ID (i.e., asset IDThis unique ID identifies an asset. View this ID by navigating to the Content tab, selecting the desired asset, and then viewing the GUID option from the Details tab.). |
blackout_slate |
String |
Identifies the asset that will be served for the live channel's blackout slate by its system-defined ID (i.e., asset IDThis unique ID identifies an asset. View this ID by navigating to the Content tab, selecting the desired asset, and then viewing the GUID option from the Details tab.). You may not use blackout with live channels that can leverage schedule entries. |
desc |
String |
Defines the live channel's name. |
embed_domains |
String |
Sets a comma-separated list of domains on which the live channel's embedded HTML5 player (embed_html5_player_url) may be hosted. Set this property to an empty value to authorize playback on any domain. Use an * as a wildcard character. Example: *.example.com,www.example.org,www.example.*
|
external_id |
String |
Sets the live channel's external ID. |
meta |
Dictionary |
Contains the live channel's metadata fields. Each field is a key-value pair with the following syntax: 'Field Name': 'Field Value'
|
missing_content_slate |
String |
Identifies the asset that will be served for missing content slate by its system-defined ID (i.e., asset IDThis unique ID identifies an asset. View this ID by navigating to the Content tab, selecting the desired asset, and then viewing the GUID option from the Details tab.). |
override |
Dictionary |
use_chsched = 2 Only Starts or ends a manual override of a live channel's source. End a manual override of a live channel's source by setting this property to an empty dictionary. |
require_drm |
Integer |
Determines whether playback requires a digital signature. Valid values are:
|
require_studio_drm |
Integer |
Determines whether Studio DRM will be enforced on this live channel. Valid values are:
|
slicer_id |
String |
Identifies the live channel's Live Slicer by its case-sensitive ID. |
test_players |
List of dictionaries |
Contains a list of restriction-free players through which you may test your live channel's feed. |
Set both of the following properties to override a live channel's source:
Name |
Data Type |
Description |
---|---|---|
id |
String |
Identifies a Live Slicer by its case-sensitive ID. |
type |
String |
Set to slicer to manually override a live channel's source. |
The test_players list describes each test player through the following properties:
Name |
Data Type |
Description |
---|---|---|
desc |
String |
Sets the test player's name. |
expire |
String |
Determines the test player's expiration date in Unix time (milliseconds). |
whitelist |
Boolean |
Determines whether the test player will be placed on an allowlist. |
Pass a digital signature based off of msg.
The response for a successful request contains the following properties:
Name |
Data Type |
Description |
---|---|---|
@id |
String |
Indicates the relative path to an endpoint that returns this live channel. |
@type |
String |
Returns Channel. |
ad_slate |
String |
Indicates the asset that will be served for the live channel's ad slate by its system-defined ID (i.e., asset IDThis unique ID identifies an asset. View this ID by navigating to the Content tab, selecting the desired asset, and then viewing the GUID option from the Details tab.). |
blackout_slate |
String |
Indicates the asset that will be served for the live channel's blackout slate by its system-defined ID (i.e., asset IDThis unique ID identifies an asset. View this ID by navigating to the Content tab, selecting the desired asset, and then viewing the GUID option from the Details tab.). You may not use blackout with live channels that can leverage schedule entries. |
created |
String |
Indicates the timestamp (UTC) at which the live channel was created. Syntax (ISO 8601): YYYY-MM-DDThh:mm:ss.sssZ
|
dash_url |
String |
Indicates the live channel's DASH playback URL. |
desc |
String |
Indicates the live channel's name. |
embed_domains |
String |
Indicates a comma-separated list of domains on which the live channel's embedded HTML5 player (embed_html5_player_url) may be hosted. Set this property to an empty value to authorize playback on any domain. Use an * as a wildcard character. Example: *.example.com,www.example.org,www.example.*
|
embed_html5_player_url |
String |
Indicates the URL for the live channel's embedded HTML5 player. |
external_id |
String |
Indicates the live channel's external ID. |
hls_url |
String |
Indicates the live channel's HLS playback URL. |
id |
String |
Identifies this live channel by its system-defined ID. |
meta |
Dictionary |
Contains the live channel's metadata fields. Each field is a key-value pair with the following syntax: 'Field Name': 'Field Value'
|
missing_content_slate |
String |
Indicates the asset that will be served for missing content slate by its system-defined ID (i.e., asset IDThis unique ID identifies an asset. View this ID by navigating to the Content tab, selecting the desired asset, and then viewing the GUID option from the Details tab.). |
override |
Dictionary |
use_chsched = 2 Only Indicates whether a live channel's source is being overridden. This property returns an empty dictionary when the live channel's source is not being overridden. |
override_slicer_id |
String |
The behavior of this property varies according to whether schedule entry support has been enabled on this live channel.
|
require_drm |
Integer |
Indicates whether playback requires a digital signature. Valid values are:
|
require_studio_drm |
Integer |
Indicates whether Studio DRM will be enforced on this live channel. Valid values are:
|
slicer_id |
String |
Indicates the live channel's Live Slicer by its case-sensitive ID. |
test_players |
List of dictionaries |
Contains a list of restriction-free players through which you may test your live channel's feed. |
thumb_url |
String |
Indicates the URL to a live channel's thumbnail preview image. |
use_chsched |
Integer |
Indicates whether the live channel supports schedule entries. Valid values are:
A live channel's support for schedule entries is determined upon its creation. After which, you may not modify this property. |
The override dictionary contains the following properties when you are overriding the live channel's source:
Name |
Data Type |
Description |
---|---|---|
id |
String |
Identifies a Live Slicer by its case-sensitive ID. |
start |
String |
Indicates the timestamp at which a live channel's source was overridden by the Live Slicer identified by the id property. Syntax: YYYY-MM-DDThh:mm:ss.ffffffZ
|
type |
String |
Returns slicer when a live channel's source is being manually overridden. |
The test_players list describes each test player through the following properties:
Name |
Data Type |
Description |
---|---|---|
desc |
String |
Indicates the test player's name. |
id |
String |
Indicates the test player's system-defined ID. |
expire |
String |
Indicates the test player's expiration date in Unix time (milliseconds). |
params |
String |
Reserved for future use. |
whitelist |
Boolean |
Indicates whether the test player will be placed on an allowlist. |
url |
String |
Indicates the test player's URL. |
url_html5 |
String |
Indicates the test player's HTML5 URL. |
view |
String |
Reserved for internal use. |
Call the update_live_channel module (Python 3) to modify a live channel. This module imports names from the api_auth module.
import json, requests, datetime, time from api_auth import APICredentials, APIParams channel_id = 'a6aa35d4b523498aab7227ed9510c138' # Replace with the ID for the desired live channel. class LiveChannel: def __init__(self): self.host = "https://services.uplynk.com" def run(self): """ Update a live channel. """ self._update_live_channel() def _update_live_channel(self): url = "{}{}{}".format(self.host, "/api/v4/channels/", channel_id) payload = { 'slicer_id': 'MyLiveSlicer3' } headers = {'Content-Type': 'application/json'} response = requests.patch( url, params=APIParams(APICredentials()).get_params({}), data=json.dumps(payload), headers=headers ) print(response.json()) LiveChannel().run()
Response:
{ '@id': '/channels/a6aa35d4b523498aab7227ed9510c138', '@type': 'Channel', 'id': 'a6aa35d4b523498aab7227ed9510c138', 'desc': 'My Live Channel', 'created': '2021-04-30T16:19:48.215Z', 'external_id': '', 'use_chsched': 2, 'ad_slate': '80292e78be6843fa8398827589748782', 'blackout_slate': '860cbd66462a43b799ce044e6045f63d', 'missing_content_slate': '48d8de0bdb0b4f2493310ad868525fb8', 'embed_domains': '', 'meta': {}, 'thumb_url': '', 'slicer_id': 'MyLiveSlicer3', 'hls_url': 'https://content.uplynk.com/channel/a6aa35d4b523498aab7227ed9510c138.m3u8', 'dash_url': 'https://content.uplynk.com/channel/a6aa35d4b523498aab7227ed9510c138.mpd', 'test_players': [{ 'desc': '5ExtMIB5AUzLtAAYvNF2NG', 'id': '5ExtMIB5AUzLtAAYvNF2NG', 'expire': None, 'params': '', 'whitelist': False, 'url': 'https://content.uplynk.com/player/5ExtMIB5AUzLtAAYvNF2NGsc.html', 'url_html5': 'https://content.uplynk.com/player5/5ExtMIB5AUzLtAAYvNF2NGsc.html' } ], 'embed_html5_player_url': 'https://content.uplynk.com/player5/32jMLROxrcW8JNFJNglmIVec.html', 'require_drm': 1, 'require_studio_drm': 0 }