All Products
Search
Document Center

ApsaraVideo Live:DescribeShowList

更新時間:Aug 12, 2024

Queries the details of the episode list.

Usage notes

You cannot call this operation if the episode list is empty. For information about how to add episodes to the episode list, see AddShowIntoShowList.

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 DescribeShowList

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

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.

Response parameters

Parameter

Type

Example

Description

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

The request ID.

ShowList String ShowList[Show1, Show2, Show3...]

Details of the episode list.

Show indicates the information about a specific episode. For more information, see the Show parameter.

ShowListInfo Object

The information about the episode list.

CurrentShowId String a2b8e671-2fe5-4642-a2ec-bf93880e****

The ID of the episode that is playing.

Background String {\"MaterialId\":\"a2b8e671-2fe5-4642-a2ec-bf93880e****\",\"resourceType\":\"VOD\"}

The background of the episode list.

HighPriorityShowId String a2b8e671-2fe5-4642-a2ec-bf93880e****

The episode of the highest priority.

Note You can configure this parameter only before the episode list starts playing.
HighPriorityShowStartTime String 2021-11-23T12:30:00

The time at which the episode of the highest priority is played. Format: yyyy-MM-dd'T'HH:mm:ss.

Note You can configure this parameter only before the episode list starts playing. After you configure this parameter, when the specified point in time is reached, any episode that is playing stops and the episode of the highest priority in the episode list starts to play.
ShowList Array of Show

The episodes in the episode list.

Show
Duration Long 20

The duration of the episode. Unit: seconds.

RepeatTimes Integer 5

The number of times the episode repeats after the first playback is complete.

For example, if you set the value to 0, the episode is to be played once. If you set the value to 1, the episode is to be played twice.

ResourceInfo Object

The resource information.

LiveInputType Integer 1

The custom type label.

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

The ID of the video-on-demand (VOD) file.

ResourceType String vod

The type of the resource.

ResourceUrl String http://**/atestObject**.m3u8

The URL of the resource.

ShowId String a2b8e671-2fe5-4642-a2ec-bf93880e****

The ID of the episode.

ShowName String liveShow****

The name of the episode.

ShowListRepeatTimes Integer 0

The number of additional times the episode list is played by default. The value is 0.

TotalShowListRepeatTimes Integer 1

The number of times the episode list is played.

Examples

Sample requests

http(s)://live.aliyuncs.com/?Action=DescribeShowList
&CasterId=LIVEPRODUCER_POST-cn-0pp1czt****
&<Common request parameters>

Sample success responses

XML format

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

<DescribeShowListResponse>
    <RequestId>16A96B9A-F203-4EC5-8E43-CB92E68F4CD8</RequestId>
    <ShowList>ShowList[Show1, Show2, Show3...]</ShowList>
    <ShowListInfo>
        <CurrentShowId>a2b8e671-2fe5-4642-a2ec-bf93880e****</CurrentShowId>
        <Background>{\"MaterialId\":\"a2b8e671-2fe5-4642-a2ec-bf93880e****\",\"resourceType\":\"VOD\"}</Background>
        <HighPriorityShowId>a2b8e671-2fe5-4642-a2ec-bf93880e****</HighPriorityShowId>
        <HighPriorityShowStartTime>2021-11-23T12:30:00</HighPriorityShowStartTime>
        <ShowList>
            <Duration>20</Duration>
            <RepeatTimes>5</RepeatTimes>
            <ResourceInfo>
                <LiveInputType>1</LiveInputType>
                <ResourceId>a2b8e671-2fe5-4642-a2ec-bf93880e****</ResourceId>
                <ResourceType>vod</ResourceType>
                <ResourceUrl>http://**/atestObject**.m3u8</ResourceUrl>
            </ResourceInfo>
            <ShowId>a2b8e671-2fe5-4642-a2ec-bf93880e****</ShowId>
            <ShowName>liveShow****</ShowName>
        </ShowList>
        <ShowListRepeatTimes>0</ShowListRepeatTimes>
        <TotalShowListRepeatTimes>1</TotalShowListRepeatTimes>
    </ShowListInfo>
</DescribeShowListResponse>

JSON format

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

{
  "RequestId" : "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8",
  "ShowList" : "ShowList[Show1, Show2, Show3...]",
  "ShowListInfo" : {
    "CurrentShowId" : "a2b8e671-2fe5-4642-a2ec-bf93880e****",
    "Background" : "{\\\"MaterialId\\\":\\\"a2b8e671-2fe5-4642-a2ec-bf93880e****\\\",\\\"resourceType\\\":\\\"VOD\\\"}",
    "HighPriorityShowId" : "a2b8e671-2fe5-4642-a2ec-bf93880e****",
    "HighPriorityShowStartTime" : "2021-11-23T12:30:00",
    "ShowList" : [ {
      "Duration" : 20,
      "RepeatTimes" : 5,
      "ResourceInfo" : {
        "LiveInputType" : 1,
        "ResourceId" : "a2b8e671-2fe5-4642-a2ec-bf93880e****",
        "ResourceType" : "vod",
        "ResourceUrl" : "http://**/atestObject**.m3u8"
      },
      "ShowId" : "a2b8e671-2fe5-4642-a2ec-bf93880e****",
      "ShowName" : "liveShow****"
    } ],
    "ShowListRepeatTimes" : 0,
    "TotalShowListRepeatTimes" : 1
  }
}

Error codes

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

Sample code

 public static DefaultAcsClient initClient(String accessKeyId, String accessKeySecret) throws ClientException {
        String regionId = "cn-shanghai";  
        DefaultProfile profile = DefaultProfile.getProfile(regionId, accessKeyId, accessKeySecret);
        DefaultAcsClient client = new DefaultAcsClient(profile);
        return client;
    }
private static CommonResponse describeShowList(DefaultAcsClient client, String casterId) throws ClientException {
        CommonRequest describeShowListRequest = new CommonRequest();
        describeShowListRequest.setSysDomain("live.aliyuncs.com");
        describeShowListRequest.setSysVersion("2016-11-01");
        describeShowListRequest.setSysAction("DescribeShowList");
        if (casterId != null) {
            describeShowListRequest.putQueryParameter("CasterId", casterId);
        }
        CommonResponse describeShowListRequestResponse = client.getCommonResponse(describeShowListRequest);
        System.out.println("The episode list is queried. Response: " + JSON.toJSONString(describeShowListRequestResponse));
        return describeShowListRequestResponse;
    }
public void describeShowList() throws ClientException {
        DefaultAcsClient client = initClient(ACCESS_KEY_ID, ACCESS_KEY_SECRET);
        CommonResponse describeShowListResponse = describeShowList(client, testCasterId);
        String data = describeShowListResponse.getData();
        JSONObject jsonObject = JSON.parseObject(data);
        JSONObject showList = jsonObject.getJSONObject("ShowList");
        JSONArray shows = showList.getJSONArray("Shows");
        // Parse the information about the episode list.
        for (int i = 0; i < shows.size(); i++) {
            JSONObject show = (JSONObject) shows.get(i);
            String showId = show.getString("ShowId");
            String resourceType = show.getString("ResourceType");
            String resourceInfo = show.getString("ResourceInfo");
            Integer repeatTimes = show.getInteger("RepeatTimes");
            Long duration = show.getLong("Duration");
            String showInfo = String.format("show%d: showId: %s \n resourceType: %s  \n  resourceInfo: %s \n RepeatTimes: %d \n Duration: %d",
                    i + 1, showId, resourceType, resourceInfo, repeatTimes, duration);
            System.out.println(showInfo);
        }
    }