节点
已审核的边缘节点与子 IP;主节点经注册令牌自助注册,子 IP 由管理员手工添加。
nodes节点调度鉴权: 仅管理员8 个接口列出节点
GET
/api/v2/nodes鉴权: 仅管理员
查询参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| page | integer | — | 页码,从 1 开始。 |
| page_size | integer | — | 每页条数。 |
| sort | string | — | 排序字段,逗号分隔,前缀 `-` 表示降序,如 `-created_at,id`。 |
创建节点
POST
/api/v2/nodes鉴权: 仅管理员
请求体 application/json
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| area | string | — | 地区(只做展示,不下发节点);空 = 未填。子 IP 取主节点的。 |
| bandwidth_mbps | integer | — | 节点带宽 Mbps(只做展示,与 monitor.bw_limit_mbps 无关);0 = 未填。子 IP 取主节点的。 |
| des | string | — | 备注说明 |
| enabled | boolean | — | 是否启用 |
| ip | string | — | 节点 IP 地址(IPv4 或 IPv6)。 |
| monitor | NodeMonitor | — | 节点监控探测设置(主控按 monitor.node 配置的间隔探这个 IP)。 |
| name | string | 必填 | 名称 |
| parent_id | integer | — | 子 IP 所属主节点;null = 主节点。 |
| region_id | integer | — | 区域 ID |
| service_expire | string | — | 服务器到期日 YYYY-MM-DD(首页到期提醒用,不自动停用);null = 未填、不提醒。子 IP 取主节点的。 |
| service_start | string | — | 服务器开始日 YYYY-MM-DD(只做展示);null = 未填。子 IP 取主节点的。 |
获取节点
GET
/api/v2/nodes/{id}鉴权: 仅管理员
查询参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| capacity | boolean | — | 为 true 时附带 capacity(主节点才有;没有系统信息时为 null)。 |
修改节点
PUT
/api/v2/nodes/{id}鉴权: 仅管理员
请求体 application/json
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| area | string | — | 地区(只做展示,不下发节点);空 = 未填。子 IP 取主节点的。 |
| bandwidth_mbps | integer | — | 节点带宽 Mbps(只做展示,与 monitor.bw_limit_mbps 无关);0 = 未填。子 IP 取主节点的。 |
| des | string | — | 备注说明 |
| enabled | boolean | — | 是否启用 |
| ip | string | — | 节点 IP 地址(IPv4 或 IPv6)。 |
| monitor | NodeMonitor | — | 节点监控探测设置(主控按 monitor.node 配置的间隔探这个 IP)。 |
| name | string | — | 名称 |
| parent_id | integer | — | 子 IP 所属主节点;null = 主节点。 |
| region_id | integer | — | 区域 ID |
| service_expire | string | — | 服务器到期日 YYYY-MM-DD(首页到期提醒用,不自动停用);null = 未填、不提醒。子 IP 取主节点的。 |
| service_start | string | — | 服务器开始日 YYYY-MM-DD(只做展示);null = 未填。子 IP 取主节点的。 |
删除节点
DELETE
/api/v2/nodes/{id}鉴权: 仅管理员
重新下发被节点回滚的配置
POST
/api/v2/nodes/{id}/config-readmit鉴权: 仅管理员
节点网卡地址
GET
/api/v2/nodes/{id}/local-addrs鉴权: 仅管理员
节点移回待初始化
POST
/api/v2/nodes/{id}/to-pending鉴权: 仅管理员
节点对象
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| area | string | — | 地区(只做展示,不下发节点);空 = 未填。子 IP 取主节点的。 |
| bandwidth_mbps | integer | — | 节点带宽 Mbps(只做展示,与 monitor.bw_limit_mbps 无关);0 = 未填。子 IP 取主节点的。 |
| capacity | NodeCapacity | — | 节点内存容量(只读,只在 GET /nodes/{id}?capacity=true 给出):单站常驻 = location 数 × 28.1KB + https 占比 × 25.5KB,预算 = 内存 MiB × 0.25 / 2 − 28MiB,上限 = 预算 / 单站。null = 没有该节点的系统信息或缺内存总量。 |
| cert_expiry | string | — | 最近一次签发证书的到期时刻;null = 还没领过证(或子 IP)。 |
| created_at | string | — | 创建时间 |
| des | string | — | 备注说明 |
| disable_by | string | — | 停用来源(manual = 管理员;monitor = 节点监控自动停用,探测恢复后自动启用;bandwidth = 出站带宽超过 monitor.bw_limit_mbps 自动停用,回落后自动启用);启用时为空。 |
| enabled | boolean | — | 是否启用 |
| enrolled_at | string | — | 节点注册时刻;手工添加的子 IP 为 null。 |
| hints | string[] | — | 提示(如取不到网卡地址)。 |
| hostname | string | — | 节点主机名,注册时上报。 |
| id | integer | — | 记录 ID |
| ip | string | — | 节点 IP 地址(IPv4 或 IPv6)。 |
| monitor | NodeMonitor | — | 节点监控探测设置(主控按 monitor.node 配置的间隔探这个 IP)。 |
| name | string | — | 名称 |
| ops | NodeOps | — | 节点运维状态(只读,来自心跳):在线、配置是否落后于最新已发布版本、时钟是否同步。子 IP 跟随主节点。 |
| parent_id | integer | — | 子 IP 所属主节点;null = 主节点。 |
| region_id | integer | — | 区域 ID |
| role | string | — | 节点角色:edge 边缘节点;l2 二级缓存节点。 |
| service_expire | string | — | 服务器到期日 YYYY-MM-DD(首页到期提醒用,不自动停用);null = 未填、不提醒。子 IP 取主节点的。 |
| service_start | string | — | 服务器开始日 YYYY-MM-DD(只做展示);null = 未填。子 IP 取主节点的。 |
| status | string | — | ok = 有结果;pending = 已排指令,稍后再取;unknown = 节点不在线。 |
| updated_at | string | — | 更新时间 |
| v4 | string[] | — | 节点网卡上的 IPv4 地址。 |
| v6 | string[] | — | 节点网卡上的 IPv6 地址。 |