根据用户所给参数,返回所有符合条件的媒资的基础信息。
接口说明
-
如果 includeFileBasicInfo 字段为真,还会返回源文件基础信息,例如:时长、文件大小。
-
最多筛选符合条件的前 100 条。
-
所有符合条件的媒资需要精确匹配所有非空字段。支持精确匹配的字段有媒资媒体类型、来源、媒资业务类型、分类、资源状态。
-
当一次性无法返回所有信息时,用户可使用 nextToken 进行下一轮查询。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ice:ListMediaBasicInfos |
get |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| StartTime |
string |
否 |
utcCreated(创建时间)的开始时间。
|
2020-12-20T12:00:00Z |
| EndTime |
string |
否 |
utcCreated 的结束时间。
|
2020-12-20T13:00:00Z |
| MediaType |
string |
否 |
媒资媒体类型。取值范围:
|
video |
| BusinessType |
string |
否 |
媒资业务类型。取值范围:
|
opening |
| Source |
string |
否 |
来源。
|
oss |
| Status |
string |
否 |
资源状态。取值范围:
|
Normal |
| NextToken |
string |
否 |
用来表示当前调用返回读取到的位置,空代表数据已经读取完毕。 |
pSa1SQ0wCe5pzVrQ6mWZEw== |
| MaxResults |
integer |
否 |
本次请求所返回的最大记录条数。 最大值:100,默认值:10 |
5 |
| SortBy |
string |
否 |
根据 utcCreated 排序, 默认倒序
|
desc |
| IncludeFileBasicInfo |
boolean |
否 |
如果为 true,返回值中包含文件基础信息。 |
true |
| MediaId |
string |
否 |
媒资 ID。 |
****019b82e24b37a1c2958dec38**** |
| AuthTimeout |
integer |
否 |
鉴权过期时间,单位:秒。
|
30 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
请求 ID。 |
******B7-7F87-4792-BFE9-63CD21****** |
| TotalCount |
integer |
本次请求条件下的数据总量。 |
4 |
| MediaInfos |
array<object> |
符合要求的媒资集合。 |
|
|
array<object> |
媒资信息。 |
||
| MediaId |
string |
媒资 ID。 |
****019b82e24b37a1c2958dec38**** |
| MediaBasicInfo |
object |
媒资基础信息。 |
|
| MediaId |
string |
媒资 ID。 |
****019b82e24b37a1c2958dec38**** |
| InputURL |
string |
待注册的媒资在相应系统中的地址。 |
https://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4 |
| MediaType |
string |
媒资媒体类型。 |
video |
| BusinessType |
string |
媒资业务类型。 |
opening |
| Source |
string |
来源。 |
oss |
| Title |
string |
标题。 |
title标题 |
| Description |
string |
内容描述。 |
desc 描述 |
| Category |
string |
分类。 |
分类 category |
| MediaTags |
string |
标签。 |
tags,tags2 |
| CoverURL |
string |
封面地址。 |
http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires= |
| UserData |
string |
用户数据。 |
userData |
| Snapshots |
string |
截图。 |
[{"bucket":"example-bucket","count":"3","iceJobId":"******f48f0e4154976b2b8c45******","location":"oss-cn-beijing","snapshotRegular":"example.jpg","templateId":"******e6a6440b29eb60bd7c******"}] |
| Status |
string |
资源状态。 |
Normal |
| TranscodeStatus |
string |
转码状态。 |
Init |
| CreateTime |
string |
媒资创建时间。 |
2021-01-08T16:52:04Z |
| ModifiedTime |
string |
媒资修改时间。 |
2021-01-08T16:52:07Z |
| DeletedTime |
string |
媒资删除时间。 |
2021-01-08T16:52:07Z |
| SpriteImages |
string |
雪碧图。 |
[{"bucket":"example-bucket","count":"32","iceJobId":"******83ec44d58b2069def2e******","location":"oss-cn-shanghai","snapshotRegular":"example/example-{Count}.jpg","spriteRegular":"example/example-{TileCount}.jpg","templateId":"******e438b14ff39293eaec25******","tileCount":"1"}] |
| CateId |
integer |
分类 ID。 |
3049 |
| Biz |
string |
媒资所属业务。 |
ICE |
| UploadSource |
string |
媒资上传来源。 |
general |
| ReferenceId |
string |
自定义 ID,仅支持小写字母、大写字母、数字、横线、下划线,长度 6-64 位。用户维度唯一。 |
123-123 |
| FileInfoList |
array<object> |
文件信息列表。 |
|
|
array<object> |
文件信息。 |
||
| FileBasicInfo |
object |
文件基础信息,包含时长,大小等。 |
|
| FileName |
string |
文件名。 |
example.mp4 |
| FileStatus |
string |
文件状态。 |
Normal |
| FileType |
string |
文件类型。 |
source_file |
| FileSize |
string |
文件大小(字节)。 |
14340962 |
| FileUrl |
string |
文件 OSS 地址。 |
http://example-bucket.oss-cn-shanghai.aliyuncs.com/example2.mp4?Expires= |
| Region |
string |
文件存储区域。 |
cn-shanghai |
| FormatName |
string |
封装格式。 |
mov,mp4,m4a,3gp,3g2,mj2 |
| Duration |
string |
时长。 |
60.00000 |
| Bitrate |
string |
码率。 |
1912.13 |
| Width |
string |
宽。 |
1280 |
| Height |
string |
高。 |
720 |
| CreateTime |
string |
文件创建时间。 |
2021-01-08T16:52:04Z |
| ModifiedTime |
string |
文件修改时间。 |
2021-01-08T16:52:07Z |
| NextToken |
string |
用来表示当前调用返回读取到的位置,空代表数据已经读取完毕。 |
8EqYpQbZ6Eh7+Zz8DxVYoQ== |
| MaxResults |
integer |
本次请求所返回的最大记录条数。 |
2 |
示例
正常返回示例
JSON格式
{
"RequestId": "******B7-7F87-4792-BFE9-63CD21******",
"TotalCount": 4,
"MediaInfos": [
{
"MediaId": "****019b82e24b37a1c2958dec38****",
"MediaBasicInfo": {
"MediaId": "****019b82e24b37a1c2958dec38****",
"InputURL": "https://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4",
"MediaType": "video",
"BusinessType": "opening",
"Source": "oss",
"Title": "title标题",
"Description": "desc 描述",
"Category": "分类 category",
"MediaTags": "tags,tags2",
"CoverURL": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires=&OSSAccessKeyId=&Signature=&security-token=",
"UserData": "userData",
"Snapshots": "[{\"bucket\":\"example-bucket\",\"count\":\"3\",\"iceJobId\":\"******f48f0e4154976b2b8c45******\",\"location\":\"oss-cn-beijing\",\"snapshotRegular\":\"example.jpg\",\"templateId\":\"******e6a6440b29eb60bd7c******\"}]",
"Status": "Normal",
"TranscodeStatus": "Init",
"CreateTime": "2021-01-08T16:52:04Z",
"ModifiedTime": "2021-01-08T16:52:07Z",
"DeletedTime": "2021-01-08T16:52:07Z",
"SpriteImages": "[{\"bucket\":\"example-bucket\",\"count\":\"32\",\"iceJobId\":\"******83ec44d58b2069def2e******\",\"location\":\"oss-cn-shanghai\",\"snapshotRegular\":\"example/example-{Count}.jpg\",\"spriteRegular\":\"example/example-{TileCount}.jpg\",\"templateId\":\"******e438b14ff39293eaec25******\",\"tileCount\":\"1\"}]",
"CateId": 3049,
"Biz": "ICE",
"UploadSource": "general",
"ReferenceId": "123-123"
},
"FileInfoList": [
{
"FileBasicInfo": {
"FileName": "example.mp4",
"FileStatus": "Normal",
"FileType": "source_file",
"FileSize": "14340962",
"FileUrl": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example2.mp4?Expires=&OSSAccessKeyId=&Signature=&security-token=",
"Region": "cn-shanghai",
"FormatName": "mov,mp4,m4a,3gp,3g2,mj2",
"Duration": "60.00000",
"Bitrate": "1912.13",
"Width": "1280",
"Height": "720",
"CreateTime": "2021-01-08T16:52:04Z",
"ModifiedTime": "2021-01-08T16:52:07Z"
}
}
]
}
],
"NextToken": "8EqYpQbZ6Eh7+Zz8DxVYoQ==",
"MaxResults": 2
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。