# 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](/api-reference/compute/zec/datastructure.md#diskstatus) | Disk status.                                                                                                                                                                                       |
| diskType        | No       | [DiskType](/api-reference/compute/zec/datastructure.md#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](/api-reference/compute/zec/datastructure.md#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](/api-reference/compute/zec/datastructure.md#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](/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 |
| ---------------- | ---------- | ----------- |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.console.zenlayer.com/api-reference/compute/zec/disk/describedisks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
