Files
doc-exports/docs/ddm/api-ref/en-us_topic_0000002332909537.html
wangdengke2 823df869a9 ddm_api
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>
2026-03-03 12:01:43 +00:00

25 KiB

Querying Data Nodes Available for Shard Configuration (a V3 API)

Function

This API is used to query data nodes that can be used for shard configuration.

Constraints

None

URI

GET /v3/{project_id}/instances/{instance_id}/databases/{db_name}/migration/available-data-nodes

Table 1 Path parameters

Parameter

Type

Mandatory

Description

project_id

String

Yes

Project ID of a tenant in a region

instance_id

String

Yes

Instance ID

db_name

String

Yes

Schema name

Request Parameters

Table 2 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.

Table 3 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 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

Querying data nodes that can be used for shard configuration
GET https://ddm.eu-de.otc.t-systems.com/v3/74f57817ca8f42e19318eb0e0ad41d18/instances/2f0324a93859487eb5566d75951fcd2din09/databases/db_d553/migration/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"
        },
        {
          "id": "f8de59e4dd774dbb9a7034857466c377in01",
          "status": "normal",
          "name": "mysql_80_4u8g_single_2",
          "engine_name": "mysql",
          "engine_version": "8.0",
          "private_ip": "172.16.208.79",
          "port": 3306,
          "time_zone": "UTC+08:00"
        }
      ],
      "offset": 0,
      "limit": 10,
      "total": 2
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Codes

Error Codes

For details, see Error Codes.