Files
doc-exports/docs/ddm/api-ref/en-us_topic_0000002217069697.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

30 KiB

Querying Details About a Schema (a V3 API)

Function

This API is used to query details about a schema.

Constraints

None

URI

GET /v3/{project_id}/instances/{instance_id}/databases/{database_name}

Table 1 Path parameters

Parameter

Type

Mandatory

Description

project_id

String

Yes

Project ID of a tenant in a region

For how to obtain a project ID, see Obtaining a Project ID.

instance_id

String

Yes

Instance ID

database_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.

Example Request

Querying details about a schema
GET https://ddm.eu-de.otc.t-systems.com/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/1f5c9fd6cd984056ba89c8c87cc03278in09/databases/ddm_db_test

Response

  • Normal response
    Table 3 Response body parameters

    Parameter

    Type

    Description

    shards

    Array of Shard objects

    Shard information

    status

    String

    Status of a schema. For details, see DDM Schema Statuses.

    created

    String

    Creation time. The format is yyyy-MM-ddTHH:mm:ssZ.

    T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Central European time zone, the offset is +0100.

    updated

    String

    Update time. The format is yyyy-MM-ddTHH:mm:ssZ.

    T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Central European time zone, the offset is +0100.

    name

    String

    Schema name

    shard_mode

    String

    Sharding mode of the schema, which can be:

    • cluster: indicates that the schema is in sharded mode.
    • single: indicates that the schema is in unsharded mode.

    shard_number

    String

    Number of shards in the same working mode

    data_nodes

    Array of DataNode objects

    Associated data nodes

    Table 4 Shard

    Parameter

    Type

    Description

    data_node_id

    String

    ID of the data node instance where the shard is held

    physical_db_name

    String

    Shard name

    status

    String

    Status of a shard. For details, see DDM Schema Statuses.

    shard_index

    Integer

    Shard index

    Table 5 DataNode

    Parameter

    Type

    Description

    id

    String

    Instance ID of a data node

    status

    String

    Instance status of a data node. It can be obtained from Data Node Statuses.

    name

    String

    Instance name of a data node

    engine_name

    String

    Instance engine name of a data node

    engine_version

    String

    Engine version of a data node

    mem

    Integer

    Memory of a data node

    cpu

    Integer

    Number of vCPUs of a data node

  • Normal response example
    {
      "shards": [
        {
          "data_node_id": "253883d46****d3fb38161b57in01",
          "physical_db_name": "ddm_db_test_0000",
          "status": "RUNNING",
          "shard_index": 0
        },
        {
          "data_node_id": "253883d4*****9960d3fb38161b57in01",
          "physical_db_name": "ddm_db_test_0001",
          "status": "RUNNING",
          "shard_index": 1
        }
      ],
      "status": "RUNNING",
      "created": "2025-02-10T07:18:26+0000",
      "updated": "2025-02-10T07:18:26+0000",
      "name": "ddm_db_test",
      "shard_mode": "cluster",
      "shard_number": 2,
      "data_nodes": [
        {
          "id": "253883****089960d3fb38161b57in01",
          "status": "normal",
          "name": "mysql*****YwVuVoio6g8AnF5oUH5i",
          "engine_name": "mysql",
          "engine_version": "5.7",
          "mem": 4,
          "cpu": 2
        }
      ]
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Codes

Error Codes

For details, see Error Codes.