All Products
Search
Document Center

ApsaraVideo VOD:GetImageInfo

Last Updated:Mar 03, 2024

Queries the basic information about an image based on the image ID. The basic information includes the title, type, creation time, and tags of the image.

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

Request parameters

ParameterTypeRequiredDescriptionExample
ImageIdstringYes

The ID of the image.

3e34733b40b9a96ccf5c1ff6f69****
AuthTimeoutlongNo

The validity period of the image URL. Unit: seconds.

Note
  • If the OutputType parameter is set to cdn:
    • The image URL has a validity period only if URL signing is enabled. Otherwise, the image URL is permanently valid.
    • Minimum value: 1.
    • Maximum value: unlimited.
    • Default value: If you do not set this parameter, the default validity period that is specified in URL signing is used.
  • If the OutputType parameter is set to oss:
    • The image URL has a validity period only if the permissions on the Object Storage Service (OSS) bucket are private. Otherwise, the image URL is permanently valid.
    • Minimum value: 1.
    • Maximum value: 2592000 (30 days). The maximum value is limited to reduce security risks of the origin.
    • Default value: If you do not set this parameter, the default value is 3600.
  • 3600
    OutputTypestringNo

    The type of the image URL. Valid values:

    • oss: OSS URL
    • cdn (default): Content Delivery Network (CDN) URL
    cdn

    Response parameters

    ParameterTypeDescriptionExample
    object

    The returned data.

    RequestIdstring

    The ID of the request.

    AB99D4DF-FAFA-49DC-9C548C1E261E****
    ImageInfoobject

    The information about the image.

    CreationTimestring

    The time when the image file 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 OSS bucket where the image is stored.

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

    The status of the image. 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.

    254766071
    Tagsstring

    The tag of the image. Multiple tags are separated by 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 them with commas (,).
    NormalSnapshot
    CateNamestring

    The name of the category.

    test name
    Descriptionstring

    The description of the image.

    test description
    AppIdstring

    The ID of the application.

    app-****
    URLstring

    The URL of the image. If a CDN domain name 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.

    bbc65bba53f9*****ed90de118a7849
    Mezzanineobject

    The information about the image mezzanine file.

    FileURLstring

    The OSS URL of the image.

    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 uploaded file.

    ****.gif
    Widthinteger

    The width of the image. Unit: pixel.

    200
    Heightinteger

    The height of the image. Unit: pixel.

    200
    FileSizestring

    The size of the file. Unit: byte.

    8932

    Examples

    Sample success responses

    JSONformat

    {
      "RequestId": "AB99D4DF-FAFA-49DC-9C548C1E261E****",
      "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 name",
        "Description": "test description",
        "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"
        }
      }
    }

    Error codes

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

    Common errors

    The following table describes the common errors that this operation can return.

    Error codeError messageHTTP status codeDescription
    NoSuchResourceThe specified resource does not exist.404The error message returned because the image does not exist.