查询整个拓扑
更新时间 2026-08-17 09:47:43
最近更新时间: 2026-08-17 09:47:43
本节主要介绍如何使用API查询整个拓扑。
此操作用来查询整个拓扑。
请求语法
GET /rest/v1/system/topology HTTP/1.1
Date: date
Content-Type: application/json; charset=utf-8
Host: ip:port
Authorization: authorization响应结果
| 名称 | 类型 | 描述 |
|---|---|---|
| name | String | 拓扑节点名称。 |
| fullname | String | 节点在集群中的全路径名称,从根节点开始,使用name:name:name格式来唯一标识该节点的名称。 |
| id | String | 拓扑节点ID。 |
| type | String | 节点的类型:root:根节点。 |
| description | String | 节点描述。 |
| childNodes | Array of childNodes | 子节点信息集合,根据子节点类型不同,展示的信息不同,详见“表1响应参数ChildNode说明”。 |
表1 响应参数ChildNode说明
| 名称 | 类型 | 描述 | |
|---|---|---|---|
| 子节点类型为room | name | String | 子节点名称。 |
| fullname | String | 节点在集群中的全路径名称,从根节点开始,使用name:name格式来唯一标识该节点的名称。 | |
| id | String | 节点ID。 | |
| type | String | 节点类型。 | |
| description | String | 节点描述。 | |
| 子节点类型为rack | name | String | 子节点名称。 |
| fullname | String | 节点在集群中的全路径名称,从根节点开始,使用name:name:name格式来唯一标识该节点的名称。 | |
| id | String | 节点ID。 | |
| type | String | 节点类型。 | |
| description | String | 节点描述。 | |
| 子节点类型为server | name | String | 子节点名称。 |
| fullname | String | 节点在集群中的全路径名称,从根节点开始,使用name:name:name格式来唯一标识该节点的名称。 | |
| id | String | 节点ID。 | |
| serverId | String | 服务器ID。 | |
| type | String | 节点类型。 | |
| description | String | 节点描述。 | |
| clusterAddress | String | 拓扑图集群网络IP。 | |
| publicAddress | String | 拓扑图业务网络IP。 | |
| allDiskPaths.usedCapacity | Long | 服务器上HBlock数据目录对应分区的已用容量,单位是bytes。 | |
| allDiskPaths.totalCapacity | Long | 服务器上HBlock数据目录对应分区的总容量,单位是bytes。 | |
| serverStatus | String | 服务器状态:
| |
| 子节点类型为path | name | String | 子节点名称。 |
| fullname | String | 节点在集群中的全路径名称,从根节点开始,使用name:name:name格式来唯一标识该节点的名称。 | |
| id | String | 节点ID。 | |
| serverId | String | 服务器ID。 | |
| type | String | 节点类型。 | |
| totalCapacity | Long | HBlock数据目录对应分区的总容量,单位是bytes。 | |
| usedCapacity | Long | HBlock数据目录对应分区的已用容量,单位是bytes。 | |
| capacityQuota | Long | 数据目录容量配额。 负整数表示无限制写入。 | |
| usedCapacityQuota | Long | 数据目录已用容量配额。 | |
| storagePool | String | 所属存储池。 | |
| healthStatus | String | 数据目录健康状态:
| |
| healthDetail | Array of string | 数据目录健康状态详情:
| |
请求示例
查询整个拓扑。
GET /rest/v1/system/topology HTTP/1.1
Date: Mon, 8 Jun 2026 06:18:54 GMT
Content-Type: application/json; charset=utf-8
Authorization: HBlock userName:signature
Host: 192.168.0.110:1443 响应示例
HTTP/1.1 200 OK
x-hblock-request-id: bc2775d9b44f4445aaf4b2f1897467d4
Connection: keep-alive
Content-Length: 2257
Date: Mon, 8 Jun 2026 06:18:54 GMT
Content-Type: application/json;charset=utf-8
Server: HBlock
{
"data": {
"name": "default",
"fullname": "default",
"id": "1e997d61-973f-4ae0-a6e9-f4c91e46d2ff",
"type": "root",
"childNodes": [
{
"name": "hblock_1",
"fullname": "default:hblock_1",
"id": "bbf9cf66-ed3b-4c1d-ac23-d934a1eb7734",
"serverId": "hblock_1",
"type": "server",
"clusterAddress": "192.168.0.65",
"publicAddress": "192.168.0.65",
"allDiskPaths": {
"usedCapacity": 4580990976,
"totalCapacity": 99703775232
},
"serverStatus": "Connected",
"childNodes": [
{
"name": "/mnt/storage01",
"fullname": "default:hblock_1:/mnt/storage01",
"id": "48941d85-003a-4415-9442-a3f5e1285eb1",
"serverId": "hblock_1",
"type": "path",
"totalCapacity": 99703775232,
"usedCapacity": 4580990976,
"capacityQuota": -1,
"usedCapacityQuota": 0,
"storagePool": "default",
"healthStatus": "Healthy"
}
]
},
{
"name": "room1",
"fullname": "default:room1",
"id": "c9dd3571-e45e-4fa4-a15b-22aafd29d56b",
"type": "room",
"description": "room1",
"childNodes": [
{
"name": "hblock_2",
"fullname": "default:room1:hblock_2",
"id": "1d39fb0b-7ba4-43ed-8ce9-1c437ebc8673",
"serverId": "hblock_2",
"type": "server",
"clusterAddress": "192.168.0.64",
"publicAddress": "192.168.0.64",
"allDiskPaths": {
"usedCapacity": 5841207296,
"totalCapacity": 99703775232
},
"serverStatus": "Connected",
"childNodes": [
{
"name": "/mnt/storage01",
"fullname": "default:room1:hblock_2:/mnt/storage01",
"id": "cce5e07d-af5b-4d99-8e21-d218cecc2cc1",
"serverId": "hblock_2",
"type": "path",
"totalCapacity": 99703775232,
"usedCapacity": 5841207296,
"capacityQuota": -1,
"usedCapacityQuota": 0,
"storagePool": "default",
"healthStatus": "Healthy"
}
]
},
{
"name": "rack1",
"fullname": "default:room1:rack1",
"id": "c688d28d-3f49-42b2-baee-5da175c91a44",
"type": "rack",
"description": "rack1",
"childNodes": [
{
"name": "hblock_3",
"fullname": "default:room1:rack1:hblock_3",
"id": "83bebacf-141e-4ad8-9aa2-2637dbc5164d",
"serverId": "hblock_3",
"type": "server",
"clusterAddress": "192.168.0.67",
"publicAddress": "192.168.0.67",
"allDiskPaths": {
"usedCapacity": 7087693824,
"totalCapacity": 99703775232
},
"serverStatus": "Connected",
"childNodes": [
{
"name": "/mnt/storage01",
"fullname": "default:room1:rack1:hblock_3:/mnt/storage01",
"id": "09b0c9a5-3f17-47fe-acb1-fa1d749365c5",
"serverId": "hblock_3",
"type": "path",
"totalCapacity": 99703775232,
"usedCapacity": 7087693824,
"capacityQuota": -1,
"usedCapacityQuota": 20226048,
"storagePool": "default",
"healthStatus": "Healthy"
}
]
}
]
}
]
}
]
}
}