Live Channel API

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:

Base URL

Use the following base URL:

https://services.uplynk.com/api/v4

Add Live Channel

Creates a live channel.

Request

Request syntax:

POST /channels

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:

  • 1: Disabled
  • 2: Enabled

A live channel's support for schedule entries is determined upon its creation. After which, you may not modify this property.

Default value: 

1

Authentication

Pass a digital signature based off of msg.

Learn more.

Response

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.

  • Enabled (use_chsched = 2): This property has undergone end-of-life and therefore will not be included in the response.
  • Disabled (use_chsched = 1): Indicates the ID of the Live Slicer that is currently overriding the live channel's source as a result of the /api2/channel/override endpoint.

    This property returns an empty string when the live channel's source is not being overridden by a different Live Slicer.

require_drm

Integer

Indicates whether playback requires a digital signature. Valid values are:

  • 0: Digital signatures are ignored.
  • 1: Playback requests require a digital signature.

require_studio_drm

Integer

Indicates whether Studio DRM will be enforced on this live channel. Valid values are:

  • 0: Disabled.
  • 1: Studio DRM is enforced on all playback requests for this live channel.

slicer_id

String

Indicates the live channel's Live Slicer by its case-sensitive ID. This property returns no_slicer when a Live Slicer has not been assigned to the live channel.

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:

  • 1: Disabled
  • 2: Enabled

A live channel's support for schedule entries is determined upon its creation. After which, you may not modify this property.

override Dictionary

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

Learn more.

type

String

Returns slicer when a live channel's source is being manually overridden.

test_players List

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.

Sample Request/Response

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
}	

Delete Live Channel

Deletes a live channel.

Request

Request syntax:

DELETE /channels/Live Channel ID

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

Live Channel ID

Required

Identifies a live channel by its system-defined ID.

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 Channel.

message

String

Returns Deleted when the specified live channel has been successfully deleted.

Sample Request/Response

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'
}

Get All Live Channels

Retrieves all of your live channels.

Request

Request syntax:

GET /channels

Authentication

Pass a digital signature based off of msg.

Learn more.

Response

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.

items List

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. This property returns no_slicer when a Live Slicer has not been assigned to the live channel.

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:

  • 1: Disabled
  • 2: Enabled

A live channel's support for schedule entries is determined upon its creation. After which, you may not modify this property.

Sample Request/Response

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'
}

Get Live Channel

Retrieves a live channel.

Request

Request syntax:

GET /channels/Live Channel ID

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

Live Channel ID

Required

Identifies a live channel by its system-defined ID.

Authentication

Pass a digital signature based off of msg.

Learn more.

Response

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.

  • Enabled (use_chsched = 2): This property has undergone end-of-life and therefore will not be included in the response.
  • Disabled (use_chsched = 1): Indicates the ID of the Live Slicer that is currently overriding the live channel's source as a result of the /api2/channel/override endpoint.

    This property returns an empty string when the live channel's source is not being overridden by a different Live Slicer.

require_drm

Integer

Indicates whether playback requires a digital signature. Valid values are:

  • 0: Digital signatures are ignored.
  • 1: Playback requests require a digital signature.

require_studio_drm

Integer

Indicates whether Studio DRM will be enforced on this live channel. Valid values are:

  • 0: Disabled.
  • 1: Studio DRM is enforced on all playback requests for this live channel.

slicer_id

String

Indicates the live channel's Live Slicer by its case-sensitive ID. This property returns no_slicer when a Live Slicer has not been assigned to the live channel.

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:

  • 1: Disabled
  • 2: Enabled

A live channel's support for schedule entries is determined upon its creation. After which, you may not modify this property.

override Dictionary

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

Learn more.

type

String

Returns slicer when a live channel's source is being manually overridden.

test_players List

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.

Sample Request/Response

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
}	

Update Live Channel

Updates a specific live channel.

Request

Request syntax:

PATCH /channels/Live Channel ID

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

Live Channel ID

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:

  • 0: Digital signatures are ignored.
  • 1: Playback requests require a digital signature.

require_studio_drm

Integer

Determines whether Studio DRM will be enforced on this live channel. Valid values are:

  • 0: Disabled.
  • 1: Studio DRM is enforced on all playback requests for this live channel.

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.

override Dictionary

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.

test_players List

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.

Authentication

Pass a digital signature based off of msg.

Learn more.

Response

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.

  • Enabled (use_chsched = 2): This property has undergone end-of-life and therefore will not be included in the response.
  • Disabled (use_chsched = 1): Indicates the ID of the Live Slicer that is currently overriding the live channel's source as a result of the /api2/channel/override endpoint.

    This property returns an empty string when the live channel's source is not being overridden by a different Live Slicer.

require_drm

Integer

Indicates whether playback requires a digital signature. Valid values are:

  • 0: Digital signatures are ignored.
  • 1: Playback requests require a digital signature.

require_studio_drm

Integer

Indicates whether Studio DRM will be enforced on this live channel. Valid values are:

  • 0: Disabled.
  • 1: Studio DRM is enforced on all playback requests for this live channel.

slicer_id

String

Indicates the live channel's Live Slicer by its case-sensitive ID. This property returns no_slicer when a Live Slicer has not been assigned to the live channel.

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:

  • 1: Disabled
  • 2: Enabled

A live channel's support for schedule entries is determined upon its creation. After which, you may not modify this property.

override Dictionary

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

Learn more.

type

String

Returns slicer when a live channel's source is being manually overridden.

test_players List

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.

Sample Request/Response

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
}	

More Information