Adds an episode to a production studio.

Usage note

The production studio to which the episode is added must have been created. For how, see CreateCaster.

QPS limit

A single user can perform a maximum of 4 queries per second (QPS). Throttling is triggered when the number of calls per second exceeds the QPS limit. The throttling may affect your business. Thus, we recommend that you observe the QPS limit on this operation. For more information about what a single user means and the QPS details, see QPS limit on an API operation in ApsaraVideo Live.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes AddCasterEpisode

The operation that you want to perform. Set the value to AddCasterEpisode.

CasterId String Yes 9ff2d96b-37ef-40a3-8cb0-4c7b1e2e****

The ID of the production studio.

If you create a production studio through the CreateCaster interface, check the value of the CasterId parameter in the response.

If you create a production studio through the ApsaraVideo Live Console, log in to the console, then check the ID of the production studio through the following path:

Production Studios > Production Studio Management

Note The CasterId is reflected in the Name column on the Production Studio Management page.
EndTime String Yes 2016-06-29T09:10:00Z

The time when the episode ends. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

EpisodeType String Yes Resource

The type of the episode. Valid values:

  • Resource: a video resource.
  • Component: a component.
StartTime String Yes 2016-06-29T08:00:00Z

The time when the episode starts. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

SwitchType String Yes TimeFirst

The policy for switching episodes. Valid values:

  • TimeFirst: The episode starts when the preceding episode ends and ends when the next episode starts. If no next episode exists, the episode keeps repeating until a new episode is added or the production studio stops.
  • ContentFirst: The episode starts and ends as scheduled.

This parameter takes effect only when the EpisodeType parameter is set to Resource.

Note This parameter must be set to TimeFirst when the video resource is a live stream.
RegionId String No cn-shanghai

The ID of the region.

EpisodeName String No episode_1

The name of the episode.

ResourceId String No a2b8e671-2fe5-4642-a2ec-bf93880e****

The ID of the video resource. It is included in the response when you call the AddCasterVideoResource operation.

This parameter takes effect and is required only when the EpisodeType parameter is set to Resource.

ComponentId.N RepeatList No ["a2b8e671-2fe5-4642-a2ec-bf93880e****"]

The ID of the component. It is included in the response when you call the AddCasterComponent operation. Components in the production studio are listed from the bottom to the top in an array.

  • This parameter takes effect and is required when the EpisodeType parameter is set to Component.
  • This parameter is optional when the EpisodeType parameter is set to Resource. In this case, if this parameter is specified, the components are bound with and switched together with video resources.
Note The variable N indicates the sequence number of the component. For example, the ComponentId.1 parameter specifies the ID of the first component. The ComponentId.2 parameter specifies the ID of the second component.

Response parameters

Parameter Type Example Description
EpisodeId String 21926b36-7dd2-4fde-ae25-51b5bc8e****

The ID of the episode that was added. Record the ID as it can be used to manage the episode being added.

RequestId String 16A96B9A-F203-4EC5-8E43-CB92E68F4CD8

The ID of the request.

Examples

Sample requests

http(s)://live.aliyuncs.com/?Action=AddCasterEpisode
&CasterId=9ff2d96b-37ef-40a3-8cb0-4c7b1e2e****
&EndTime=2016-06-29T09:10:00Z
&EpisodeType=Resource
&StartTime=2016-06-29T08:00:00Z
&SwitchType=TimeFirst
&<Common request parameters>

Sample success responses

XML format

<AddCasterEpisodeResponse>
      <RequestId>16A96B9A-F203-4EC5-8E43-CB92E68F4CD8</RequestId>
      <EpisodeId>21926b36-7dd2-4fde-ae25-51b5bc8e****</EpisodeId>
</AddCasterEpisodeResponse>

JSON format

{
    "RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8",
    "EpisodeId": "21926b36-7dd2-4fde-ae25-51b5bc8e52d8"
}

Error codes

For a list of error codes, visit the API Error Center.