Querying Details of a Schema
Function
This API is used to query details about a schema.
Constraints
None
URI
GET /v1/{project_id}/instances/{instance_id}/databases/{ddm_dbname}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID To obtain this value, see Obtaining a 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
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. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
database |
GetDatabaseResponseBean object |
Schema information |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Schema name |
created |
String |
Time when the schema is created |
status |
String |
Schema status |
updated |
String |
Time when the DDM instance is last updated |
databases |
Array of GetDatabases objects |
Sharding information of the schema |
shard_mode |
String |
Sharding mode of the schema
|
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 |
Parameter |
Type |
Description |
---|---|---|
dbslot |
Integer |
Number of shards |
name |
String |
Shard name |
status |
String |
Schema status |
created |
String |
Time when the shard is created |
updated |
String |
Time when the shard is last updated |
id |
String |
ID of the RDS instance where the shard is located |
idName |
String |
Name of the physical database |
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
Parameter |
Type |
Description |
---|---|---|
errCode |
String |
Service error code |
externalMessage |
String |
Error message |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
errCode |
String |
Service error code |
externalMessage |
String |
Error message |
Example Request
Querying details of a schema
GET https://{endpoint} /v1/{project_id}/instances/{instance_id}/databases/{ddm_dbname}
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot