根据用户提供的单个标签mediaTagId,返回标签中包含此mediaTagId的所有媒资的基础元数据,最多筛选符合条件的前100条。当一次性无法返回所有信息时,用户可使用nextToken进行下一轮查询。

调试

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

请求参数

名称 类型 是否必选 示例值 描述
Action String ListPublicMediaBasicInfos

系统规定参数。取值:ListPublicMediaBasicInfos

MediaTagId String ticker-atmosphere

媒资标签,根据此mediaTagId进行匹配,返回所有包含此标签的媒资.

取值:

-sticker-atmosphere

-sticker-bubble

-sticker-cute

-sticker-daily

-sticker-expression

NextToken String pSa1SQ0wCe5pzVrQ6mWZEw==

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

MaxResults Integer 5

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

最大值:100,默认值:10

IncludeFileBasicInfo Boolean true

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

返回数据

名称 类型 示例值 描述
RequestId String ******B7-7F87-4792-BFE9-63CD21******

请求ID

TotalCount Long 2

符合要求的媒资总数

MediaInfos Array of MediaInfo

符合要求的媒资集合

MediaId String ****019b82e24b37a1c2958dec38****

媒资ID

MediaBasicInfo Object

BasicInfo

MediaId String ****019b82e24b37a1c2958dec38****

MediaId

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

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

MediaType String video

媒资媒体类型

BusinessType String general

媒资业务类型

Source String oss

来源

Title String title标题

标题

Description String description

内容描述

Category String video

分类

MediaTags String sticker-daily

标签

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

封面地址

UserData String userData

用户数据

Snapshots String null

截图

Status String Normal

资源状态

TranscodeStatus String Init

转码状态

CreateTime String 2021-01-08T16:52:04Z

媒资创建时间

ModifiedTime String 2021-01-08T16:52:04Z

媒资修改时间

DeletedTime String 2021-01-08T16:52:04Z

媒资删除时间

FileInfoList Array of FileInfo

FileInfos

FileBasicInfo Object

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

FileName String example.mp4

文件名

FileStatus String Normal

文件状态

FileType String source_file

文件类型

FileSize String 338990717

文件大小(字节)

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

文件oss地址

Region String cn-shanghai

文件存储区域

FormatName String mov,mp4,m4a,3gp,3g2,mj2

封装格式

Duration String 10.040000

时长

Bitrate String 270112.12

码率

Width String 1920

Height String 1080

NextToken String 8EqYpQbZ6Eh7+Zz8DxVYoQ==

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

MaxResults Integer 2

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

示例

请求示例

http(s)://[Endpoint]/?Action=ListPublicMediaBasicInfos
&MediaTagId=ticker-atmosphere
&NextToken=pSa1SQ0wCe5pzVrQ6mWZEw==
&MaxResults=5
&IncludeFileBasicInfo=true
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<ListPublicMediaBasicInfosResponse>
    <RequestId>B45F83B7-7F87-4792-BFE9-63CD2137CAF0</RequestId>
    <TotalCount>2</TotalCount>
    <MediaInfos>
        <MediaId>****019b82e24b37a1c2958dec38****</MediaId>
        <MediaBasicInfo>
            <MediaId>****019b82e24b37a1c2958dec38****</MediaId>
            <InputURL>https://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4</InputURL>
            <MediaType>video</MediaType>
            <BusinessType>general</BusinessType>
            <Source>oss</Source>
            <Title>title标题</Title>
            <Description>description</Description>
            <Category>video</Category>
            <MediaTags>sticker-daily</MediaTags>
            <CoverURL>http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires=&lt;ExpireTime&gt;&amp;OSSAccessKeyId=&lt;OSSAccessKeyId&gt;&amp;Signature=&lt;Signature&gt;&amp;security-token=&lt;SecurityToken&gt;</CoverURL>
            <UserData>userData</UserData>
            <Snapshots>null</Snapshots>
            <Status>Normal</Status>
            <TranscodeStatus>Init</TranscodeStatus>
            <CreateTime>2021-01-08T16:52:04Z</CreateTime>
            <ModifiedTime>2021-01-08T16:52:04Z</ModifiedTime>
            <DeletedTime>2021-01-08T16:52:04Z</DeletedTime>
        </MediaBasicInfo>
        <FileInfoList>
            <FileBasicInfo>
                <FileName>example.mp4</FileName>
                <FileStatus>Normal</FileStatus>
                <FileType>source_file</FileType>
                <FileSize>338990717</FileSize>
                <FileUrl>http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4?Expires=&lt;ExpireTime&gt;&amp;OSSAccessKeyId=&lt;OSSAccessKeyId&gt;&amp;Signature=&lt;Signature&gt;&amp;security-token=&lt;SecurityToken&gt;</FileUrl>
                <Region>cn-shanghai</Region>
                <FormatName>mov,mp4,m4a,3gp,3g2,mj2</FormatName>
                <Duration>10.040000</Duration>
                <Bitrate>270112.12</Bitrate>
                <Width>1920</Width>
                <Height>1080</Height>
            </FileBasicInfo>
        </FileInfoList>
    </MediaInfos>
    <NextToken>8EqYpQbZ6Eh7+Zz8DxVYoQ==</NextToken>
    <MaxResults>2</MaxResults>
</ListPublicMediaBasicInfosResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "B45F83B7-7F87-4792-BFE9-63CD2137CAF0",
  "TotalCount" : 2,
  "MediaInfos" : [ {
    "MediaId" : "****019b82e24b37a1c2958dec38****",
    "MediaBasicInfo" : {
      "MediaId" : "****019b82e24b37a1c2958dec38****",
      "InputURL" : "https://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4",
      "MediaType" : "video",
      "BusinessType" : "general",
      "Source" : "oss",
      "Title" : "title标题",
      "Description" : "description",
      "Category" : "video",
      "MediaTags" : "sticker-daily",
      "CoverURL" : "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>",
      "UserData" : "userData",
      "Snapshots" : "null",
      "Status" : "Normal",
      "TranscodeStatus" : "Init",
      "CreateTime" : "2021-01-08T16:52:04Z",
      "ModifiedTime" : "2021-01-08T16:52:04Z",
      "DeletedTime" : "2021-01-08T16:52:04Z"
    },
    "FileInfoList" : [ {
      "FileBasicInfo" : {
        "FileName" : "example.mp4",
        "FileStatus" : "Normal",
        "FileType" : "source_file",
        "FileSize" : "338990717",
        "FileUrl" : "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>",
        "Region" : "cn-shanghai",
        "FormatName" : "mov,mp4,m4a,3gp,3g2,mj2",
        "Duration" : "10.040000",
        "Bitrate" : "270112.12",
        "Width" : "1920",
        "Height" : "1080"
      }
    } ]
  } ],
  "NextToken" : "8EqYpQbZ6Eh7+Zz8DxVYoQ==",
  "MaxResults" : 2
}

错误码

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

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