You can search for and sort media asset information of videos, audio, and images in the media library. This topic describes how to search for media asset information in the console or by using API operations or SDKs. This topic also describes the limits of the two search methods and provides an example on how to search for media asset information by calling API operations.
ApsaraVideo VOD provides the following two methods to search for media asset information:
Limits on pagination
To avoid performance problems caused by deep pagination, the SearchMedia operation returns only part of the data that meets the search conditions. To obtain more data or even list all data, you must use the
SessionId pagination identification parameters.
Pagination parameters such as
PageSizeare used to obtain some data without passing the
SessionIdparameters. You can obtain the first 5,000 data records one time.
To obtain more data or list all data, you must use the
PageSizepagination parameters and the
SessionIdpagination identification parameters. Make sure that the number of data records on pages between the current page number and the required page number does not exceed 1,200. When you go to the page specified by the required page number, you can obtain the next 1,200 data records. You can use your judgement to search for data until all data is obtained. You can obtain data in multiple segments based on the pagination identification parameters. However, you can obtain a maximum of 1,200 data records in each segment.
The following section uses video information search in the example to describe the search statement.
Before you send a request, you must perform URL encoding on the request parameters.
The equal signs (=), double quotation marks ("), single quotation marks ('), and parentheses used in the statement must be single-byte characters.
By default, the SearchMedia operation returns only basic media asset information. To obtain more media asset information, you must set the
Search for media asset information whose value of
Search for media asset information where
Search for media asset information whose
Use an open and closed interval to indicate a range. Search for media asset information whose
If only the left or right boundary exists, leave the other boundary empty. Search for media asset information whose
Sort media asset information in reverse chronological order based on the creation time: