Updated on 2024-08-02 GMT+08:00

Querying Nodes of a DDM Instance

Function

This API is used to query nodes of a DDM instance.

Constraints

None

URI

GET /v1/{project_id}/instances/{instance_id}/nodes?offset={offset}&limit={limit}

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region

To obtain this value, see Obtaining a Project ID.

instance_id

Yes

String

DDM instance ID

Table 2 Query parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Index offset.

The query starts from the next piece of data indexed by this parameter. The value is 0 by default.

The value must be a positive integer.

limit

No

Integer

Maximum nodes to be queried.

Value range: 1 to 128.

If the parameter value is not specified, 10 nodes are queried by default.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

You can obtain the token by calling the IAM API used to obtain a user token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

nodes

Array of NodeList objects

Instance node information

offset

Integer

Which page the server starts returning items.

limit

Integer

Number of records displayed on each page

total

Integer

Number of DDM instance nodes

Table 5 NodeList

Parameter

Type

Description

port

String

Port

status

String

Node status

node_id

String

Node ID

ip

String

IP Address

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

errCode

String

Service error code

externalMessage

String

Error message

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

errCode

String

Service error code

externalMessage

String

Error message

Example Request

Querying nodes of a DDM instance

GET https://{endpoint}/v1/{project_id}/instances/{instance_id}/nodes?offset={offset}&limit={limit}

Example Response

Status code: 200

OK

{
  "nodes" : [ {
    "port" : "5066",
    "status" : "normal",
    "node_id" : "4a2b97b7f5e3462c9c78aae93b46ed83no09",
    "ip" : "192.168.0.160"
  } ],
  "offset" : 0,
  "limit" : 128,
  "total" : 1
}

Status code: 400

bad request

{
  "externalMessage" : "Parameter error.",
  "errCode" : "DBS.280001"
}

Status code: 500

server error

{
  "externalMessage" : "Server failure.",
  "errCode" : "DBS.200412"
}

Status Codes

Status Code

Description

200

OK

400

bad request

500

server error

Error Codes

For details, see Error Codes.