> 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/cn/compute/zec/disk/describediskmonitordata.md).

# DescribeDiskMonitorData

## 1. 接口描述

本接口(DescribeDiskMonitorData)用于查询一段时间的云硬盘的监控指标数据。

## 2. 请求参数

以下请求参数列表仅列出了接口中需要的请求参数

| 参数名称       | 必选 | 类型                                                                              | 描述                                                       |
| ---------- | -- | ------------------------------------------------------------------------------- | -------------------------------------------------------- |
| diskId     | 是  | String                                                                          | 云硬盘唯一标识ID。                                               |
| metricType | 是  | [DiskMetricData](/api-reference/cn/compute/zec/datastructure.md#diskmetricdata) | 云硬盘监控指标类型。                                               |
| startTime  | 是  | String                                                                          | <p>查询开始时间。</p><p>时间格式：yyyy-MM-ddTHH:mm:ssZ。</p>          |
| endTime    | 是  | String                                                                          | <p>查询结束时间。</p><p>时间格式：yyyy-MM-ddTHH:mm:ssZ。</p>          |
| step       | 否  | Integer                                                                         | <p>查询数据点间隔。</p><p>单位为分钟。</p><p>支持参数：1,5。</p><p>默认值：5</p> |

## 3. 响应结果

| 参数名称      | 类型                                                                                 | 描述                                                       |
| --------- | ---------------------------------------------------------------------------------- | -------------------------------------------------------- |
| requestId | String                                                                             | <p>唯一请求 ID。</p><p>每次请求都会返回。定位问题时需要提供该次请求的 requestId。</p> |
| maxValue  | Float                                                                              | 数据点的最大值。                                                 |
| minValue  | Float                                                                              | 数据点的最小值。                                                 |
| avgValue  | Float                                                                              | 数据点的平均值。                                                 |
| metrics   | Array of [MetricValue](/api-reference/cn/compute/zec/datastructure.md#metricvalue) | 监控数据集合。                                                  |

## 4. 代码示例

{% tabs %}
{% tab title="示例" %}
**1. 查询某段时间的云硬盘的 `DISK_UTIL` 监控指标数据。**

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

Request：
{
    "diskId": "< eipId >",
    "metricType": "DISK_UTIL",
    "startTime": "2025-06-25T01:55:00Z",
    "endTime": "2025-06-25T07:55:00Z"
}

Response：
{
  "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
  "response": {
    "requestId": "T05992D0C-7E8B-4047-B0C0-780F2CD549D3",
    "maxValue": 1.2,
    "minValue": 1.2,
    "avgValue": 1.2,
    "metrics": [
      {
        "time": "2023-07-11T08:05:00Z",
        "value": 1.2
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

## 5. 开发者工具

Zenlayer Cloud API 2.0 提供了配套的[开发工具集（SDK）](/api-reference/cn/api-introduction/toolkit.md)，未来会陆续支持更多开发语言，方便快速接入和使用Zenlayer的产品和服务。

## 6. 错误码

下面包含业务逻辑中遇到的错误码，其他错误码见[公共错误码](/api-reference/cn/api-introduction/instruction/commonerrorcode.md)

| HTTP状态码 | 错误码                                         | 说明        |
| ------- | ------------------------------------------- | --------- |
| 400     | OPERATION\_DENIED\_TIME\_STEP\_NOT\_SUPPORT | 数据点间隔不支持。 |
