All Products
Search
Document Center

ApsaraVideo VOD:GetImageInfos

Last Updated:May 11, 2024

Queries the basic information about multiple images at a time.

Operation description

You can call this operation to query the basic information about multiple images at a time, such as the image title, type, creation time, tags, and URL.

Limits

You can call this operation up to 10 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limit on an API operation in ApsaraVideo Live.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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
vod:GetImageInfosList
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ImageIdsstringYes

The image IDs. Separate multiple IDs with commas (,). You can specify a maximum of 20 image IDs. You can use one of the following methods to obtain the image ID:

  • Log on to the ApsaraVideo VOD console and choose Media Files > Images in the left-side navigation pane. This method is applicable to images that are uploaded by using the ApsaraVideo VOD console.
  • Obtain the value of ImageId from the response to the CreateUploadImage operation that you call to obtain the upload URL and credential.
  • Obtain the value of ImageId from the response to the SearchMedia operation after you upload images.
bbc65bba53fed90de118a7849****,594228cdd14b4d069fc17a8c4a****
AuthTimeoutlongNo

The time when the image URL expires. Unit: seconds.

  • If the OutputType parameter is set to cdn:

    • This parameter takes effect only if URL authentication is enabled. Otherwise, the image URL does not expire.
    • Minimum value: 1.
    • Maximum value: unlimited.
    • Default value: The default validity period that is specified in URL authentication is used.
  • If the OutputType parameter is set to oss:

    • This parameter takes effect only when the ACL of the Object Storage Service (OSS) bucket is private. Otherwise, the image URL does not expire.
    • Minimum value: 1.
    • Maximum value: 2592000 (30 days). This limit is imposed to reduce security risks of the origin server.
    • Default value: 3600.
3600
OutputTypestringNo

The type of the output image URL. Valid values:

  • oss: OSS URL
  • cdn: CDN URL
cdn

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

25818875-5F78-4AF6-D7393642CA58*****
ImageInfoobject []

The image information.

CreationTimestring

The time when the image was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2018-11-21T02:37:23Z
StorageLocationstring

The bucket in which the image is stored.

outin-****..oss-cn-shanghai.aliyuncs.com
Statusstring

The status of the image file. Valid values:

  • Uploading: The image is being uploaded. This is the initial status.
  • Normal: The image is uploaded.
  • UploadFail: The image fails to be uploaded.
Uploading
CateIdlong

The ID of the category to which the image belongs.

254766071
Tagsstring

The tags of the image. Separate multiple tags with commas (,).

tag1,tag2,tag3
ImageTypestring

The type of the image. Valid values:

  • CoverSnapshot: thumbnail snapshot
  • NormalSnapshot: normal snapshot
  • SpriteSnapshot: sprite snapshot
  • SpriteOriginSnapshot: sprite source snapshot
  • All: images of all the preceding types. If this parameter is not set to All, you can specify multiple types and separate the types with commas (,).
NormalSnapshot
CateNamestring

The name of the category.

Test
Descriptionstring

The description of the image.

Test description
AppIdstring

The ID of the application.

app-****
URLstring

The image URL. If a domain name for CDN is specified, a CDN URL is returned. Otherwise, an OSS URL is returned.

http://example.aliyundoc.com/image/default/****.gif?auth_key=****
Titlestring

The title of the image.

this is a sample
ImageIdstring

The ID of the image file.

bbc65bba53f9*****ed90de118a7849
Mezzanineobject

The source information about the image.

FileURLstring

The OSS URL of the image file.

https://outin-bfefbb*****163e1c7426.oss-cn-XXXXXXXX.aliyuncs.com/image/default/5E84CD536*****D4DAD.png?Expires=1590982353&OSSAccessKeyId=*****&Signature=ALPET74o*****c%3D
OriginalFileNamestring

The name of the source file.

****.gif
Widthinteger

The width of the image. Unit: pixels.

200
Heightinteger

The height of the image. Unit: pixels.

200
FileSizestring

The size of the image file. Unit: bytes.

8932
NonExistImageIdsarray

The IDs of the images that do not exist.

string

The IDs of the images that do not exist.

f45cf4eba5c80233389558c39****

Examples

Sample success responses

JSONformat

{
  "RequestId": "25818875-5F78-4AF6-D7393642CA58*****",
  "ImageInfo": [
    {
      "CreationTime": "2018-11-21T02:37:23Z",
      "StorageLocation": "outin-****..oss-cn-shanghai.aliyuncs.com",
      "Status": "Uploading",
      "CateId": 254766071,
      "Tags": "tag1,tag2,tag3",
      "ImageType": "NormalSnapshot",
      "CateName": "Test\n",
      "Description": "Test description\n",
      "AppId": "app-****",
      "URL": "http://example.aliyundoc.com/image/default/****.gif?auth_key=****",
      "Title": "this is a sample",
      "ImageId": "bbc65bba53f9*****ed90de118a7849",
      "Mezzanine": {
        "FileURL": "https://outin-bfefbb*****163e1c7426.oss-cn-XXXXXXXX.aliyuncs.com/image/default/5E84CD536*****D4DAD.png?Expires=1590982353&OSSAccessKeyId=*****&Signature=ALPET74o*****c%3D",
        "OriginalFileName": "****.gif",
        "Width": 200,
        "Height": 200,
        "FileSize": "8932"
      }
    }
  ],
  "NonExistImageIds": [
    "f45cf4eba5c80233389558c39****"
  ]
}

Error codes

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