查询边缘节点组列表 - ListEdgeGroups
功能介绍
查询边缘节点组列表。该API只能在企业版实例中使用
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限,具体权限要求请参见权限和授权项。
URI
GET /v2/{project_id}/edgemgr/groups
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
project_id | 是 | String | 项目ID |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
name | 否 | String | 边缘节点组名称 |
limit | 否 | Integer | 查询返回记录的数量限制 |
offset | 否 | Integer | 偏移量,表示查询该偏移量后面的记录 |
sort | 否 | String | 显示的条目排列顺序,使用:分隔参考值和顺序,如sort=created_at%3Adesc表示根据创建时间逆序排列 |
请求参数
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
X-Auth-Token | 是 | String | 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
ief-instance-id | 否 | String | 企业版实例ID,专业版实例为空值。 |
Content-Type | 是 | String | 消息体的类型(格式),默认取值为“application/json”。 |
响应参数
状态码:200
参数 | 参数类型 | 描述 |
|---|---|---|
count | Integer | 边缘节点组数目 |
edge_groups | Array of EdgeGroupResp objects | 边缘节点组详情 |
参数 | 参数类型 | 描述 |
|---|---|---|
id | String | 边缘节点组ID |
name | String | 边缘节点组名称,小写英文字母、数字、中划线,以小写字母或数字开头,最大长度为32个字符,不能为空 |
description | String | 描述 |
created_at | String | 创建时间 |
updated_at | String | 更新时间 |
project_id | String | 边缘节点组所属的项目ID |
iam_role | String | 边缘节点组所属账号的IAM权限,没有企业版权限的账号无法使用节点组功能 |
cpu | Integer | 边缘节点组CPU总数,为边缘节点组所绑定的边缘节点的CPU数目之和 |
memory | Integer | 边缘节点组内存总数,为边缘节点组所绑定的边缘节点的内存之和 |
gpu_num | Integer | 边缘节点组GPU总数,为边缘节点组所绑定的边缘节点的GPU数目之和 |
nodes | Array of EdgeNodeResp objects | 绑定的边缘节点详情 |
deployments | Array of GroupDeployment objects | 绑定的边缘应用详情 |
attributes | Array of Attributes objects | 属性 |
tags | Array of Attributes objects | 标签 |
success_node_add | Array of strings | 绑定操作成功的节点ID列表 |
success_node_del | Array of strings | 解绑操作成功的节点ID列表 |
failed_node_add | Array of strings | 绑定操作失败的节点ID列表 |
failed_node_del | Array of strings | 解绑操作失败的节点ID列表 |
参数 | 参数类型 | 描述 |
|---|---|---|
id | String | 边缘节点ID |
name | String | 边缘节点名称,只允许中文字符、英文字母、数字、下划线、中划线,最大长度64 Name为必填字段,且本账号中唯一。 |
description | String | 边缘节点描述,最大长度255,不允许^ ~ # $ % & * < > ( ) [ ] { } ' " \ |
created_at | String | 创建时间 |
updated_at | String | 更新时间 |
project_id | String | 项目ID |
private_key | String | 私钥 |
certificate | String | 证书 |
ca | String | 根证书 |
state | String | 边缘节点状态
|
package | String | 将证书文件certificate/ca/private_key打成.tar.gz包后用base64编码的字符串。 使用时请使用base64解码成.tar.gz包。 |
master_addr | String | 云端服务URL |
cpu | Integer | 边缘节点CPU核心数 |
memory | Integer | 边缘节点内存大小,单位M |
os_name | String | 边缘节点操作系统名称 |
os_version | String | 边缘节点操作系统版本 |
pause_docker_image | String | pause容器镜像URL |
arch | String | 边缘节点架构 |
os_type | String | 边缘节点操作系统类型,支持centos,linux,euleros,ubuntu,hce等 |
deployment_num | Integer | 部署在该边缘节点上的应用实例个数 |
enable_gpu | Boolean | 边缘节点是否开启GPU,默认为false |
log_configs | Array of LogConfigs objects | 边缘节点日志配置,当用户未配置日志相关字段时,将默认打开日志上传到云端功能。 |
device_infos | Array of DeviceInfos objects | 关联设备信息 |
edged_version | String | edged版本 |
gpu_num | Integer | gpu个数 |
host_ips | Array of strings | 主机IP,默认返回eth0网卡的IP。 |
relation | String | 与device绑定关系名称(通过device id查询node时有值) |
comment | String | 与device绑定关系描述(通过device id查询node时有值) |
gpu_info | Array of GpuInfo objects | gpu型号和gpu memory大小 |
device_num | Integer | 关联设备数量 |
enable_npu | Boolean | 边缘节点是否开启NPU,true表示开启,false表示不开启,默认为false |
npu_type | String | NPU类型,支持D310、D310B,支持填写:
|
nics | Array of Nics objects | 节点网卡和对应IP地址信息 |
host_name | String | 边缘节点主机名 |
ief_node_version | String | 边缘节点版本 |
upgrade_flag | Boolean | 是否能升级的标志
|
product_id | String | 产品ID(通过产品证书方式纳管) |
group_ids | Array of strings | 节点组ID(一个节点属于多个节点组) |
upgrade_history | Array of UpgradeHistory objects | 节点安装或升级记录 |
attributes | Array of Attributes objects | 边缘节点属性,关联属性个数最多为32个 |
docker_enable | Boolean | 节点是否开启Docker |
mqtt_mode | String | mqtt集成模式
|
mqtt_external | String | 外置开源mqtt地址 |
mqtt_internal | String | edgecore内置的mqtt地址 |
node_type | String | 节点类型,默认为空,非空时为小站节点 |
ntp_configs | NtpConfigs object | ntp配置 |
error_reason | String | 节点故障原因 |
tags | Array of ResourceTag objects | 边缘节点标签,标签个数最多为20个 |
npu_num | Integer | NPU数量 |
npu_info | Array of NpuInfo objects | NPU型号和NPU Memory大小 |
container_runtime_version | String | 容器运行时版本 |
identifier | String | 边缘节点使用token注册时的凭证 |
purchase_id | String | IEC/IES节点id |
state_details | StateDetails object | IEC/IES节点状态详情 |
cert_remaining_valid_time | Integer | 证书有效期持续时间 |
参数 | 参数类型 | 描述 |
|---|---|---|
id | String | 数据库保存的主键,不需要关注此字段。 |
size | Integer | 应用日志文件大小限制,单位MB,默认50,取值范围10-1000。 |
level | String |
|
rotate_num | Integer | 应用日志rotate个数,默认5,取值范围1-10。 |
rotate_period | String | 应用日志rotate周期,可选项:
|
type | String |
|
component | String |
|
参数 | 参数类型 | 描述 |
|---|---|---|
relation | String | 设备和节点关系的名称,只允许中文字符、英文字母、数字、下划线、中划线,最大长度64 |
comment | String | 设备和节点关系的描述,最大长度64,不允许^ ~ # $ % & * < > ( ) [ ] { } ' " \ |
device_ids | Array of strings | 设备ID列表 |
参数 | 参数类型 | 描述 |
|---|---|---|
id | Integer | 节点升级或安装历史版本id |
from_version | String | 节点升级前节点上edgecore版本号,形式如2.1.0,其中每一位都是整数 |
to_version | String | 节点升级或安装后节点行edgecore版本号,形式如2.1.0,其中每一位都是整数 |
upgrade_time | Integer | 节点升级或安装的十位时间戳 |
result | String | 节点升级或安装状态,包含
|
dur_time | Integer | 节点升级所消耗的时间 |
参数 | 参数类型 | 描述 |
|---|---|---|
key | String | 键。最大长度36个unicode字符。 不能为空,只能包含大小写字母,数字,中划线“-”,下划线“_”。 |
value | String | 值。每个值最大长度43个unicode字符,删除时如果value有值按照key/value删除,如果value没值,则按照key删除。 不能为空,只能包含大小写字母,数字,中划线“-”,下划线“_”。 |
参数 | 参数类型 | 描述 |
|---|---|---|
name | String | NPU名称 |
type | String | NPU类型,支持D310、D310B,支持填写
|
capacity | String | NPU memory大小 |
driver_version | String | NPU驱动版本 |
参数 | 参数类型 | 描述 |
|---|---|---|
register_stat | String | IEC/IES节点注册状态 |
purchase_stat | String | IEC/IES节点状态 |
purchase_error | String | IEC/IES节点错误信息 |
请求示例
无
响应示例
状态码:200
响应参数
{
"count" : 1,
"edge_groups" : [ {
"id" : "e4f9c0d6-e1d7-41d5-a108-f38aa8372ffd",
"name" : "test1",
"description" : "",
"created_at" : "2022-06-07 08:21:05.794205 +0000 UTC",
"updated_at" : "2022-06-07 08:21:05.794217 +0000 UTC",
"project_id" : "xxx",
"iam_role" : "",
"memory" : 8595,
"cpu" : 5,
"gpu_num" : 0,
"nodes" : [ {
"id" : "024e05a8-89bf-46d8-b298-700a2af69605",
"project_id" : "xxx",
"name" : "test1",
"description" : "",
"created_at" : "2022-08-05 02:14:52.351802 +0000 UTC",
"updated_at" : "2022-10-31 19:19:37.104359 +0000 UTC",
"state" : "RUNNING",
"master_addr" : "xxx/xxx",
"arch" : "x86_64",
"enable_gpu" : false,
"gpu_info" : [ ],
"gpu_num" : 0,
"memory" : 990,
"os_version" : "3.10.0-1062.12.1.el7.x86_64",
"os_name" : "CentOS Linux 7 (Core)",
"device_infos" : null,
"os_type" : "linux",
"pause_docker_image" : "",
"host_name" : "test1",
"cpu" : 1,
"log_configs" : [ {
"level" : "on",
"rotate_num" : 5,
"component" : "app",
"rotate_period" : "yearly",
"type" : "LTS",
"id" : "",
"size" : 50
}, {
"level" : "info",
"rotate_num" : 5,
"component" : "system",
"rotate_period" : "yearly",
"type" : "LTS",
"id" : "",
"size" : 50
}, {
"level" : "",
"rotate_num" : 5,
"component" : "app",
"rotate_period" : "daily",
"type" : "local",
"id" : "",
"size" : 50
}, {
"level" : "info",
"rotate_num" : 5,
"component" : "system",
"rotate_period" : "daily",
"type" : "local",
"id" : "",
"size" : 50
} ],
"host_ips" : [ "192.168.0.x" ],
"edged_version" : "2.1.0",
"deployment_num" : 1,
"device_num" : 2,
"upgrade_history" : [ {
"to_version" : "2.55.8",
"upgrade_time" : 1659694662,
"id" : 0,
"result" : "install_success",
"from_version" : "",
"dur_time" : 0
}, {
"to_version" : "2.55.9",
"upgrade_time" : 1660642318,
"id" : 1,
"result" : "upgrade_success",
"from_version" : "2.55.8",
"dur_time" : 30
}, {
"to_version" : "2.56.0",
"upgrade_time" : 1662019732,
"id" : 2,
"result" : "upgrade_success",
"from_version" : "2.55.9",
"dur_time" : 29
}, {
"to_version" : "2.56.0",
"upgrade_time" : 1663125401,
"id" : 3,
"result" : "upgrade_failed_rollback_success",
"from_version" : "2.56.0",
"dur_time" : 3
} ],
"ief_node_version" : "2.3.0",
"upgrade_flag" : false,
"comment" : "",
"ca" : "",
"relation" : "",
"certificate" : "",
"private_key" : "",
"attributes" : null,
"package" : "",
"tags" : null,
"product_id" : "",
"mqtt_mode" : "internal",
"mqtt_internal" : "",
"mqtt_external" : "",
"enable_npu" : false,
"npu_type" : "",
"docker_enable" : null,
"npu_num" : 0,
"npu_info" : [ ],
"node_type" : "",
"ntp_configs" : null,
"nics" : null,
"error_reason" : "",
"container_runtime_version" : "",
"purchase_id" : "",
"state_details" : {
"register_stat" : "",
"purchase_stat" : "",
"purchase_error" : ""
},
"cert_remaining_valid_time" : 0
}, {
"id" : "de5d81fe-a58e-4ec4-be9d-f3906d7fe356",
"project_id" : "xxx",
"name" : "cjq-test-1008",
"description" : "",
"created_at" : "2022-10-07 23:19:18.147956 +0000 UTC",
"updated_at" : "2022-10-27 23:20:09.631153 +0000 UTC",
"state" : "RUNNING",
"master_addr" : "xxx",
"arch" : "x86_64",
"enable_gpu" : false,
"gpu_info" : [ ],
"gpu_num" : 0,
"memory" : 7805,
"os_version" : "3.10.0-862.14.1.5.h408.eulerosv2r7.x86_64",
"os_name" : "EulerOS 2.0 (SP5)",
"device_infos" : null,
"os_type" : "linux",
"pause_docker_image" : "",
"host_name" : "ecs-81ba",
"cpu" : 4,
"log_configs" : null,
"host_ips" : [ "192.168.0.161" ],
"edged_version" : "2.1.0",
"deployment_num" : 1,
"device_num" : 0,
"upgrade_history" : [ {
"to_version" : "2.53.4",
"upgrade_time" : 1665215216,
"id" : 0,
"result" : "install_success",
"from_version" : "",
"dur_time" : 0
}, {
"to_version" : "2.56.5",
"upgrade_time" : 1666839798,
"id" : 1,
"result" : "upgrade_success",
"from_version" : "2.56.4",
"dur_time" : 22
}, {
"to_version" : "2.56.6",
"upgrade_time" : 1666872187,
"id" : 2,
"result" : "upgrade_success",
"from_version" : "2.56.5",
"dur_time" : 23
} ],
"ief_node_version" : "2.56.6",
"upgrade_flag" : false,
"comment" : "",
"ca" : "",
"relation" : "",
"certificate" : "",
"private_key" : "",
"attributes" : null,
"package" : "",
"tags" : null,
"product_id" : "",
"mqtt_mode" : "internal",
"mqtt_internal" : "",
"mqtt_external" : "",
"enable_npu" : false,
"npu_type" : "",
"docker_enable" : null,
"npu_num" : 0,
"npu_info" : [ ],
"node_type" : "",
"ntp_configs" : null,
"nics" : null,
"error_reason" : "",
"container_runtime_version" : "",
"purchase_id" : "",
"state_details" : {
"register_stat" : "",
"purchase_stat" : "",
"purchase_error" : ""
},
"cert_remaining_valid_time" : 0
} ],
"deployments" : [ ],
"attributes" : [ ],
"failed_node_add" : null,
"failed_node_del" : null,
"success_node_add" : null,
"success_node_del" : null
} ]
} 状态码
状态码 | 描述 |
|---|---|
200 | 响应参数 |
错误码
请参见错误码。

