查询云电脑监控指标时序数据v3
更新时间 2026-05-28 15:53:36
最近更新时间: 2026-05-28 15:53:36
接口功能介绍
- 单次最多能查询近15天内的监控信息,指定的参数startTime不得超过15天前。- 每个指标每次最多返回400条监控数据,指定的参数(endTime - startTime)/period不得大于400。- 单次调用最多查询10个指标。当前支持的指标:- CpuUtilization(CPU使用率,单位:Percent)- MemoryUtilization(内存使用率,单位:Percent)- DiskReadBps(所有磁盘读取BPS,单位:Bytes/Second)- DiskWriteBps(所有磁盘写入BPS,单位:Bytes/Second)- DiskReadIops(所有磁盘每秒读取次数,单位:Count/Second)- DiskWriteIops(所有磁盘每秒写入次数,单位:Count/Second)- NetworkInBps(云电脑的所有流入带宽BPS,单位:Bytes/Second)- NetworkOutBps(云电脑的所有流出带宽BPS,单位:Bytes/Second)- BandwidthInBps(云电脑绑定带宽的下行流量BPS,单位:Bytes/Second)- BandwidthOutBps(云电脑绑定带宽的上行流量BPS,单位:Bytes/Second)
接口约束
无
URI
GET /v3/desktop/getDesktopMetricStatistics
路径参数 无
Query参数
| 参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|---|
| regionId | 是 | String | 资源池ID。 | xxxxxxx00x | |
| desktopOid | 是 | String | 云电脑ID。 | D01234xxxx11x | |
| metricNames | 是 | String | 指标名称。取值由指标名称组成一个JSON数组,最多支持10个指标名,指标名之间用半角逗号(,)隔开。 | CpuUtilization,MemoryUtilization | |
| period | 是 | Integer | 获取监控数据的间隔时间,单位:秒。取值范围: - 60 - 300 - 600 - 3600 | 60 | |
| startTime | 是 | String | 获取数据的起始时间点。以ISO 8601为标准,并使用UTC+0时间,格式为yyyy-MM-ddTHH:mm:ssZ。 | 2025-10-28T15:59:59Z | |
| endTime | 是 | String | 获取数据的结束时间点。以ISO 8601为标准,并使用UTC+0时间,格式为yyyy-MM-ddTHH:mm:ssZ。 | 2025-10-28T16:59:59Z |
请求参数
请求头header参数 无
请求体body参数 无
响应参数
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| statusCode | Integer | 状态码。可能值: - 800:请求成功。 - 900:请求失败。 | 800 | |
| error | String | 错误码。 | ECPC_1000 | |
| message | String | 提示信息。 | OK. | |
| returnObj | Object | 返回数据对象 | returnObj |
表 returnObj
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| total | Long | 总记录数 | ||
| list | Array of Objects | 数据列表 | list |
表 list
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| type | String | 指标名 | ||
| unit | String | 数值的单位。可能值: - Percent:百分比。 - Bytes/Second:每秒字节数。 - Count/Second:每秒次数。 | ||
| timeSeriesData | Array of Objects | 数据列表 | timeSeriesData |
表 timeSeriesData
| 参数 | 参数类型 | 说明 | 示例 | 下级对象 |
|---|---|---|---|---|
| value | Double | 指标的数值。 | ||
| timestamp | String | 时间戳。以ISO 8601为标准,并使用UTC+0时间,格式为yyyy-MM-ddTHH:mm:ssZ。 |
枚举参数
无
请求示例
请求url
https://{host}?regionId=xxxxxxx00x&desktopOid=D01234xxxx11x&metricNames=CpuUtilization,MemoryUtilization&period=60&startTime=2025-10-28T15:59:59Z&endTime=2025-10-28T16:59:59Z
请求头header
无
请求体body
无
响应示例
{
"statusCode":800,
"message":"OK.",
"returnObj":{
"total":2,
"list":[{
"type":"CpuUtilization",
"unit":"Percent",
"timeSeriesData":[{
"value":45.6,
"timestamp":"2023-11-15T08:30:00Z"
},{
"value":52.3,
"timestamp":"2023-11-15T08:31:00Z"
}]
},{
"type":"BandwidthInBps",
"unit":"Bytes/Second",
"timeSeriesData":[{
"value":1024.5,
"timestamp":"2023-11-15T08:30:00Z"
},{
"value":2048.3,
"timestamp":"2023-11-15T08:31:00Z"
}]
}]
}
}
状态码
请参考 状态码
错误码
请参考 错误码