Querying Schemas
Function
This API is used to query schemas of a DDM instance.
Constraints
None
URI
GET /v1/{project_id}/instances/{instance_id}/databases
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID |
instance_id |
Yes |
String |
DDM instance ID |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
No |
Number |
Number of records displayed on each page. The start value cannot be less than 0. Minimum value: 0 |
limit |
No |
Number |
Number of records on each page. The value is greater than 0 and less than or equal to 128. Minimum value: 1 Maximum value: 128 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token It can be obtained by calling the IAM API (value of X-Subject-Token in the response header). |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
databases |
Array of GetDDMDatabaseInfo objects |
Schema information |
total |
Integer |
Total number of records |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Schema name |
shard_mode |
String |
Working mode of the schema
|
shard_number |
Integer |
Number of shards in the same working mode |
status |
String |
Schema status |
created |
String |
Time when the schema is created |
used_rds |
Array of GetDDMDatabaseUsedrds objects |
Details of the RDS DB instance associated with the schema |
shard_unit |
Integer |
Number of shards per RDS DB instance |
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 |
error_msg |
String |
Response message. This parameter is not returned if no error occurs. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
errCode |
String |
Service error code |
error_msg |
String |
Error message |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
errCode |
String |
Service error code |
error_msg |
String |
Error message |
Example Request
GET https://{endpoint}/v1/{project_id}/instances/{instance_id}/databases?offset={offset}&limit={limit}
Example Response
Status code: 400
bad request
{ "error_code": "DDM.1008", "error_msg": "This DDM instance does not exist" }
Status code: 500
Server failure
{ "error_code": "DDM.2061", "error_msg": "Server failure" }
Status Codes
For details, see Status Codes.
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