全部產品
Search
文件中心

Intelligent Media Services:ListMediaBasicInfos - 列出媒資基礎資訊

更新時間:Apr 10, 2026

根據使用者所給參數,返回所有合格媒資的基礎資訊。

介面說明

  • 如果 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" ApsaraVideo for VOD

  • "live" ApsaraVideo for 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

分類別識別碼。

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
}

錯誤碼

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情