All Products
Search
Document Center

ApsaraVideo Live:DescribeShowList

Last Updated:Apr 30, 2024

Queries the details of an episode list.

Usage notes

You cannot call this operation on empty episode lists. For information about how to add episodes to an 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 Name column.

Response parameters

Parameter

Type

Example

Description

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.

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

The request ID.

ShowListInfo Object

The information about the episode list.

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.
TotalShowListRepeatTimes Integer 1

The number of additional times the episode list is played.

ShowListRepeatTimes Integer 0

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

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

The ID of the episode that is playing.

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.
ShowList Array of Show

The episodes in the episode list.

Show
ShowName String liveShow****

The name of the episode.

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.

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

The ID of the episode.

ResourceInfo Object

The resource information.

LiveInputType Integer 1

The custom type label.

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

The URL of the resource.

ResourceType String vod

The type of the resource.

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

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

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

JSON format

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

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

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);
        }
    }