DescribeImages

1. API Description

This API is used to view the list of images.

Note

The images in the list are not applicable to all instance models. You can query the imageIds returned by DescribeInstanceTypes to get the images applicable to specific models.

2. Input Parameters

The following request parameter list only provides API request parameters.

Parameter Name
Required
Type
Description

imageIds

No

Array of String

List of image IDs.

imageName

No

String

Image name.

catalog

No

String

Image catalog. The optional values are as follows:

  • CentOS

  • Windows

  • Ubuntu

  • Debian

  • ESXi

imageType

No

String

Image type. The optional values are as follows:

  • PUBLIC_IMAGE: public images

  • CUSTOM_IMAGE: custom images

You cannot create a custom image by yourself currently. If necessary, please submit a ticket.

osType

No

String

Operating system type. The optional values are as follows:

  • Windows

  • Linux

instanceTypeId

No

String

Supported instance model ID.

3. Output Parameters

Parameter Name
Type
Description

requestId

String

The unique request ID, which is returned for each request. RequestId is required for locating a problem.

images

Array of ImageInfo

Information on images.

4. Code Example

Query the information of images without any parameters.

POST /api/v2/bmc HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribeImages
<Common Request Params>

Response:
{
  "requestId": "T4C35327C-7B13-47B8-A815-5E5213D4A9F9",
  "response": {
    "requestId": "T4C35327C-7B13-47B8-A815-5E5213D4A9F9",
    "images": [
      {
        "imageId": "bd5faa16-39d2-4bbf-a5c8-b95a193b1626",
        "imageName": "CentOS7.4-x86_64",
        "catalog": "centos",
        "imageType": "PUBLIC_IMAGE",
        "osType": "linux"
      }
    ]
  }
}

5. Developer Resources

Zenlayer Cloud API 2.0 integrates SDKs to make it easier for you to call APIs. More programming languages will be supported.

6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.​

HTTP Status Code
Error Code
Description

404

INVALID_INSTANCE_TYPE_NOT_FOUND

Instance type not found.

Last updated