# DescribeDisks

## 1. API Description

This API (DescribeDisks) is used to query the details of disks.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name  | Required | Type                                                                                           | Description                                                                                                                                                                                        |
| --------------- | -------- | ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| diskIds         | No       | Array of String                                                                                | ID list of disks.                                                                                                                                                                                  |
| diskName        | No       | String                                                                                         | Disk name.                                                                                                                                                                                         |
| diskStatus      | No       | [DiskStatus](https://docs.console.zenlayer.com/api-reference/compute/datastructure#diskstatus) | Disk status.                                                                                                                                                                                       |
| diskType        | No       | [DiskType](https://docs.console.zenlayer.com/api-reference/compute/datastructure#disktype)     | <p>Storage type.</p><p>System : the Boot Disk. Data : the Disk.</p>                                                                                                                                |
| diskCategory    | No       | String                                                                                         | <p>Disk type.</p><p>Basic NVMe SSD: the Basic NVMe SSD. Standard NVMe SSD: the Standard NVMe SSD.</p><p>Default value: Standard NVMe SSD.</p><p>Call DescribeDiskCategory to obtain disk type.</p> |
| instanceId      | No       | String                                                                                         | Instance ID.                                                                                                                                                                                       |
| zoneId          | No       | String                                                                                         | Availability zone ID.                                                                                                                                                                              |
| pageNum         | No       | Integer                                                                                        | <p>Number of pages returned.</p><p>Default value: 1</p>                                                                                                                                            |
| pageSize        | No       | Integer                                                                                        | <p>Number of items in the current page result.</p><p>Default value: 20;</p><p>Maximum value: 1000.</p>                                                                                             |
| regionId        | No       | String                                                                                         | Availability zone ID to which the disk belong.                                                                                                                                                     |
| snapshotAbility | No       | Boolean                                                                                        | Available for snapshot creation or not.                                                                                                                                                            |
| resourceGroupId | No       | String                                                                                         | Resource Group ID.                                                                                                                                                                                 |
| tagKeys         | No       | Array of String                                                                                | <p>Query using tag keys.</p><p>A maximum of 20 tag keys can be used.</p>                                                                                                                           |
| tags            | No       | Array of [Tag](https://docs.console.zenlayer.com/api-reference/compute/datastructure#tag)      | <p>Query using tags.</p><p>A maximum of 20 tags can be used.</p>                                                                                                                                   |

## 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> |
| totalCount     | Integer                                                                                             | Number of disks meeting the filtering conditions.                                                                     |
| dataSet        | Array of [DiskInfo](https://docs.console.zenlayer.com/api-reference/compute/datastructure#diskinfo) | Information on disks.                                                                                                 |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Query the details of disks.**

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

Request：
{
  "diskStatus": "IN_USE",
  "diskSize": 20,
  "zoneId": "asia-east-1a"
}

Response：
{
  "requestId": "TB96A2CBB-F6D8-402B-B58B-7D869E4FC6EA",
  "response": {
    "requestId": "TB96A2CBB-F6D8-402B-B58B-7D869E4FC6EA",
    "totalCount": 1,
    "dataSet": [
      {
        "diskName": "Boot-disk-asia-east-1a-20GiB-01",
        "period": null,
        "resourceGroupName": "Default Resource Group",
        "instanceName": "Ubuntu-1vCPU-2gb-asia-east-1a-1",
        "chargeType": "PAY_AS_YOU_GO_BY_HOUR",
        "snapshotAbility": true,
        "portable": false,
        "expiredTime": null,
        "diskSize": 20,
        "instanceId": "your instance id",
        "regionId": "asia-east-1",
        "createTime": "2025-07-02T03:41:32Z",
        "serial": "d2n7st313u62hsnqrr7g",
        "zoneId": "asia-east-1a",
        "autoSnapshotPolicyId ": null,
        "diskStatus": "IN_USE",
        "diskId": "your disk id",
        "resourceGroupId": "e48af6cc-095b-494c-92b1-d0c011bc9e87",
        "diskType": "SYSTEM",
        "diskCategory": "Basic NVMe SSD",
        "tags":null
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

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

| HTTP Status Code | Error Code | Description |
| ---------------- | ---------- | ----------- |
