Skip to main content

List Clusters

Interface Overview

Retrieving the list of clusters with operational machines, to enable task mounting or retrieval of database information.

Interface Address

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

Request Manner

POST

Request Parameters

ParameterNameParameter DescriptionRequestTypeWhether RequiredDataType
cloudOrIdcNameSELF_MAINTENANCE
ALIBABA_CLOUD
BodyFalseString
clusterDescLikeBodyFalseString
clusterNameLikeBodyFalseString
regionThe region where the cluster is located

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

Common Response Result

ParameterNameParameter DescriptionType(Java)NotNull
code1: Success
0: Failure
StringTrue
dataObjectFalse
msgStringFalse
requestIdStringTrue

Data Parameters

The data is an array, and each set of data contains the following field descriptions:

ParameterNameParameter DescriptionType(Java)NotNull
idPrimary KeyLongTrue
gmtCreateCreateTimeStringTrue
gmtModifiedModifyTimeStringTrue
clusterNameCluster instance idStringTrue
regionRegion where the cluster is located.StringTrue
cloudOrIdcNameALIBABA_CLOUD
SELF_MAINTENANCE
StringTrue
clusterDescCluster description.StringFalse
workerCountTotal number of machines in the clusterintTrue
runningCountTotal number of machines in the cluster that are running normallyintTrue
abnormalCountTotal number of machines in the cluster that are in an abnormal stateintTrue
ownerNameOwnerNameStringTrue

Response Example

{
"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": "Alibaba Cloud Shanghai",
"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": "Default Cluster",
"workerCount": 1,
"runningCount": 1,
"abnormalCount": 0,
"ownerName": "liqiang"
}
]
}