All Products
Search
Document Center

ApsaraVideo Live:AddCasterProgram

更新時間:Jun 05, 2024

Adds an episode list to a production studio.

Usage notes

Create a production studio, add video resources to the production studio, and then call this operation to add an episode list to the production studio. This operation supports videos and components as episodes. For information about how to create a production studio, see CreateCaster.

QPS limit

You can call this operation up to 10 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limits.

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.

Episode.N.ComponentId.N String No [ "a2b8e671-2fe5-4642-a2ec-bf931826****", "a2b8e671-2fe5-4642-a2ec-28374657****"]

The components. Components in the production studio are listed from the bottom to the top in an array.

Important This parameter takes effect and is required when you set the Episode.N.EpisodeType parameter to Component.

If you set the Episode.N.EpisodeType parameter to Resource, the components are bound to and switched together with video resources.

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

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

Episode.N.EpisodeName String No program_name_1

The name of the episode.

Episode.N.EpisodeType String No Resource

The type of the episode.

  • Resource: a video resource If you set this parameter to Resource, you must also set the Episode.N.ResourceId and Episode.N.SwitchType parameters.
  • Component: a component If you set this parameter to Component, you must also set the Episode.N.ComponentId.N parameter.
Episode.N.ResourceId String No a2b8e671-2fe5-4642-a2ec-bf93880e****

The ID of the video resource.

Important This parameter takes effect and is required when you set the Episode.N.EpisodeType parameter to Resource.

This parameter is invalid if you set the Episode.N.EpisodeType parameter to Component.

If the video resource was added by calling the AddCasterVideoResource operation, check the value of the response parameter ResourceId to obtain the ID.

Episode.N.StartTime String No 2016-06-29T09:00:00Z

The start time of the episode. 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:

Important This parameter is valid only when you set the Episode.N.EpisodeType parameter to Resource.
  • 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 value is required for live video resources.
  • ContentFirst: The episode starts and ends as scheduled.
CasterId String Yes LIVEPRODUCER_POST-cn-0pp1czt****

The ID of the production studio.

  • If the production studio was created by calling the CreateCaster operation, check the value of the response parameter CasterId to obtain the ID.
  • If the production studio was created by using the ApsaraVideo Live console, obtain the ID on the Production Studio Management page. To go to the page, log on to the ApsaraVideo Live console and click Production Studios in the left-side navigation pane.
Note You can find the ID of the production studio in the Instance ID/Name column.

Note

N in the preceding request parameters indicates the sequence number. For example,

Episode.N.EpisodeName specifies the name of episode N. For example, Episode.1.EpisodeName specifies the name of the first episode, and Episode.2.EpisodeName specifies the name of the second episode.

Response parameters

Parameter

Type

Example

Description

EpisodeIds Array of EpisodeId

The IDs of the episodes. 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. You can specify the ID in a request to modify the episode list in the production studio, query episodes in the episode list, delete the episode list, or modify the episode.

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

The request ID.

Examples

Sample requests

http(s)://live.aliyuncs.com/?Action=AddCasterProgram
&CasterId=a2b8e671-2fe5-4642-a2ec-bf93880e****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<AddCasterProgramResponse>
    <EpisodeIds>
        <EpisodeId>[ "16A96B9A-F203-4EC5-8E43-CB92E68F****", "16A96B9A-F203-4EC5-8E43-CB92E688****" ]</EpisodeId>
    </EpisodeIds>
    <RequestId>16A96B9A-F203-4EC5-8E43-CB92E68F4CD8</RequestId>
</AddCasterProgramResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "EpisodeIds" : [ {
    "EpisodeId" : "[ \"16A96B9A-F203-4EC5-8E43-CB92E68F****\", \"16A96B9A-F203-4EC5-8E43-CB92E688****\" ]"
  } ],
  "RequestId" : "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}

Error codes

For a list of error codes, see Service error codes.