Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: wangdengke2 <wangdengke2@huawei.com> Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
22 KiB
Querying Nodes of a DDM Instance (a V1 API)
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}
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region |
instance_id |
Yes |
String |
DDM instance ID |
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 number but cannot be a negative number. |
limit |
No |
Integer |
Maximum records to be queried. Value range: 1 to 128 If the parameter value is not specified, 128 records are queried by default. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
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 |
Parameter |
Type |
Description |
|---|---|---|
port |
String |
Port |
status |
String |
Node status For details, see Status Description. |
node_id |
String |
Node ID |
ip |
String |
IP address of a DDM instance node |
group_id |
String |
ID of the group that the node belongs to |
Status code: 400
Parameter |
Type |
Description |
|---|---|---|
errCode |
String |
Service error code |
externalMessage |
String |
Error message |
Status code: 500
Parameter |
Type |
Description |
|---|---|---|
errCode |
String |
Service error code |
externalMessage |
String |
Error message |
Example Request
GET https://ddm.eu-de.otc.t-systems.com/v1/619d3e78f61b4be68bc5aa0b59edcf7b/instances/1f5c9fd6cd984056ba89c8c87cc03278in09/nodes?offset=0&limit=1
Example Response
Status code: 200
OK
{
"nodes" : [ {
"port" : "5066",
"status" : "normal",
"node_id" : "4a2b97b7f5e3462c9c78aae93b46ed83no09",
"ip" : "192.168.0.160",
"group_id": "9fd13885d3354f1f8df256ecda6d3346gr09"
} ],
"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.