Updated on 2023-06-20 GMT+08:00

Querying the Cluster List

Function

This API is used to query and display the cluster list and cluster status.

URI

GET /v1.0/{project_id}/clusters

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

start

No

Integer

The start value of the query. The default value is 1, indicating that the query starts from the first cluster.

limit

No

Integer

Number of clusters to be queried. The default value is 10, indicating that the information about 10 clusters is queried at a time.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

totalSize

Integer

Number of clusters

clusters

Array of ClusterList objects

List of cluster objects.

Table 4 ClusterList

Parameter

Type

Description

datastore

ClusterListDatastore object

Search engine.

instances

Array of ClusterListInstances objects

List of node objects.

publicKibanaResp

publicKibanaRespBody object

Kibana public network access information.

elbWhiteList

elbWhiteListResp object

EIP whitelist.

updated

String

Last modification time of a cluster. The format is ISO8601: CCYY-MM-DDThh:mm:ss.

name

String

Cluster name

publicIp

String

Public IP address information.

created

String

Cluster creation time. The format is ISO8601: CCYY-MM-DDThh:mm:ss.

The returned cluster list is sorted by creation time in descending order. The latest cluster is displayed at the top.

id

String

Cluster ID.

status

String

Cluster status.

  • 100: Creating
  • 200: Available
  • 303: Unavailable, for example, due to a creation failure.

endpoint

String

IP address and port number of the user used to access the VPC.

vpcId

String

ID of a VPC.

subnetId

String

Subnet ID.

securityGroupId

String

Security group ID.

bandwidthSize

Integer

Public network bandwidth. Unit: Mbit/s

httpsEnable

Boolean

Communication encryption status.

  • false: Communication encryption is not enabled.
  • true: Communication encryption is enabled.

authorityEnable

Boolean

Whether to enable authentication.

  • true: Authentication is enabled for the cluster.
  • false: Authentication is not enabled for the cluster.

diskEncrypted

Boolean

Whether disks are encrypted.

  • true: Disks are encrypted.
  • false: Disk are not encrypted.

backupAvailable

Boolean

Whether the snapshot function is enabled.

  • true: The snapshot function is enabled.
  • false: The snapshot function is disabled.

actionProgress

Object

Cluster behavior progress, which shows the progress of cluster creation and scaling in percentage. CREATING indicates the progress of creation.

actions

Array of strings

Current behavior of a cluster. REBOOTING indicates that the cluster is being restarted. GROWING indicates that the cluster is being scaled. RESTORING indicates that the cluster is being restored. SNAPSHOTTING indicates that a snapshot is being created.

enterpriseProjectId

String

ID of the enterprise project that a cluster belongs to. If the user of the cluster does not enable the enterprise project, the setting of this parameter is not returned.

tags

Array of ClusterListTags objects

Cluster tag.

failedReason

ClusterListFailedReasons object

Failure cause. If the cluster is in the available status, this parameter is not returned.

Table 5 ClusterListDatastore

Parameter

Type

Description

type

String

Engine type. Currently, only Elasticsearch is supported.

version

String

Version of the CSS cluster engine. For details, see CSS Supported Cluster Versions.

Table 6 ClusterListInstances

Parameter

Type

Description

status

String

Node status.

  • 100: Creating
  • 200: Available
  • 303: Unavailable, for example, due to a creation failure.

type

String

Type of the current node.

id

String

Instance ID.

name

String

Instance name.

specCode

String

Node specifications.

azCode

String

AZ of a node.

ip

String

Instance IP address.

volume

ClusterVolumeRsp object

definitions.ClusterVolumeRsp.description

Table 7 ClusterVolumeRsp

Parameter

Type

Description

type

String

Type of the disk used by the instance.

size

Integer

Instance disk information

Table 8 publicKibanaRespBody

Parameter

Type

Description

eipSize

Integer

Bandwidth range. Unit: Mbit/s

elbWhiteListResp

kibanaElbWhiteListResp object

Kibana public network access information.

publicKibanaIp

String

Specifies the IP address for accessing Kibana.

Table 9 kibanaElbWhiteListResp

Parameter

Type

Description

enableWhiteList

Boolean

Whether the Kibana access control is enabled.

  • true: Access control is enabled.
  • false: Access control is disabled.

whiteList

String

Whitelist of public network for accessing Kibana.

Table 10 elbWhiteListResp

