Adds an episode list to a production studio.

Usage note

This operation is only applicable to the production studio whose NormType is set to 0 (the playlist mode) when you call the CreateCaster operation.

QPS limit

A single user can perform a maximum of 10 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 AddCasterProgram

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

CasterId String Yes 3463f576-ff9e-4807-be32-b95d5bad****

The ID of the production studio. It is included in the response when you call the CreateCaster operation.

RegionId String No cn-shanghai

The ID of the region.

Episode.N.EpisodeType String No Resource

The type of episode N.

  • Resource: a video resource.
  • Component: a component.
Episode.N.EpisodeName String No program_name_1

The name of episode N.

Episode.N.ResourceId String No a2b8e671-2fe5-4642-a2ec-bf93880e****

The ID of the video resource.

  • This parameter takes effect and is required only when the Episode.N.EpisodeType parameter is set to Resource.
  • If the Episode.N.EpisodeType parameter is set to Component, this parameter is invalid.
Episode.N.ComponentId.N RepeatList No [ "a2b8e671-2fe5-4642-a2ec-bf931826****", "a2b8e671-2fe5-4642-a2ec-28374657****"]

The ID of component N. 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 Episode.N.EpisodeType parameter is set to Component.
  • This parameter is optional when the Episode.N.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.
Episode.N.StartTime String No 2016-06-29T09:00:00Z

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

Episode.N.EndTime String No 2016-06-29T10:02:00Z

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

Episode.N.SwitchType String No 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. This parameter must be set to TimeFirst when the video resource is a live stream.
  • ContentFirst: The episode starts and ends as scheduled.

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

Note

The variable N in request parameter names indicates the sequence number of the episode. Examples:

The Episode.N.EpisodeName parameter specifies the name of episode N. The Episode.1.EpisodeName parameter specifies the name of the first episode. The Episode.2.EpisodeName parameter specifies the name of the second episode.

Response parameters

Parameter Type Example Description
EpisodeIds Array of EpisodeId

The IDs of the episodes that were added. The episode IDs are listed in the same order as specified by the variable N.

EpisodeId
EpisodeId String [ "16A96B9A-F203-4EC5-8E43-CB92E68F****", "16A96B9A-F203-4EC5-8E43-CB92E688****" ]

The ID of the episode. 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=AddCasterProgram
&CasterId=a2b3463f576-ff9e-4807-be32-b95d5bad****
&<Common request parameters>

Sample success responses

XML format

<AddCasterProgramResponse>
  <EpisodeIds>
        <EpisodeId>
              <EpisodeId>["bb9f1234-40fa-48c3-ac7a-e2e132c9****"]</EpisodeId>
        </EpisodeId>
  </EpisodeIds>
  <RequestId>44A7CD26-FFAF-4964-BF38-B3567C2C431A</RequestId>
</AddCasterProgramResponse>

JSON format

{
    "EpisodeIds": {
        "EpisodeId": [
            {
                "EpisodeId": ["bb9f1234-40fa-48c3-ac7a-e2e132c9****"]
            }
        ]
    },
    "RequestId": "44A7CD26-FFAF-4964-BF38-B3567C2C431A"
}

Error codes

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