文档

ListMediaBasicInfos - 列出媒资基础信息

更新时间:

根据用户所给参数,返回所有符合条件的媒资的基础信息。

接口说明

如果 includeFileBasicInfo 字段为真,也返回源文件基础信息,例如:时长、文件大小,最多筛选符合条件的前 100 条。所有符合条件的媒资需要精确匹配所有非空字段。支持精确匹配的字段有媒资媒体类型、来源、媒资业务类型、分类、资源状态。当一次性无法返回所有信息时,用户可使用 nextToken 进行下一轮查询。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
ice:ListMediaBasicInfos
  • 全部资源
    *

请求参数

名称类型必填描述示例值
StartTimestring

utcCreated(创建时间)的开始时间。

- 为开区间(大于开始时间)。

- 日期格式按照 ISO8601 标准表示,使用 UTC 时间。格式为:"YYYY-MM-DD'T'hh:mm:ss'Z'"。例如:2017-01-11T12:00:00Z 表示北京时间 2017 年 1 月 11 日 20 点 0 分 0 秒。

2020-12-20T12:00:00Z
EndTimestring

utcCreated 的结束时间。

- 为闭区间(小于等于结束时间)。

- 日期格式按照 ISO8601 标准表示,使用 UTC 时间。格式为:"YYYY-MM-DD'T'hh:mm:ss'Z'"。例如:2017-01-11T12:00:00Z 表示北京时间 2017 年 1 月 11 日 20 点 0 分 0 秒。

2020-12-20T13:00:00Z
MediaTypestring

媒资媒体类型。取值范围:

- "image" 图片

- "video" 视频

- "audio" 音频

- "text" 文字

video
BusinessTypestring

媒资业务类型。取值范围:

- "subtitles" 字幕

- "watermark" 水印

- "opening" 片头/开场

- "ending" 片尾

- "general" 通用

opening
Sourcestring

来源,

- "oss" OSS 存储

- "vod" 视频点播

- "live" 视频直播

- "general" 其他来源(默认)

oss
Statusstring

资源状态。取值范围:

- Init(初始状态:源文件未就绪)

- Preparing(源文件准备中:比如上传中或者剪辑合成中)

- PrepareFail(源文件准备失败:比如获取源文件信息失败)

- Normal(正常:源文件已就绪)

Normal
NextTokenstring

用来表示当前调用返回读取到的位置,空代表数据已经读取完毕。

pSa1SQ0wCe5pzVrQ6mWZEw==
MaxResultsinteger

本次请求所返回的最大记录条数。

最大值:100,默认值:10

5
SortBystring

根据 utcCreated 排序, 默认倒序

- "desc" 倒序

- "asc" 正序

desc
IncludeFileBasicInfoboolean

如果为 true,返回值中包含文件基础信息。

true
MediaIdstring

媒资 ID

****019b82e24b37a1c2958dec38****

返回参数

名称类型描述示例值
object

Schema of Response

RequestIdstring

请求 ID

******B7-7F87-4792-BFE9-63CD21******
TotalCountlong

本次请求条件下的数据总量

4
MediaInfosobject []

符合要求的媒资集合

MediaIdstring

媒资 ID

****019b82e24b37a1c2958dec38****
MediaBasicInfoobject

BasicInfo

MediaIdstring

媒资 ID

****019b82e24b37a1c2958dec38****
InputURLstring

待注册的媒资在相应系统中的地址

https://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4
MediaTypestring

媒资媒体类型

video
BusinessTypestring

媒资业务类型

opening
Sourcestring

来源

oss
Titlestring

标题

title标题
Descriptionstring

内容描述

desc 描述
Categorystring

分类

分类 category
MediaTagsstring

标签

tags,tags2
CoverURLstring

封面地址

http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>
UserDatastring

用户数据

userData
Snapshotsstring

截图

[{"bucket":"example-bucket","count":"3","iceJobId":"******f48f0e4154976b2b8c45******","location":"oss-cn-beijing","snapshotRegular":"example.jpg","templateId":"******e6a6440b29eb60bd7c******"}]
Statusstring

资源状态

Normal
TranscodeStatusstring

转码状态

Init
CreateTimestring

媒资创建时间

2021-01-08T16:52:04Z
ModifiedTimestring

媒资修改时间

2021-01-08T16:52:07Z
DeletedTimestring

媒资删除时间

2021-01-08T16:52:07Z
SpriteImagesstring

雪碧图

[{"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"}]
CateIdlong

分类 ID

3049
Bizstring

媒资所属业务

ICE
UploadSourcestring

媒资上传来源

general
ReferenceIdstring

自定义 ID,仅支持小写字母、大写字母、数字、横线、下划线,长度 6-64 位。用户维度唯一。

123-123
FileInfoListobject []

FileInfos

FileBasicInfoobject

文件基础信息,包含时长,大小等

FileNamestring

文件名

example.mp4
FileStatusstring

文件状态

Normal
FileTypestring

文件类型

source_file
FileSizestring

文件大小(字节)

14340962
FileUrlstring

文件 OSS 地址

http://example-bucket.oss-cn-shanghai.aliyuncs.com/example2.mp4?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>
Regionstring

文件存储区域

cn-shanghai
FormatNamestring

封装格式

mov,mp4,m4a,3gp,3g2,mj2
Durationstring

时长

60.00000
Bitratestring

码率

1912.13
Widthstring

1280
Heightstring

720
CreateTimestring

文件创建时间

2021-01-08T16:52:04Z
ModifiedTimestring

文件修改时间

2021-01-08T16:52:07Z
NextTokenstring

用来表示当前调用返回读取到的位置,空代表数据已经读取完毕

8EqYpQbZ6Eh7+Zz8DxVYoQ==
MaxResultsinteger

本次请求所返回的最大记录条数

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=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>",
        "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=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>",
            "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
}

错误码

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2021-03-31OpenAPI 返回结构发生变更看变更集
变更项变更内容
出参OpenAPI 返回结构发生变更
  • 本页导读 (1)
文档反馈