Get All Live Channels

Retrieves all of your live channels.

Request

Request syntax:

GET /channels

Response

The response for a successful request contains the following properties:

NameData TypeDescription
@idStringIndicates the relative path to the requested endpoint.
@typeStringReturns Collection.
itemsList of dictionariesContains a list of live channels.
total_itemsIntegerIndicates the total number of live channels.

items List

The items list describes each live channel via the following properties:

NameData TypeDescription
@idStringIndicates the relative path to an endpoint that returns this live channel.
@typeStringReturns Channel.
createdStringIndicates the timestamp (UTC) at which the live channel was created. Syntax (ISO 8601): YYYY-MM-DDThh:mm:ss.sssZ
descStringIndicates the live channel's name.
external_idStringIndicates the live channel's external ID.
idStringIdentifies this live channel by its system-defined ID.
slicer_idStringIndicates 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_urlStringIndicates the URL to a live channel's thumbnail preview image.
use_chschedIntegerIndicates 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'
}