Recherche les informations relatives aux ressources multimédias telles que les vidéos, les fichiers audio et les images générées par ApsaraVideo VOD. Vous pouvez utiliser cette opération avec le protocole de recherche de ressources multimédias pour effectuer des recherches multidimensionnelles dans ApsaraVideo VOD, notamment en spécifiant les champs de retour, la correspondance exacte, la correspondance approximative, les requêtes multi-valeurs, les requêtes par plage et les champs de tri.
Description de l'opération
Pour les champs qui prennent en charge la correspondance exacte et la correspondance approximative, lorsque d'autres méthodes de requête sont utilisées, les résultats renvoyés suivent la méthode de requête prise en charge par le champ. Par exemple, si un champ ne prend en charge que la correspondance approximative, les résultats obtenus via des requêtes multi-valeurs sont également basés sur la correspondance approximative.
Testez maintenant
Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale. Testez cette API dans OpenAPI Explorer, sans signature manuelle. Les appels réussis génèrent automatiquement du code SDK correspondant à vos paramètres. Téléchargez-le avec une sécurité intégrée des identifiants pour une utilisation locale.
Test
Autorisation RAM
|
vod:SearchMedia |
list |
*All Resource
|
Aucune | Aucune |
Paramètres de requête
|
Paramètre |
Type |
Requis |
Description |
Exemple |
| SearchType |
string |
Non |
Le type de ressource média à rechercher. Valeurs valides :
Remarque
Si ce paramètre est défini sur video ou audio et que vous devez parcourir toutes les données correspondant aux conditions de recherche, vous devez définir le paramètre ScrollToken. |
video |
| Fields |
string |
Non |
Les champs de ressources multimédias à renvoyer dans les résultats de recherche. Par défaut, seuls les champs de ressources multimédias de base sont renvoyés. Vous pouvez spécifier des champs de ressources multimédias supplémentaires à renvoyer. Pour plus d'informations, consultez Exemples d'utilisation. |
Title,CoverURL |
| Match |
string |
Non |
Les conditions de filtrage. Pour les règles de syntaxe, consultez Syntaxe du protocole de recherche. |
field = value |
| SortBy |
string |
Non |
Le champ de tri et l'ordre de tri. Séparez plusieurs valeurs par des virgules (,). Valeurs valides :
Remarque
|
CreationTime:Desc |
| PageNo |
integer |
Non |
Le numéro de page. Valeur par défaut : 1. Remarque
Si ce paramètre dépasse 200, définissez également le paramètre ScrollToken. |
1 |
| PageSize |
integer |
Non |
Le nombre d'enregistrements par page. Valeur par défaut : 10. Valeur maximale : 100. |
10 |
| ScrollToken |
string |
Non |
Le jeton de pagination. La valeur est une chaîne de 32 caractères. Vous n'avez pas besoin de définir ce paramètre pour la première requête de recherche. Lorsque la requête de recherche correspond à des données, le serveur renvoie la valeur de ce paramètre, qui enregistre la position actuelle des données de recherche. Notez la valeur renvoyée et définissez ce paramètre dans la requête de recherche suivante en fonction des exigences ou recommandations suivantes :
|
24e0fba7188fae707e146esa54**** |
Éléments de réponse
|
Élément |
Type |
Description |
Exemple |
|
object |
Les paramètres de réponse. |
||
| RequestId |
string |
L'identifiant de la requête. |
3E0CEF83-FB09-4E34-BA1451814B03**** |
| Total |
integer |
Le nombre total de ressources multimédias correspondant aux conditions de recherche. |
10 |
| ScrollToken |
string |
Le jeton de pagination. |
24e0fba7188fae707e146esa54**** |
| MediaList |
array<object> |
La liste des informations sur les ressources multimédias. |
|
|
array<object> |
Les détails de la ressource multimédia. |
||
| CreationTime |
string |
L'heure de création de la ressource multimédia. L'heure est au format yyyy-MM-ddTHH:mm:ssZ (UTC). |
2018-07-19T03:45:25Z |
| MediaType |
string |
Le type de média. Valeurs valides :
|
video |
| MediaId |
string |
L'identifiant du média. |
a82a2cd7d4e147bbed6c1ee372**** |
| Video |
object |
|
|
| Status |
string |
The status. Valid values:
|
UploadSucc |
| CreationTime |
string |
The time when the video information was created. The time is in the yyyy-MM-ddTHH:mm:ssZ format (UTC). |
2018-07-19T03:45:25Z |
| StorageLocation |
string |
The storage region. |
outin-bfefbb90a47c******163e1c7426.oss-cn-shanghai.aliyuncs.com |
| CateId |
integer |
The category ID. |
10000123 |
| Tags |
string |
The video tags. |
tag1 |
| ModificationTime |
string |
The time when the video information was last modified. The time is in the yyyy-MM-ddTHH:mm:ssZ format (UTC). |
2018-07-19T03:48:25Z |
| MediaSource |
string |
The source. Valid values:
|
general |
| Description |
string |
The video description. |
Alibaba Cloud VOD video description |
| AppId |
string |
The application ID. |
app-**** |
| CoverURL |
string |
The thumbnail URL. |
https://example.aliyundoc.com/image01.png |
| VideoId |
string |
The video ID. |
a82a2asdasqadaf3faa0ed6c1ee372**** |
| DownloadSwitch |
string |
The download switch. Offline download is allowed only when the switch is enabled. Valid values:
|
on |
| CateName |
string |
The category name. |
video1 |
| TranscodeMode |
string |
The transcoding mode. Valid values:
|
FastTranscode |
| PreprocessStatus |
string |
The preprocessing status. Valid values:
|
Preprocessing |
| RestoreExpiration |
string |
The expiration time of the media asset restoration. |
2023-03-30T10:14:14Z |
| RestoreStatus |
string |
The media asset restoration status. Valid values:
|
Success |
| StorageClass |
string |
The storage class of the media asset. Valid values:
|
Standard |
| Size |
integer |
The video size. |
123 |
| Duration |
number |
The video duration. Unit: seconds. |
123 |
| Title |
string |
The video title. |
Alibaba Cloud VOD Video Title |
| SpriteSnapshots |
array |
The list of sprites. |
|
|
string |
The list of sprites. |
{“http://example.aliyundoc.com/image02.jpg”} |
|
| Snapshots |
array |
The list of automatic snapshots. |
|
|
string |
The list of automatic snapshots. |
{“http://example.aliyundoc.com/image03.jpg”} |
|
| ReferenceId |
string |
The custom ID. Only lowercase letters, uppercase letters, digits, hyphens, and underscores are supported. The value must be 6 to 64 characters in length and is unique at the user level. |
123-123 |
| Audio |
object |
|
|
| Status |
string |
The status. Valid values:
|
Normal |
| CreationTime |
string |
The creation time. The time is in the yyyy-MM-ddTHH:mm:ssZ format (UTC). |
2018-07-19T03:45:25Z |
| StorageLocation |
string |
The storage region. |
outin-aaa*****aa.oss-cn-shanghai.aliyuncs.com |
| CateId |
integer |
The category ID. |
10000123 |
| Tags |
string |
The tags. |
tag1,tag2 |
| ModificationTime |
string |
The last modification time. The time is in the yyyy-MM-ddTHH:mm:ssZ format (UTC). |
2018-07-19T03:48:25Z |
| MediaSource |
string |
The source. Valid values:
|
general |
| Description |
string |
The description. |
Alibaba Cloud VOD Audio Description |
| AppId |
string |
The application ID. |
app-**** |
| CoverURL |
string |
The thumbnail URL. |
http://example.com/image04.jpg |
| AudioId |
string |
The audio ID. |
a82a2cd7d4e147bbed6c1ee372**** |
| DownloadSwitch |
string |
The download switch. Offline download is allowed only when the switch is enabled. Valid values:
|
on |
| CateName |
string |
The category name. |
cate1 |
| TranscodeMode |
string |
The transcoding mode. Valid values:
|
FastTranscode |
| PreprocessStatus |
string |
The preprocessing status. Only preprocessed videos can be used for live streaming. Valid values:
|
UnPreprocess |
| RestoreExpiration |
string |
The expiration time of the media asset restoration. |
2023-03-30T10:14:14Z |
| RestoreStatus |
string |
The media asset restoration status. Valid values:
|
Success |
| StorageClass |
string |
The storage class of the media asset. Valid values:
|
Standard |
| Size |
integer |
The size. |
123 |
| Duration |
number |
The duration. |
123 |
| Title |
string |
The title. |
Alibaba Cloud VOD Audio Title |
| SpriteSnapshots |
array |
The list of sprites. |
|
|
string |
The list of sprites. |
{“http://example.aliyundoc.com/image02.jpg”} |
|
| Snapshots |
array |
The list of automatic snapshots. |
|
|
string |
The list of automatic snapshots. |
{“http://example.aliyundoc.com/image03.jpg”} |
|
| ReferenceId |
string |
The custom ID. Only lowercase letters, uppercase letters, digits, hyphens, and underscores are supported. The value must be 6 to 64 characters in length and is unique at the user level. |
123-123 |
| Image |
object |
|
|
| StorageLocation |
string |
The storage region. |
outin-bfefbb90a47c******163e1c7426.oss-cn-shanghai.aliyuncs.com |
| CreationTime |
string |
The creation time. The time is in the yyyy-MM-ddTHH:mm:ssZ format (UTC). |
2018-07-19T03:45:25Z |
| Status |
string |
The image status. Valid values:
|
Uploading |
| CateId |
integer |
The category ID. |
1000123 |
| Tags |
string |
The tags. |
tag1 |
| ModificationTime |
string |
The last modification time. The time is in the yyyy-MM-ddTHH:mm:ssZ format (UTC). |
2018-07-19T03:48:25Z |
| CateName |
string |
The category name. |
cate1 |
| Description |
string |
The description. |
Alibaba Cloud VOD Image Description |
| AppId |
string |
The application ID. |
app-**** |
| URL |
string |
The image URL. |
https://example.com/****.png |
| Title |
string |
The title. |
Alibaba Cloud VOD Image Title |
| ImageId |
string |
The image ID. |
11130843741se99wqmoes**** |
| AttachedMedia |
object |
|
|
| CreationTime |
string |
The creation time. The time is in the yyyy-MM-ddTHH:mm:ssZ format (UTC). |
2018-07-19T03:45:25Z |
| Status |
string |
The status. Valid values:
|
Normal |
| StorageLocation |
string |
The storage region. |
outin-bfefbb90a47c11*****7426.oss-cn-shanghai.aliyuncs.com |
| Tags |
string |
The tags. |
tag1 |
| ModificationTime |
string |
The last modification time. The time is in the yyyy-MM-ddTHH:mm:ssZ format (UTC). |
2018-07-19T03:48:25Z |
| MediaId |
string |
The auxiliary media asset ID. |
a82a2cd7d4e147ba0ed6c1ee372**** |
| BusinessType |
string |
The business type. Valid values:
|
watermark |
| Description |
string |
The description. |
Alibaba Cloud VOD-assisted media asset description |
| AppId |
string |
The application ID. |
app-**** |
| URL |
string |
The auxiliary media asset URL. |
https://example.com/****.png |
| Title |
string |
The title. |
Alibaba Cloud VOD-assisted media asset Title |
| Categories |
array<object> |
The list of category IDs. |
|
|
object |
The category details. |
||
| ParentId |
integer |
The parent node ID. |
-1 |
| CateName |
string |
The category name. |
cate1 |
| CateId |
integer |
The category ID. |
10027394 |
| Level |
integer |
The category level. |
1 |
| AiData |
Les détails de l'IA. |
||
| AiRoughData |
Les données de synthèse IA. |
Exemples
JSON format
{
"RequestId": "3E0CEF83-FB09-4E34-BA1451814B03****",
"Total": 10,
"ScrollToken": "24e0fba7188fae707e146esa54****",
"MediaList": [
{
"CreationTime": "2018-07-19T03:45:25Z",
"MediaType": "video",
"MediaId": "a82a2cd7d4e147bbed6c1ee372****",
"Video": {
"Status": "UploadSucc",
"CreationTime": "2018-07-19T03:45:25Z",
"StorageLocation": "outin-bfefbb90a47c******163e1c7426.oss-cn-shanghai.aliyuncs.com",
"CateId": 10000123,
"Tags": "tag1",
"ModificationTime": "2018-07-19T03:48:25Z",
"MediaSource": "general",
"Description": "Alibaba Cloud VOD video description",
"AppId": "app-****",
"CoverURL": "https://example.aliyundoc.com/image01.png",
"VideoId": "a82a2asdasqadaf3faa0ed6c1ee372****",
"DownloadSwitch": "on",
"CateName": "video1",
"TranscodeMode": "FastTranscode",
"PreprocessStatus": "Preprocessing",
"RestoreExpiration": "2023-03-30T10:14:14Z",
"RestoreStatus": "Success",
"StorageClass": "Standard",
"Size": 123,
"Duration": 123,
"Title": "Alibaba Cloud VOD Video Title",
"SpriteSnapshots": [
"{“http://example.aliyundoc.com/image02.jpg”}"
],
"Snapshots": [
"{“http://example.aliyundoc.com/image03.jpg”}"
],
"ReferenceId": "123-123"
},
"Audio": {
"Status": "Normal",
"CreationTime": "2018-07-19T03:45:25Z",
"StorageLocation": "outin-aaa*****aa.oss-cn-shanghai.aliyuncs.com",
"CateId": 10000123,
"Tags": "tag1,tag2",
"ModificationTime": "2018-07-19T03:48:25Z",
"MediaSource": "general",
"Description": "Alibaba Cloud VOD Audio Description",
"AppId": "app-****",
"CoverURL": "http://example.com/image04.jpg",
"AudioId": "a82a2cd7d4e147bbed6c1ee372****",
"DownloadSwitch": "on",
"CateName": "cate1",
"TranscodeMode": "FastTranscode",
"PreprocessStatus": "UnPreprocess",
"RestoreExpiration": "2023-03-30T10:14:14Z",
"RestoreStatus": "Success",
"StorageClass": "Standard",
"Size": 123,
"Duration": 123,
"Title": "Alibaba Cloud VOD Audio Title",
"SpriteSnapshots": [
"{“http://example.aliyundoc.com/image02.jpg”}"
],
"Snapshots": [
"{“http://example.aliyundoc.com/image03.jpg”}"
],
"ReferenceId": "123-123"
},
"Image": {
"StorageLocation": "outin-bfefbb90a47c******163e1c7426.oss-cn-shanghai.aliyuncs.com",
"CreationTime": "2018-07-19T03:45:25Z",
"Status": "Uploading",
"CateId": 1000123,
"Tags": "tag1",
"ModificationTime": "2018-07-19T03:48:25Z",
"CateName": "cate1",
"Description": "Alibaba Cloud VOD Image Description",
"AppId": "app-****",
"URL": "https://example.com/****.png",
"Title": "Alibaba Cloud VOD Image Title",
"ImageId": "11130843741se99wqmoes****"
},
"AttachedMedia": {
"CreationTime": "2018-07-19T03:45:25Z",
"Status": "Normal",
"StorageLocation": "outin-bfefbb90a47c11*****7426.oss-cn-shanghai.aliyuncs.com",
"Tags": "tag1",
"ModificationTime": "2018-07-19T03:48:25Z",
"MediaId": "a82a2cd7d4e147ba0ed6c1ee372****",
"BusinessType": "watermark",
"Description": "Alibaba Cloud VOD-assisted media asset description",
"AppId": "app-****",
"URL": "https://example.com/****.png",
"Title": "Alibaba Cloud VOD-assisted media asset Title",
"Categories": [
{
"ParentId": -1,
"CateName": "cate1",
"CateId": 10027394,
"Level": 1
}
]
}
}
]
}
Codes d'erreur
Consultez Codes d'erreur pour la liste complète.
Notes de version
Consultez Notes de version pour la liste complète.