ListMediaBasicInfos - 列出媒资基础信息

更新时间:
复制为 MD 格式

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

接口说明

  • 如果 includeFileBasicInfo 字段为真,还会返回源文件基础信息,例如:时长、文件大小。

  • 最多筛选符合条件的前 100 条。

  • 所有符合条件的媒资需要精确匹配所有非空字段。支持精确匹配的字段有媒资媒体类型、来源、媒资业务类型、分类、资源状态。

  • 当一次性无法返回所有信息时,用户可使用 nextToken 进行下一轮查询。

调试

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

调试

授权信息

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

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

ice:ListMediaBasicInfos

get

*全部资源

*

请求参数

名称

类型

必填

描述

示例值

StartTime

string

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

EndTime

string

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

MediaType

string

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

  • "image" 图片

  • "video" 视频

  • "audio" 音频

  • "text" 文字

video

BusinessType

string

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

  • "subtitles" 字幕

  • "watermark" 水印

  • "opening" 片头/开场

  • "ending" 片尾

  • "general" 通用

opening

Source

string

来源。

  • "oss" OSS 存储

  • "vod" 视频点播

  • "live" 视频直播

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

oss

Status

string

资源状态。取值范围:

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

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

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

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

Normal

NextToken

string

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

pSa1SQ0wCe5pzVrQ6mWZEw==

MaxResults

integer

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

最大值:100,默认值:10

5

SortBy

string

根据 utcCreated 排序, 默认倒序

  • "desc" 倒序

  • "asc" 正序

desc

IncludeFileBasicInfo

boolean

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

true

MediaId

string

媒资 ID。

****019b82e24b37a1c2958dec38****

AuthTimeout

integer

鉴权过期时间,单位:秒。

  • 最小值:1。

  • 最大值:86400。

  • 默认值:3600。

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=&OSSAccessKeyId=&Signature=&security-token=

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=&OSSAccessKeyId=&Signature=&security-token=

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
}

错误码

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

变更历史

更多信息,参考变更详情