查詢分片集群實例的節點詳情v2
更新時間 2025-10-22 18:12:11
最近更新時間: 2025-10-22 18:12:11
分享文章
接口功能介紹
查詢sharding集群實例的節點信息
接口約束
用戶通過鑒權認證
URI
GET /DDS2/v2/openApi/describeShardingNodeDetail
路徑參數 無
Query參數
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|---|
| prodInstId | 是 | String | 文檔數據庫對外的實例標識 | 60d420bffb394************************* | |
| nodeType | 否 | String | sharding集群架構類型,可取shard,configsvr | configsvr |
請求參數
請求頭header參數
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|---|
| project-id | 否 | String | 項目id | 0 | |
| regionId | 是 | String | 資源池id | bb9fdb42056f11eda1610242ac110002 |
請求體body參數 無
響應參數
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| statusCode | Integer | 響應碼 取值范圍:800為成功,900為失敗 | 800 | |
| message | String | 響應信息 | 查詢sharding集群節點信息成功 | |
| returnObj | Array of Objects | 返回對象 | returnObj | |
| error | String | 錯誤碼。當接口失敗時才返回具體錯誤編碼,成功不返回或者為空。 | ||
| 表 returnObj |
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| node | String | 架構類型編號 | mongos-15381003 | |
| diskSize | String | 磁盤空間 | 100 | |
| memory | String | 內存空間 | 4 | |
| role | String | sharding節點類型 | Mongos | |
| alive | Integer | 節點運行狀態 | 1 | |
| usedSpace | String | 使用空間 | 0 | |
| azDisplayName | String | 可用區信息 | 西北-貴州可用區2 | |
| host | String | 節點機器地址 | 10.0.2.51 | |
| prodInstId | String | 實例id | d92e279cb1*** | |
| resId | Integer | 機器id序號 | 15381003 | |
| cpuCount | Integer | cpu核數 | 2 |
枚舉參數
無
請求示例
請求url
/v2/openApi/describeShardingNodeDetail?prodInstId=d92e279cb1***
請求頭header
project-id=0
regionId=bb9fdb42056f11eda1610242ac110002
請求體body
無
響應示例
{
"statusCode": 800,
"message": "查詢sharding集群節點信息成功",
"returnObj": [
{
"node": "sharding_shard1",
"diskSize": "100",
"memory": "4",
"role": "Shard",
"alive": -1,
"usedSpace": "0",
"azDisplayName": "",
"host": "",
"prodInstId": "d92e279cb1134793bace2e9435b26d4f",
"resId": 15381005,
"cpuCount": 2
},
{
"node": "sharding_shard2",
"diskSize": "100",
"memory": "4",
"role": "Shard",
"alive": -1,
"usedSpace": "0",
"azDisplayName": "",
"host": "",
"prodInstId": "d92e279cb1134793bace2e9435b26d4f",
"resId": 15381008,
"cpuCount": 2
},
{
"node": "sharding_configsvr",
"diskSize": "100",
"memory": "2",
"role": "ConfigServer",
"alive": -1,
"usedSpace": "0",
"azDisplayName": "",
"host": "",
"prodInstId": "d92e279cb1134793bace2e9435b26d4f",
"resId": 15381011,
"cpuCount": 1
},
{
"node": "mongos-15381003",
"diskSize": "40",
"memory": "4",
"role": "Mongos",
"alive": -1,
"usedSpace": "0",
"azDisplayName": "西北-貴州可用區2",
"host": "10.0.2.51",
"prodInstId": "d92e279cb1134793bace2e9435b26d4f",
"resId": 15381003,
"cpuCount": 2
},
{
"node": "mongos-15381004",
"diskSize": "40",
"memory": "4",
"role": "Mongos",
"alive": -1,
"usedSpace": "0",
"azDisplayName": "西北-貴州可用區2",
"host": "10.0.2.39",
"prodInstId": "d92e279cb1134793bace2e9435b26d4f",
"resId": 15381004,
"cpuCount": 2
}
]
}
狀態碼
請參考
錯誤碼
請參考