查询客户端列表
功能介绍
查询客户端列表
URI
GET /v3/{project_id}/agents
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
项目ID |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
agent_id |
否 |
String |
客户端ID |
|
limit |
否 |
String |
每页显示条目数,正整数 |
|
offset |
否 |
Integer |
偏移值,正整数 |
|
status |
否 |
String |
客户端状态,分为normal,abnormal和uninstall状态 normal:正常状态,表示客户端可以正常使用。 abnormal:异常状态,表示系统监测出系统有异常需要修复,此时部分功能可能受阻。 uninstall:卸载状态,表示客户端已被卸载或客户端正在升级过程中。 |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
agents |
Array of Agent objects |
客户端实例列表 |
|
count |
Integer |
客户端个数 |
|
limit |
Integer |
每页显示的条目数量 |
|
offset |
Integer |
偏移量,表示从此偏移量开始查询 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
created_at |
String |
客户端创建时间 |
|
updated_at |
String |
客户端更新时间 |
|
agent_id |
String |
客户端ID |
|
agent_version |
String |
客户端版本号 |
|
agent_type |
String |
客户端类型:有native和cloud两种 native:本地客户端,客户端安装在本地。 cloud:云上客户端,客户端安装在云端。 |
|
host_name |
String |
客户端所在的主机名 |
|
host_nickname |
String |
客户端所在的主机昵称 |
|
host_ip |
String |
客户端所在主机的IP |
|
host_os |
String |
客户端主机所在的操作系统 |
|
status |
String |
客户端状态,有normal,abnormal和uninstall三种状态 normal:正常状态,表示客户端可以正常使用。 abnormal:异常状态,表示系统监测出系统有异常需要修复,此时部分功能可能受阻。 uninstall:卸载状态,表示客户端已被卸载或客户端正在升级过程中。 |
|
last_active_time |
String |
客户端上次激活时间 |
|
paths |
Array of Path objects |
客户端的备份路径 |
请求示例
GET https://{endpoint}/v3/{project_id}/agents
响应示例
状态码:200
OK
{
"count" : 2,
"limit" : 1000,
"offset" : 0,
"agents" : [ {
"created_at" : "2022-01-30T09:28:09.334+00:00",
"agent_id" : "489654f2-363b-4ebf-966a-bdf079d97114",
"host_name" : "eBackup",
"host_ip" : "18.9.158.36",
"status" : "normal",
"last_active_time" : "2022-01-30T09:28:08.960+00:00"
}, {
"created_at" : "2022-01-14T06:47:17.524+00:00",
"updated_at" : "2022-01-28T05:01:32.739+00:00",
"agent_id" : "fb711278-e872-4224-b442-8dafc36a543d",
"host_name" : "ecs-00001",
"host_ip" : "10.10.0.1",
"status" : "normal",
"last_active_time" : "2022-01-28T05:01:32.000+00:00",
"paths" : [ {
"id" : "6c3d1ed6-b7d7-4e27-94ee-321431e84c5c",
"dir_path" : "/home/hcp",
"status" : "available",
"agent_id" : "fb711278-e872-4224-b442-8dafc36a543d",
"exclude_paths" : "*.txt,/opt/huaweicloud/cbragent/lib/test"
}, {
"id" : "e2af0fdd-9644-4db8-986e-5a6a2395c390",
"dir_path" : "/opt/workspace",
"status" : "available",
"agent_id" : "fb711278-e872-4224-b442-8dafc36a543d",
"exclude_paths" : "*.txt,/opt/huaweicloud/cbragent/lib/test"
} ]
} ]
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
OK |
错误码
请参见错误码。