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>
24 KiB
Querying Data Nodes Available for Creating a Schema (a V3 API)
Function
This API is used to query data nodes that can be used for creating a schema.
Constraints
None
URI
GET /v3/{project_id}/instances/{instance_id}/available-data-nodes
Parameter |
Type |
Mandatory |
Description |
|---|---|---|---|
project_id |
String |
Yes |
Project ID of a tenant in a region |
instance_id |
String |
Yes |
Instance ID |
Request 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. |
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, 10 records are queried by default. |
Example Request
GET https://ddm.eu-de.otc.t-systems.com/v3/74f57817ca8f42e19318eb0e0ad41d18/instances/2f0324a93859487eb5566d75951fcd2din09/available-data-nodes?offset=0&limit=10
Response
- Normal response
Table 4 Response body parameters Parameter
Type
Description
data_nodes
Array of AvailableDnInstance objects
Instance list
offset
Integer
Which page the server starts returning items
limit
Integer
Number of records displayed on each page
total
Integer
Total number of records
Table 5 AvailableDnInstance Parameter
Type
Description
id
String
Instance ID
name
String
Instance name
status
String
Instance status. It can be obtained from Data Node Statuses.
engine_name
String
Engine name
engine_version
String
Engine version
private_ip
String
Private IP address of an instance
port
Integer
Instance port
time_zone
String
Time zone of an instance
- Normal response example
{ "data_nodes": [ { "id": "7edae0250ebc464897bd92b8d3e8b769in01", "status": "normal", "name": "UTS-rds-dtc-src", "engine_name": "mysql", "engine_version": "8.0", "private_ip": "172.16.223.151", "port": 3306, "time_zone": "UTC+08:00" } ], "offset": 0, "limit": 10, "total": 1 } - Abnormal response
For details, see Abnormal Request Results.
Status Codes
- Normal
- Abnormal
For details, see Status Codes.
Error Codes
For details, see Error Codes.