v4
Retrieves all of your live channels.
Request
Request syntax:
GET /channels
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
The code below (Python 3) shows how to retrieve all of your live channels.
This code imports names from the api_auth
module for V4 APIs (see below).
🦉
API Auth for Classic Authentication (V4 APIs)
Open Recipe
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"
}