Updated on 2025-08-11 GMT+08:00

Querying CNs

Function

This API is used to query CNs. Before calling this API:

URI

GET /v3/{project_id}/instances/{instance_id}/coordinators

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

instance_id

Yes

String

Definition

Instance ID, which uniquely identifies an instance.

Constraints

N/A

Range

The value can contain 36 characters. Only letters and digits are allowed.

Default Value

N/A

offset

No

Integer

Definition

Index offset. The query starts from the next piece of data indexed by this parameter.

Constraints

The value must be a non-negative integer.

Range

N/A

Default Value

0: The query starts from the first data record.

limit

No

Integer

Definition

Number of records returned by a query.

Constraints

The value cannot be a negative number.

Range

1–200

Default Value

200

Request Parameters

None

Response Parameters

Table 2 Response body parameters

Parameter

Type

Description

instance_id

String

Definition

Instance ID.

Range

N/A

max_reduction_num

Integer

Definition

Maximum number of nodes that can be deleted at a time.

Range

N/A

nodes

Array of Table 3 objects

Definition

Node information list.

Table 3 CnInfoBeforeReduce

Parameter

Type

Description

id

String

Definition

Node ID.

Range

N/A

name

String

Definition

Node name.

Range

N/A

status

String

Definition

Node status.

Range

  • normal: The node is normal.
  • abnormal: The node is abnormal.
  • creating: The node is being created.
  • createfail: The node fails to be created.

availability_zone

String

Definition

AZ.

Range

N/A

support_reduce

Boolean

Definition

Whether the node can be deleted.

Range

N/A

Example Request

Querying CNs

GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/cc6fd964d93f4003851dfc29d57d30a5in14/coordinators

Example Response

CNs queried.

{ 
  "instance_id" : "cc6fd964d93f4003851dfc29d57d30a5in14", 
  "max_reduction_num" : 10, 
  "nodes" : [ { 
    "id" : "25b7f16ee4084b7884d52f1bdfab4e68no14", 
    "name" : "UTS-gauss-7362_gaussdbv5cn_0", 
    "status" : "normal", 
    "availability_zone" : "az2", 
    "support_reduce" : true 
  }, { 
    "id" : "ad6f02f31744422fa8ce487e81c9e7afno14", 
    "name" : "UTS-gauss-7362_gaussdbv5cn_1", 
    "status" : "normal", 
    "availability_zone" : "az3", 
    "support_reduce" : true 
  } ] 
}

Status Codes

Error Codes

For details, see Error Codes.