Update Slicing Schedule

Updates a Live Slicer's slicing schedule.

Request syntax:

/api2/slicer/schedule/update

Pass the following request parameters:

Request ParameterTypeDescription
schedule RequiredListContains schedule entries that will replace either: All Schedule Entries: Replace the entire schedule by excluding the update_start and update_end parameters from the request. Schedule Entries within a Time Period: Replace all entries within a specific time period by defining the update_start and update_end parameters.
slicer_id RequiredStringIdentifies the desired Live Slicer by its ID.
update_endStringIdentifies a frame accurate position by date and time. Only schedule entries that start before this position may be replaced. The time zone for this parameter is defined by the utc_offset parameter. Syntax: yyyy-mm-dd hh:mm:ss;ff
update_startStringIdentifies a frame accurate position by date and time. Only schedule entries that start after this position may be replaced. The time zone for this parameter is defined by the utc_offset parameter. Syntax: yyyy-mm-dd hh:mm:ss;ff
utc_offset RequiredIntegerIdentifies the UTC offset for dates and times defined within this schedule. Syntax: ±Offset Example: -8
wallclockIntegerRequires Slicer version 21070801 or higher Determines how the Live Slicer tracks time when interpreting the start_timecode parameter. Valid values are: 0: The Live Slicer will trigger a scheduled start or stop action upon encountering the corresponding timecode within the video. 1: The Live Slicer will trigger a scheduled start or stop action according to local system time. If our service detects your server's local time is off by more than 5 minutes, then we will use our server's system time instead. Older versions (i.e., 21061600 or lower) of the Live Slicer always use the default behavior. Default value: 0

schedule List

schedule is a list of objects with the following attributes:

AttributesTypeDescription
break_type RequiredStringValid values are: blackout content_start pod_end pod_start replace_content replace_pod
date RequiredStringIdentifies the date for the timecode parameter. The time zone for this parameter is defined by the utc_offset parameter. Syntax: yyyy-mm-dd
durationFloatRequired for replace_pod and replace_content Identifies the duration, in seconds, for the replacement operation.
external_idStringcontent_start Only Assigns an external ID to a new asset.
metaObjectcontent_start Only Assigns metadata to a new asset.
replacementsListRequired for replace_content A list of replacement content to be substituted. Learn more (Live Slicer API - replace_content).
timecode RequiredStringIdentifies a timecode that finds the frame accurate position for the schedule entry. hh:mm:ss;ff
titleStringRequired for content_start Sets the title/description for the new asset.

Sample request/response (start_time):

The Call() function, which is imported from uplynk_api2_auth module, prepares the message body and digital signature.

from uplynk_api2_auth import Call

print(Call('/api2/slicer/schedule/update', slicer_id='slicer123', utc_offset=-8, schedule=[{"date":"2019-03-13", "timecode":"11:22:33;04", "break_type":"content_start", "title":"The Show II", "external_id":"ts2", "meta":{"episode":38}}]))

{
	"schedule": [{
			"date": "2019-03-13",
			"timecode": "11:22:33;04",
			"break_type": "content_start",
			"title": "The Show II",
			"external_id": "ts2",
			"meta": {
				"episode": 38
			}
		}
	],
	"error": 0
}

Sample request/response (replace_pod):

The Call() function, which is imported from uplynk_api2_auth module, prepares the message body and digital signature.

from uplynk_api2_auth import Call

print(Call('/api2/slicer/schedule/update', slicer_id='slicer123', utc_offset=-8, schedule=[{"date":"2019-03-13", "timecode":"11:22:33;04", "break_type":"replace_pod", "duration":61.3}]))

{
	"schedule": [{
			"date": "2019-03-13",
			"timecode": "11:22:33;04",
			"break_type": "replace_pod",
			"duration": 61.3
		}
	],
	"error": 0
}