Retrieves a specific schedule entry.
Information describing a scheduled entry is retained for 30 days after its end time.
You may not use this endpoint to retrieve placeholder schedule entries.
Request
Request syntax:
GET /channels/Live Channel ID/schedules/ID
Request syntax for a deleted schedule entry:
GET /channels/Live Channel ID/schedules/ID?include_deleted=1
Define the following variables 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. |
ID Required | Identifies a schedule entry by either its system-defined or external ID. Use the Get Multiple Schedule Entries endpoint to retrieve schedule entries and their IDs. |
By default, attempting to retrieve a deleted schedule entry returns a 404 Not Found. Pass include_deleted=1 to retrieve data for a deleted schedule entry. The deleted response property is included for deleted schedule entries.
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 schedule entry. You may not retrieve placeholder schedule entries by ID since they do not actually exist. Our system returns an invalid endpoint for placeholder schedule entries that starts with empty-. | |||
@type | String | Returns Schedule. | |||
ad_breaks | List of integers | Indicates the duration for each ad break associated with the asset. | |||
content_id | String | content_type: asset or slicer Identifies an asset by its system-defined ID or a Live Slicer by the ID defined within the SlicerID setting of its Live Slicer configuration file. | |||
content_owner | String | content_type: slicer Only Identifies the user that owns the scheduled Live Slicer by its system-defined ID. This property is only returned for Live Slicers that belong to another user. | |||
content_type | String | Indicates whether the schedule entry points to an asset, ad break, or Live Slicer, or previously scheduled content. Valid values are: ad | asset | slicer | replay_source |
created | String | Indicates the timestamp (UTC) at which the schedule entry was created. Syntax (ISO 8601): YYYY-MM-DDThh:mm:ss.sssZ | |||
deleted | String | include_deleted=1 Only Indicates the timestamp (UTC) at which the schedule entry was deleted. Syntax (ISO 8601): YYYY-MM-DDThh:mm:ss.sssZ | |||
desc | String | Indicates the schedule entry's description. If the schedule entry does not have a description, then this property's value varies by the type of schedule entry. Asset: Indicates the name assigned to the asset. Ad Break: Returns Ad Break. * Slicer: Returns an empty string. Schedule entries created through the CMS are not assigned a description. | |||
dur | Integer | Indicates the schedule entry's duration in milliseconds. | |||
end | String | Indicates the schedule entry's end time (UTC). Syntax (ISO 8601): YYYY-MM-DDThh:mm:ss.sssZ | |||
external_id | String | Indicates a schedule entry's custom ID. | |||
id | String | Identifies a schedule entry by its system-defined ID. | |||
lastmod | String | Indicates the timestamp (UTC) at which the schedule entry was last modified. Syntax (ISO 8601): YYYY-MM-DDThh:mm:ss.sssZ | |||
offset | Integer | Indicates playback offset in milliseconds. Playback offset occurs when an asset or ad break is scheduled to start in the past. Example: An offset value of 60000 is reported when an asset is scheduled for a minute in the past. For example, scheduling an asset for 11:00 AM when the current time is 11:01 AM generates an offset value of 60000. | |||
owner | String | Indicates the system-defined ID for the user that owns the live channel associated with this schedule entry. | |||
replaced_by | String | Indicates the system-defined ID for the schedule entry that overwrote the current schedule entry. | |||
replay_source | String | content_type only Specifies the time frame of the content that should be played. Required values for replay_source as content_type: content_id, content_type, desc, dur, replay_source_start, replay_source_end. | |||
replay_source_end | String | content_type: replay_source only Specifies the time (UTC) the content should stop playing. Syntax (ISO 8601): YYYY-MM-DDThh:mm:ss.sssZ | |||
replay_source_start | String | content_type: replay_source only Specifies the time (UTC) the content should begin playing. Syntax (ISO 8601): YYYY-MM-DDThh:mm:ss.sssZ | |||
start | String | Indicates the schedule entry's start time (UTC). Syntax (ISO 8601): YYYY-MM-DDThh:mm:ss.sssZ | |||
type | String | Indicates the type of schedule entry. Valid values are: Time: Identifies an actual schedule entry. Empty: Identifies a placeholder schedule entry that identifies a gap in the schedule. |
Sample Request/Response
Call the get_schedule_entry module (Python 3) to retrieve a specific schedule entry. This module imports names from the api_auth module.
import requests
from api_auth import APICredentials, APIParams
channel_id = 'Hak3zjnPLSW5o0j8GMpzRMsa' # Replace with the ID for the desired live channel.
schedule_id = '2158c7452b7841158972e019a5bd5f12' # Replace with the ID for the desired schedule entry.
class ScheduleEntry:
def __init__(self):
self.host = "https://services.uplynk.com"
def run(self):
self._get_schedule_entry()
def _get_schedule_entry(self):
url = "{}{}{}{}{}".format(self.host, "/api/v4/channels/", channel_id, "/schedules/", schedule_id)
headers = {'Content-Type': 'application/json'}
response = requests.get(
url, params=APIParams(APICredentials()).get_params({}), headers=headers
)
print(response.json())
ScheduleEntry().run()
Response:
{
'@id': '/channels/Hak3zjnPLSW5o0j8GMpzRMsa/schedules/2158c7452b7841158972e019a5bd5f12',
'@type': 'Schedule',
'created': '2021-02-16T00:57:10.402Z',
'lastmod': '2021-02-16T00:57:10.402Z',
'id': '2158c7452b7841158972e019a5bd5f12',
'owner': 'ab533864a92b46a1a286cdd49b0a9bd3',
'content_id': 'ae071e89574248c2ab179fe73d436c3e',
'content_type': 'asset',
'desc': 'Sports Segment',
'dur': 2343598,
'external_id': '',
'start': '2021-02-16T00:57:10.402Z',
'end': '2021-02-16T01:36:14.000Z',
'type': 'Time',
'ad_breaks': []
}