跳到主要内容

机器集群列表

接口描述

获取集群列表,以便选择有正常运行机器的集群 进行任务挂载数据库信息获取

接口地址

/cloudcanal/console/api/v1/openapi/cluster/listclusters

请求方式

POST

请求参数

参数名称参数说明请求类型是否必须数据类型
cloudOrIdcNameSELF_MAINTENANCE
ALIBABA_CLOUD
bodystring
clusterDescLikebodystring
clusterNameLikebodystring
region集群所在区域

hangzhou
shanghai
beijing
shenzhen
qingdao
zhangjiakou
huhehaote
hongkong
singapore
silicon_valley
london
mq_internet_access
customer
bodystring

公共响应结果

参数名称参数说明类型(java)不为空
code1:成功 0:失败string
dataobject
msgstring
requestIdstring

data 参数说明

data 为数组,其中每一组数据中的字段说明如下:

参数名称参数说明类型(java)不为空
id主键Long
gmtCreate创建时间String
gmtModified修改时间String
clusterName集群实例idString
region集群所在区域String
cloudOrIdcNameALIBABA_CLOUD(阿里云)
SELF_MAINTENANCE(自建)
String
clusterDesc集群描述String
workerCount该集群机器总数int
runningCount该集群正常运行的机器总数int
abnormalCount该集群异常的机器总数int
ownerName拥有人名称String

响应示例

{
"requestId": "4f9f0b23-2b4a-11ec-8c7e-d98fc83f029e",
"code": "1",
"msg": "request success",
"data": [
{
"id": 2,
"gmtCreate": "2021-05-27T13:15:43.000+0000",
"gmtModified": "2021-05-27T13:15:43.000+0000",
"clusterName": "cluster553wq2b252",
"region": "shanghai",
"cloudOrIdcName": "ALIBABA_CLOUD",
"clusterDesc": "阿里云上海",
"workerCount": 0,
"runningCount": 0,
"abnormalCount": 0,
"ownerName": "liqiang"
},
{
"id": 1,
"gmtCreate": "2021-03-26T03:59:02.000+0000",
"gmtModified": "2021-03-26T03:59:23.000+0000",
"clusterName": "defaultclusterwu9eamx8ae",
"region": "hangzhou",
"cloudOrIdcName": "SELF_MAINTENANCE",
"clusterDesc": "默认集群",
"workerCount": 1,
"runningCount": 1,
"abnormalCount": 0,
"ownerName": "liqiang"
}
]
}