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

31 KiB

Querying Details of a Schema (a V1 API)

Function

This API is used to query details about a schema.

Constraints

URI

GET /v1/{project_id}/instances/{instance_id}/databases/{ddm_dbname}

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

instance_id

Yes

String

DDM instance ID

ddm_dbname

Yes

String

Name of the schema to be queried, which is case-insensitive

Request Parameters

Table 2 Request header 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

Table 3 Response body parameters

Parameter

Type

Description

database

GetDatabaseResponseBean object

Schema information

Table 4 GetDatabaseResponseBean

Parameter

Type

Description

name

String

Schema name

created

Long

Time when the schema was created. The value is a UNIX timestamp, in milliseconds.

status

String

Schema status. For details about this parameter value, see Status Description.

updated

Long

Time when the schema was last updated. The value is a UNIX timestamp, in milliseconds.

databases

Array of GetDatabases objects

Sharding information of the schema

shard_mode

String

Sharding mode of the schema

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

shard_number

Integer

Number of shards in the same working mode

shard_unit

Integer

Number of shards per RDS instance

dataVips

Array of strings

IP address and port number for connecting to the schema

used_rds

Array of GetDatabaseUsedRds objects

Associated RDS instances

Table 5 GetDatabases

Parameter

Type

Description

dbslot

Integer

Number of shards

name

String

Shard name

status

String

Shard status

created

Long

Creation time. The value is a UNIX timestamp, in milliseconds.

updated

Long

Last update time. The value is a UNIX timestamp, in milliseconds.

id

String

ID of the RDS instance where the shard is located

idName

String

Name of the RDS instance where the shard is located

Table 6 GetDatabaseUsedRds

Parameter

Type

Description

id

String

Node ID of the associated RDS instance

name

String

Name of the associated RDS instance

status

String

Status of the associated RDS instance

error_msg

String

Response message. This parameter is not returned if no abnormality occurs.

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

errCode

String

Service error code

externalMessage

String

Error message

Status code: 500

Table 8 Response body parameters

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/databases/db_7567

Example Response

Status code: 200

OK

{
  "database" : {
    "name" : "db_7567",
    "created" : 1604631243234,
    "status" : "RUNNING",
    "updated" : 1604631243234,
    "databases" : [ {
      "id" : "e70a82534a364492b795c5080e3a1591in01",
      "name" : "db_7567_0000",
      "idName" : "db_7567_0000",
      "dbslot" : 0,
      "status" : "RUNNING",
      "created" : 1604631243234,
      "updated" : 1604631243234
    }, {
      "id" : "e70a82534a364492b795c5080e3a1591in01",
      "name" : "db_7567_0001",
      "idName" : "db_7567_0001",
      "dbslot" : 1,
      "status" : "RUNNING",
      "created" : 1604631243234,
      "updated" : 1604631243234
    }, {
      "id" : "e70a82534a364492b795c5080e3a1591in01",
      "name" : "db_7567_0002",
      "idName" : "db_7567_0002",
      "dbslot" : 2,
      "status" : "RUNNING",
      "created" : 1604631243234,
      "updated" : 1604631243234
    }, {
      "id" : "e70a82534a364492b795c5080e3a1591in01",
      "name" : "db_7567_0003",
      "idName" : "db_7567_0003",
      "dbslot" : 3,
      "status" : "RUNNING",
      "created" : 1604631243234,
      "updated" : 1604631243234
    }, {
      "id" : "e70a82534a364492b795c5080e3a1591in01",
      "name" : "db_7567_0004",
      "idName" : "db_7567_0004",
      "dbslot" : 4,
      "status" : "RUNNING",
      "created" : 1604631243234,
      "updated" : 1604631243234
    }, {
      "id" : "e70a82534a364492b795c5080e3a1591in01",
      "name" : "db_7567_0005",
      "idName" : "db_7567_0005",
      "dbslot" : 5,
      "status" : "RUNNING",
      "created" : 1604631243234,
      "updated" : 1604631243234
    }, {
      "id" : "e70a82534a364492b795c5080e3a1591in01",
      "name" : "db_7567_0006",
      "idName" : "db_7567_0006",
      "dbslot" : 6,
      "status" : "RUNNING",
      "created" : 1604631243234,
      "updated" : 1604631243234
    }, {
      "id" : "e70a82534a364492b795c5080e3a1591in01",
      "name" : "db_7567_0007",
      "idName" : "db_7567_0007",
      "dbslot" : 7,
      "status" : "RUNNING",
      "created" : 1604631243234,
      "updated" : 1604631243234
    } ],
    "shard_mode" : "cluster",
    "shard_number" : 8,
    "shard_unit" : 8,
    "dataVips" : [ {
      "192.168.185.97:5066"
    } ],
    "used_rds" : [ {
      "id" : "e70a82534a364492b795c5080e3a1591in01",
      "name" : "rds-5338",
      "status" : "normal"
    } ]
  }
}

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.