全部产品

列出符合条件的公共素材库媒资基础信息

本文为您介绍列出符合条件的公共素材库媒资基础信息API的请求参数与示例。

描述

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

说明

媒资A的标签为"sticker-gif",媒资B的标签为"sticker-gif,aliyun",入参mediaTagsId为"sticker-gif"时,本接口会返回媒资A和B的基础元数据。

请求参数

字段名称

类型

必填项

示例值

描述

Action

String

ListPublicMediaBasicInfos

系统规定参数。取值:ListPublicMediaBasicInfos

MediaTagId

String

desc

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

取值:

  • sticker-atmosphere

  • sticker-bubble

  • sticker-cute

  • sticker-daily

  • sticker-expression

NextToken

String

pSa1SQ0wCe5pzVrQ6mWZEw==

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

MaxResults

Integer

5

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

最大值:100,默认值:10

IncludeFileBasicInfo

Boolean

否,默认false

true

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

返回参数

字段名称

类型

描述

RequestId

String

请求ID

MediaInfos

MediaInfo[]

媒资信息,默认仅包含媒资基础元数据MediaBasicInfo。当IncludeFileBasicInfo为真时,也返回源文件基础信息FileBasicInfo

NextToken

String

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

MaxResults

Integer

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

TotalCount

Integer

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

请求示例

http://ice.cn-shanghai.aliyuncs.com/?Action=ListPublicMediaBasicInfos
&MediaTagId=sticker-daily
&MaxResults=2
&IncludeFileBasicInfo=true
&<公共参数>

返回示例

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