> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/api-reference/compute/bmc/bare-metal-instance/describeimages.md).

# DescribeImages

## 1. API Description

This API (DescribeImages) is used to view the list of images.

{% hint style="info" %} <mark style="color:blue;">**Note**</mark>

<mark style="color:blue;">The images in the list are not applicable to all instance models. You can query the</mark> <mark style="color:blue;">`imageIds`</mark> <mark style="color:blue;">returned by</mark> <mark style="color:blue;">`DescribeInstanceTypes`</mark> <mark style="color:blue;">to get the images applicable to specific models.</mark>
{% endhint %}

## 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                                                             | <p>Image catalog. The optional values are as follows:</p><p>CentOS Windows Ubuntu Debian ESXi</p>                                                                                                                          |
| imageType      | No       | [ImageType](/api-reference/compute/bmc/datastructure.md#imagetype) | <p>Image type. The optional values are as follows:</p><p>PUBLIC\_IMAGE: public images CUSTOM\_IMAGE: custom images</p><p>You cannot create a custom image by yourself currently. If necessary, please submit a ticket.</p> |
| osType         | No       | [OsType](/api-reference/compute/bmc/datastructure.md#ostype)       | <p>Operating system type. The optional values are as follows:</p><p>Windows Linux</p>                                                                                                                                      |
| instanceTypeId | No       | String                                                             | Supported instance model ID.                                                                                                                                                                                               |

## 3. Output Parameters

| Parameter Name | Type                                                                        | Description                                                                                                           |
| -------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| requestId      | String                                                                      | <p>The unique request ID, which is returned for each request.</p><p>RequestId is required for locating a problem.</p> |
| images         | Array of [ImageInfo](/api-reference/compute/bmc/datastructure.md#imageinfo) | Information on images.                                                                                                |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
Query the information of images without any parameters.

```json
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"
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](/api-reference/api-introduction/toolkit/api-sdk.md)，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](/api-reference/api-introduction/instruction/commonerrorcode.md).

| HTTP Status Code | Error Code                          | Description              |
| ---------------- | ----------------------------------- | ------------------------ |
| 404              | INVALID\_INSTANCE\_TYPE\_NOT\_FOUND | Instance type not found. |
