Queries the details of an episode list.

Usage notes

You cannot use this operation on empty episode lists. For information about how to add episodes to an episode list, see AddShowIntoShowList.

QPS limit

You can send up to 10 requests per second to call this operation by using your Alibaba Cloud account. If the number of the calls per second exceeds the limit, throttling is triggered. This may affect your business. We recommend that you take note of the limit when you call this operation. For more information, 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 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 instance was created by calling the CreateCaster operation, check the value of the response parameter CasterId to obtain the instance ID.
  • If the instance was created in the ApsaraVideo Live console, obtain the instance 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 The value displayed in the Name column for an instance on the Production Studio Management page is the ID of the instance.

Response parameters

Parameter Type Example Description
RequestId String 16A96B9A-F203-4EC5-8E43-CB92E68F4CD8

The ID of the request.

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

Details of the episode list.

Show indicates the details of a specific episode. For more information, see the following Show table.

Show

Parameter

Type

Description

Example

ShowId

String

The ID of the episode.

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

Duration

String

The duration of the episode. Unit: seconds.

20

RepeatTimes

Integer

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.

5

ResourceInfo

Json

Detail about the resources.

See the following ResourceInfo table.

ShowName

String

The name of the episode.

liveShow****

ResourceInfo

Parameter

Type

Description

Example

ResourceType

String

The type of the resource.

vod

ResourceUrl

String

The URL of the resource.

http://**/atestObject**.m3u8

ResourceId

String

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

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

Examples

Sample requests

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

Sample success responses

XML format

<DescribeShowListResponse> 
  <RequestId>16A96B9A-F203-4EC5-8E43-CB92E68F4CD8</RequestId>
  <ShowList>
        <Shows>
              <ResourceInfo>
                    <resourceId>a2b8e671-2fe5-4642-a2ec-bf93880e****</resourceId>
                    <resourceUrl>http://**/atestObject**.m3u8</resourceUrl>
                    <resourceType>vod</resourceType>
              </ResourceInfo>
              <ShowId>a2b8e671-2fe5-4642-a2ec-bf93880e****</ShowId>
              <Duration>20</Duration>
              <RepeatTimes>5</RepeatTimes>
              <ShowName>liveShow****</ShowName>
        </Shows>
        <Shows>
              <ResourceInfo>
                    <resourceId>a2b8e671-2fe5-4642-a2ec-bf93880e****</resourceId>
                    <resourceUrl>http://**/atestObject**.m3u8</resourceUrl>
                    <resourceType>pic</resourceType>
              </ResourceInfo>
              <ShowId>a2b8e671-2fe5-4642-a2ec-bf93880e****</ShowId>
              <Duration>26</Duration>
              <ShowName>liveShow2****</ShowName>
        </Shows>
        <CurrentShowId>a2b8e671-2fe5-4642-a2ec-bf93880e****</CurrentShowId>
        <TotalShowListRepeatTimes>1</TotalShowListRepeatTimes>
        <ShowListRepeatTimes>0</ShowListRepeatTimes>
  </ShowList>
</DescribeShowListResponse>

JSON format

{
    "RequestId": "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8",
    "ShowList": {
        "Shows": [
            {
                "ResourceInfo": {
                    "resourceId": "a2b8e671-2fe5-4642-a2ec-bf93880e****",
                    "resourceUrl": "http://**/atestObject**.m3u8",
                    "resourceType": "vod"
                },
                "ShowId": "a2b8e671-2fe5-4642-a2ec-bf93880e****",
                "Duration": 20,
                "RepeatTimes": 5,
                "ShowName": "liveShow****"
            },
            {
                "ResourceInfo": {
                    "resourceId": "a2b8e671-2fe5-4642-a2ec-bf93880e****",
                    "resourceUrl": "http://**/atestObject**.m3u8",
                    "resourceType": "pic"
                },
                "ShowId": "a2b8e671-2fe5-4642-a2ec-bf93880e****",
                "Duration": 26,
                "ShowName": "liveShow2****"
            }
        ],
        "CurrentShowId": "a2b8e671-2fe5-4642-a2ec-bf93880e****",
        "TotalShowListRepeatTimes": 1,
        "ShowListRepeatTimes": 0
    }
}

Error codes

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

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("Query of the episode list is complete. Response parameters:" + 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 of 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);
        }
    }