Querying Details of a Schema

Function

This API is used to query the details of a specified schema.

URI

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

Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Project ID of a tenant in a region

instance_id

Yes

DDM instance ID

ddm_dbname

Yes

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

Request

Request parameters

None

Response

Response parameters

Table 2 Parameter description

Parameter

Type

Description

database

Object

Schema information

Table 3 Description of parameter database

Parameter

Type

Description

databases

Array

Sharding information of the schema

dataVips

Array

IP address and port number for connecting to the schema

status

String

Sharding status

created

String

Time when the schema is created

name

String

Shard name

updated

String

Time when the schema is last updated

shard_mode

String

Working mode of the schema. The value can be:

  • 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 sharding mode

shard_unit

Integer

Number of shards per RDS DB instance

used_rds

Array

Information about the associated RDS DB instance

Table 4 Description of parameter databases

Parameter

Type

Description

id

String

ID of the RDS DB instance where the shard resides

name

String

Shard name

idName

String

Name of the physical database on the RDS DB instance

status

String

Shard status

dbslot

Integer

Number of shards

created

String

Time when the subnet was created

updated

String

Last time when the shard was updated

Table 5 Description of parameter used_rds

Parameter

Type

Description

id

String

Node ID of the associated RDS DB instance

name

String

Name of the associated RDS DB instance

status

String

Status of the associated RDS DB instance

Example

  • Example request

    None

  • Example response
    {
        "database": {
            "databases": [
                {
                    "id": "6b9f92c5284544eb92f7c4f6da59a58cin01",
                    "name": "db_3406_0000",
                    "idName": "db_3406_0000",
                    "status": "RUNNING",
                    "dbSlot": 0,
                    "created": 1603194611601,
                    "updated": 1603194611601
                },
                {
                    "id": "6b9f92c5284544eb92f7c4f6da59a58cin01",
                    "name": "db_3406_0001",
                    "idName": "db_3406_0001",
                    "status": "RUNNING",
                    "dbSlot": 1,
                    "created": 1603194611601,
                    "updated": 1603194611601
                },
                {
                    "id": "6b9f92c5284544eb92f7c4f6da59a58cin01",
                    "name": "db_3406_0002",
                    "idName": "db_3406_0002",
                    "status": "RUNNING",
                    "dbSlot": 2,
                    "created": 1603194611601,
                    "updated": 1603194611601
                },
                {
                    "id": "6b9f92c5284544eb92f7c4f6da59a58cin01",
                    "name": "db_3406_0003",
                    "idName": "db_3406_0003",
                    "status": "RUNNING",
                    "dbSlot": 3,
                    "created": 1603194611601,
                    "updated": 1603194611601
                },
                {
                    "id": "6b9f92c5284544eb92f7c4f6da59a58cin01",
                    "name": "db_3406_0004",
                    "idName": "db_3406_0004",
                    "status": "RUNNING",
                    "dbSlot": 4,
                    "created": 1603194611601,
                    "updated": 1603194611601
                },
                {
                    "id": "6b9f92c5284544eb92f7c4f6da59a58cin01",
                    "name": "db_3406_0005",
                    "idName": "db_3406_0005",
                    "status": "RUNNING",
                    "dbSlot": 5,
                    "created": 1603194611601,
                    "updated": 1603194611601
                },
                {
                    "id": "6b9f92c5284544eb92f7c4f6da59a58cin01",
                    "name": "db_3406_0006",
                    "idName": "db_3406_0006",
                    "status": "RUNNING",
                    "dbSlot": 6,
                    "created": 1603194611601,
                    "updated": 1603194611601
                },
                {
                    "id": "6b9f92c5284544eb92f7c4f6da59a58cin01",
                    "name": "db_3406_0007",
                    "idName": "db_3406_0007",
                    "status": "RUNNING",
                    "dbSlot": 7,
                    "created": 1603194611601,
                    "updated": 1603194611601
                }
            ],
            "dataVips": [
                "192.168.0.175:5066"
                "192.168.0.92:5066"
                "192.168.0.145:5066"
                "192.168.0.126:5066"
            ],
            "status": "RUNNING",
            "created": 1603194611598,
            "name": "db_3406",
            "updated": 1603249742812,
            "shard_mode": "cluster",
            "shard_number": 8,
            "shard_unit": 8,
            "used_rds": [
                {
                    "id": "6b9f92c5284544eb92f7c4f6da59a58cin01",
                    "status": "normal",
                    "name": "rds-lxq"
                }
            ]
        }
    }

For failure responses, see Abnormal Request Results.

Status Code

For details, see Status Codes.