All Products
Search
Document Center

Intelligent Media Services:BatchGetMediaInfos

Last Updated:Dec 16, 2024

Queries the information about multiple media assets at a time based on media asset IDs.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ice:BatchGetMediaInfos
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
MediaIdsstringNo

The IDs of the media assets that you want to query. Separate the IDs with commas (,).

******b48fb04483915d4f2cd8******,******c48fb37407365d4f2cd8******
AdditionTypestringNo

The additional information that you want to query about the media assets. By default, only BasicInfo is returned. The following additional information can be queried:

- FileInfo

- DynamicMetaData

FileInfo,DynamicMetaData

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

******11-DB8D-4A9A-875B-275798******
MediaInfosarray<object>

The queried media assets.

MediaInfoobject
MediaIdstring

The ID of the media asset.

******c48fb37407365d4f2cd8******
MediaBasicInfoobject

The basic information of the media asset.

MediaIdstring

MediaId

******c48fb37407365d4f2cd8******
InputURLstring

The URL of the media asset in another service.

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

The type of the media asset. Valid values:

- image

- video

- audio

- text

video
BusinessTypestring

The business type of the media asset.

general
Sourcestring

The source of the media asset. Valid values:

- oss

- vod

oss
Titlestring

The title of the media asset.

Descriptionstring

The description of the media asset.

Categorystring

The category of the media asset.

MediaTagsstring

The tags of the media asset.

CoverURLstring

The thumbnail URL of the media asset.

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

The user data.

userDataTest
Snapshotsstring

The snapshots of the media asset.

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

The status of the media asset.

Normal
TranscodeStatusstring

The transcoding status of the media asset.

Init
CreateTimestring

The time when the media asset was created.

2020-12-26T04:11:10Z
ModifiedTimestring

The time when the media asset was last modified.

2020-12-26T04:11:12Z
DeletedTimestring

The time when the media asset was deleted.

2020-12-26T04:11:10Z
SpriteImagesstring

The sprite.

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

FileInfos

FileInfoobject
FileBasicInfoobject

The basic information of the file, including the duration and size.

FileNamestring

The file name.

example
FileStatusstring

The file status.

Normal
FileTypestring

The file type.

source_file
FileSizestring

The file size. Unit: bytes.

30611502
FileUrlstring

The Object Storage Service (OSS) URL of the file.

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

The region in which the file resides.

cn-shanghai
FormatNamestring

The container format.

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

The duration.

200
Bitratestring

The bitrate.

1132.68
Widthstring

The width.

1920
Heightstring

The height.

1080

Examples

Sample success responses

JSONformat

{
  "RequestId": "******11-DB8D-4A9A-875B-275798******",
  "MediaInfos": [
    {
      "MediaId": "******c48fb37407365d4f2cd8******",
      "MediaBasicInfo": {
        "MediaId": "******c48fb37407365d4f2cd8******",
        "InputURL": "https://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4",
        "MediaType": "video",
        "BusinessType": "general",
        "Source": "oss",
        "Title": "",
        "Description": "",
        "Category": "",
        "MediaTags": "",
        "CoverURL": "http://example-bucket.oss-cn-shanghai.aliyuncs.com/example.png?Expires=<ExpireTime>&OSSAccessKeyId=<OSSAccessKeyId>&Signature=<Signature>&security-token=<SecurityToken>",
        "UserData": "userDataTest",
        "Snapshots": "[{\"bucket\":\"example-bucket\",\"count\":\"3\",\"iceJobId\":\"******f48f0e4154976b2b8c45******\",\"location\":\"oss-cn-beijing\",\"snapshotRegular\":\"example.jpg\",\"templateId\":\"******e6a6440b29eb60bd7c******\"}]",
        "Status": "Normal",
        "TranscodeStatus": "Init",
        "CreateTime": "2020-12-26T04:11:10Z",
        "ModifiedTime": "2020-12-26T04:11:12Z",
        "DeletedTime": "2020-12-26T04:11:10Z",
        "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\"}]"
      },
      "FileInfoList": [
        {
          "FileBasicInfo": {
            "FileName": "example",
            "FileStatus": "Normal",
            "FileType": "source_file",
            "FileSize": "30611502",
            "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": "200",
            "Bitrate": "1132.68",
            "Width": "1920",
            "Height": "1080"
          }
        }
      ]
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history