查询节点关系详情
此接口用于根据节点 ID 查询节点关系详情。
接口描述
通信协议:HTTP
URL:GET /api/v1/overview/platform/node-view/:id
传参方式:path
请求参数
字段名 | 类型 | 是否必填 | 说明 |
---|---|---|---|
id | string | 是 | 节点 ID |
响应参数
字段名 | 类型 | 说明 |
---|---|---|
id | string | 节点 ID |
status | string | 节点状态。online 表示在线;offline 表示离线 |
type | string | 节点类型,如 Linux、SylixOS 等 |
name | string | 节点名称 |
children | Container[ ] | 容器信息 |
Container
字段名 | 类型 | 说明 |
---|---|---|
id | string | 容器 ID |
name | string | 容器名称 |
node_id | string | 节点 ID |
pro_id | string | 服务 ID |
type | string | 容器类型,值固定为 container |
status | string | 容器状态。running 表示运行;stop 表示停止 |
children | Provision[ ] | 容器所属服务数据 |
Provision
字段名 | 类型 | 说明 |
---|---|---|
id | string | 服务 ID |
status | string | 服务状态。complete 表示已完成部署;deploying 表示部署中 |
name | string | 服务名称 |
type | string | 服务类型,值固定为 service |
health | boolean | 服务健康状态 |
请求示例
curl --location --request GET 'http://localhost:3001/api/v1/overview/platform/node-view/aa2123c8-2cef-4cdc-9ccf-df094584145b'
响应示例
{
"status": 200,
"message": "success",
"fieldErrors": null,
"data": {
"id": "aa2123c8-2cef-4cdc-9ccf-df094584145b",
"ip": "192.168.XX.XX",
"port": 1112,
"name": "node-base-28",
"type": "linux",
"arch": "x86-64",
"tls": 0,
"status": "online",
"children": [
{
"id": "a5d9503bfe680c3282cc3b80e700883d11f719a9173caff9bff882d37c1b2c38",
"node_id": "aa2123c8-2cef-4cdc-9ccf-df094584145b",
"pro_id": "64edf615-2aaa-4bc6-912a-90195379b3da",
"config": "{\"hostname\":\"auto\",\"publish\":[{\"netType\":\"tcp\",\"hostPort\":11211,\"containerPort\":11211}],\"env\":[\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\",\"MEMCACHED_VERSION=1.6.12\",\"MEMCACHED_SHA1=40d43e98f149e13e6c81eee813e6734f23413a01\"],\"cmd\":[\"memcached\"],\"name\":\"auto\",\"restart\":\"no\",\"network\":\"bridge\",\"memory\":0,\"healthCmd\":[]}",
"name": "auto-QelTs-",
"type": "container",
"status": "running",
"children": [
{
"id": "64edf615-2aaa-4bc6-912a-90195379b3da",
"name": "test2",
"status": "complete",
"type": "service",
"health": true
}
]
}
]
}
}
错误码
具体请参见 错误码说明。