Parameter

Type

Description

enableWhiteList

Boolean

Whether the public network access control is enabled.

  • true: Public network access control is enabled.
  • false: Public network access control is disabled.

whiteList

String

Whitelist for public network access.

Table 11 ClusterListTags

Parameter

Type

Description

key

String

Tag key.

value

String

Tag value.

Table 12 ClusterListFailedReasons

Parameter

Type

Description

errorCode

String

Error code.

  • CSS.6000: A cluster fails to be created.
  • CSS.6001: A cluster fails to be scaled out.
  • CSS.6002: A cluster fails to be restarted.
  • CSS.6004: A node fails to be created in a cluster.
  • CSS.6005: A service fails to be initialized.

errorMsg

String

Error details.

Example Requests

  • Query the first two clusters.
    - Method 1: GET /v1.0/6204a5bd270343b5885144cf9c8c158d/clusters?start=1&limit=2
    - Method 2: GET /v1.0/6204a5bd270343b5885144cf9c8c158d/clusters?limit=2
  • Query the first ten clusters.
    - Method 1: GET /v1.0/6204a5bd270343b5885144cf9c8c158d/clusters?start=1&limit=10
    - Method 2: GET /v1.0/6204a5bd270343b5885144cf9c8c158d/clusters?limit=10

Example Responses

Status code: 200

Request succeeded.

{
  "totalSize" : 1,
  "clusters" : [ {
    "datastore" : {
      "type" : "elasticsearch",
      "version" : "7.10.2"
    },
    "instances" : [ {
      "status" : "200",
      "type" : "ess",
      "id" : "{INSTANCE_ID}",
      "name" : "css-test-ess-esn-1-1",
      "specCode" : "ess.spec-4u16g",
      "azCode" : "{AZ_CODE}",
      "volume" : {
        "type" : "COMMON",
        "size" : 40
      },
      "ip" : "192.168.0.100"
    } ],
    "publicKibanaResp" : null,
    "elbWhiteList" : {
      "whiteList" : "",
      "enableWhiteList" : false
    },
    "updated" : "2023-01-11T08:19:14",
    "name" : "css-test",
    "publicIp" : null,
    "created" : "2023-01-11T06:48:22",
    "id" : "{CLUSTER_ID}",
    "status" : "200",
    "endpoint" : "192.168.0.100:9200",
    "vpcId" : "{VPC_ID}",
    "subnetId" : "{SUBNET_ID}",
    "securityGroupId" : "{SECURITY_GROUP_ID}",
    "bandwidthSize" : 0,
    "httpsEnable" : false,
    "authorityEnable" : false,
    "diskEncrypted" : false,
    "backupAvailable" : false,
    "actionProgress" : { },
    "actions" : [ ],
    "tags" : [ ]
   
  }, {
    "datastore" : {
      "type" : "elasticsearch",
      "version" : "7.9.3"
    },
    "instances" : [ {
      "status" : "200",
      "type" : "ess",
      "id" : "{INSTANCE_ID}",
      "name" : "css-9227-ess-esn-1-1",
      "specCode" : "ess.spec-4u16g",
      "azCode" : "{AZ_CODE}",
      "volume" : {
        "type" : "COMMON",
        "size" : 40
      },
      "ip" : "192.168.0.101"
    } ],
    "publicKibanaResp" : null,
    "elbWhiteList" : {
      "whiteList" : "",
      "enableWhiteList" : false
    },
    "updated" : "2023-01-11T08:19:14",
    "name" : "css-new",
    "publicIp" : null,
    "created" : "2023-01-11T06:48:22",
    "id" : "{CLUSTER_ID}",
    "status" : "200",
    "endpoint" : "192.168.0.101:9200",
    "vpcId" : "{VPC_ID}",
    "subnetId" : "{SUBNET_ID}",
    "securityGroupId" : "{SECURITY_GROUP_ID}",
    "bandwidthSize" : 0,
    "httpsEnable" : false,
    "authorityEnable" : false,
    "diskEncrypted" : false,
    "backupAvailable" : false,
    "actionProgress" : { },
    "actions" : [ ],
    "tags" : [ ]
  
  } ]
}

Status Codes

Status Code

Description

200

Request succeeded.

400

Invalid request.

Modify the request before retry.

404

The requested resource could not be found.

Modify the request before retry.

Error Codes

See Error Codes.