節點列表
更新時間 2025-01-10 10:51:05
最近更新時間: 2025-01-10 10:51:05
分享文章
接口功能介紹
展示節點列表信息
接口約束
華北2
URI
POST /v4/cwai/central/resource-group-service/node/list
路徑參數
無
Query參數
無
請求參數
請求頭header參數
無
請求體body參數
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|---|
| pageSize | 否 | Integer | 頁大小 | 10 | |
| pageNum | 否 | Integer | 頁碼 | 1 | |
| regionID | 是 | String | 區域ID | nm8 | |
| nameLike | 否 | String | 節點名稱模糊查詢 | asd | |
| resourceGroupID | 否 | String | 資源組ID查詢 | 547eb31e-20a7-474f-8f15-7da9f89d147b | |
| sortType | 否 | String | 排序方式(默認降序) | ascend | |
| sortKey | 否 | String | 用于排序的Key(默認按照創建時間排序) | created_at | |
| groupType | 否 | String | 資源組類型 | PAAS | |
| status | 否 | String | 節點狀態過濾參數[NotReady,Ready] | Ready | |
| k8sStatus | 否 | Array of Strings | 節點K8s狀態過濾參數[支持多選,需和status搭配使用],[Ready,NotReady] | Ready | |
| nodeType | 否 | Array of Strings | 節點類型過濾參數[支持多選] [ECS,EBM] | EBM | |
| gpuType | 否 | Array of Strings | 節點GPU類型過濾參數[支持多選] [Nvidia,Huawei] | Huawei | |
| createUserID | 否 | String | 創建者ID | ||
| isLocked | 否 | String | 區分鎖定、解鎖 | true | |
| isUnbound | 否 | Boolean | 區分未綁定頁面 | true | |
| id | 否 | String | 按節點ID查詢 | 121314ef-22a7-4356-6g34-2f5hf89d144c |
響應參數
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| statusCode | Integer | 請求成功(800)或者失敗(900),是否必填:是 | 800 | |
| error | String | 錯誤代碼,是否必填:否 | Cwai.Node.xxxx | |
| returnObj | Object | 返回節點列表的信息,是否必填:是 | returnObj | |
| message | String | 錯誤信息的描述,是否必填:否 | 請求字段錯誤 |
表 returnObj
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| currentCount | Integer | 當前頁數目,是否必填:是 | 1 | |
| totalCount | Integer | 總數目,是否必填:是 | 50 | |
| totalPage | Integer | 總頁數,是否必填:是 | 5 | |
| result | Object | 列表,是否必填:是 | [] | result |
表 result
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| id | String | 節點ID,是否必填:是 | 121314ef-22a7-4356-6g34-2f5hf89d144c | |
| resourceGroupID | String | 資源組ID,是否必填:是 | 547eb31e-20a7-474f-8f15-7da9f89d147b | |
| resourceGroupName | String | 資源組名稱,是否必填:是 | test1 | |
| instanceUUID | String | 物理機uuid,是否必填:是 | ss-1uj51pdschdsnudp7dpsgbx5i9qu | |
| instanceName | String | 物理機名稱,是否必填:是 | new-node-2 | |
| deviceType | String | 物理機套餐類型,是否必填:是 | physical.t17.large | |
| status | String | 節點狀態,是否必填:是 | Ready | |
| memory | Integer | 內存大小,是否必填:是 | 2400 | |
| gpu | Integer | gpu數量,是否必填:是 | 8 | |
| cpu | Integer | cpu數量,是否必填:是 | 128 | |
| cpuAmount | Integer | 單個cpu核數,是否必填:是 | 32 | |
| cpuSockets | Integer | 物理cpu數量,是否必填:是 | 2 | |
| cpuThreadAmount | Integer | 單個物理cpu超線程數量,是否必填:是 | 64 | |
| gpuProduct | String | gpu型號,是否必填:是 | NVIDIA-A100-SXM4-40GB | |
| isLocked | Boolean | 節點是否鎖定,是否必填:是 | false | |
| podNum | Integer | 節點中pod的數量,是否必填:是 | 0 |
枚舉參數
無
請求示例
請求url
POST //cwai-global.ctapi.daliqc.cn/v4/cwai/central/resource-group-service/node/list
Content-Type:application/json
{
"regionID": "200000001852",
"pageNo": 1,
"pageSize": 10,
"nameLike": "",
"resourceGroupID": "",
"groupType":"PAAS",
"isUnbound": false
}
請求頭header
User-Agent : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/110.0"
請求體body
{
"regionID": "200000001852",
"pageNo": 1,
"pageSize": 10,
"nameLike": "",
"resourceGroupID": "",
"groupType":"PAAS",
"isUnbound": false
}
響應示例
HTTP/1.1 200 OK
Content-Type:application/json
{
"statusCode": 800,
"message": "成功",
"returnObj": {
"currentCount": 1,
"totalCount": 1,
"totalPage": 1,
"result": [
{
"id": "121314ef-22a7-4356-6g34-2f5hf89d144c",
"resourceGroupID": "12345678-b6ee-4c6f-8d69-e26e2e073b2c",
"resourceGroupName": "test1130",
"instanceUUID": "ss-1753jfuschdsn7dpsgbx5i9qu",
"instanceName": "new",
"deviceType": "physical.t17.large",
"status": "Ready",
"memory": 240000,
"gpu": 8,
"cpu": 2800,
"gpuProduct": "NVIDIA-A100-SXM4-40GB",
"isLocked": false,
"podNum": 0,
"cpuAmount": 32,
"cpuSockets": 2,
"cpuThreadAmount": 64
}
]
}
}
狀態碼
請參考
錯誤碼
請參考