Querying Databases
Description
This API is used to query databases.
Restrictions
- This API applies only to DDS Community Edition.
- This operation is not allowed if the DB instance is in any of the following statuses: creating, changing instance class, changing port, frozen, restarting, or abnormal.
URI
|
Parameter |
Type |
IN |
Mandatory |
Description |
|---|---|---|---|---|
|
project_id |
string |
path |
Yes |
Project ID of a tenant in a region. To obtain the project ID, see Obtaining a Project ID. |
|
instance_id |
string |
path |
Yes |
Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If you do not have an instance, call the API described in Creating a DB Instance to create one. |
|
offset |
Integer |
path |
No |
Index offset. The value must be no less than 0. If this parameter is not transferred, the value is 0 by default. |
|
limit |
Integer |
path |
No |
Maximum records to be queried. The value ranges from 1 to 100. If this parameter is not transferred, the first 100 DB instances are queried by default. |
Request Parameters
|
Parameter |
Type |
IN |
Mandatory |
Description |
|---|---|---|---|---|
|
X-Auth-Token |
string |
header |
Yes |
User token |
Response Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
databases |
Array of objects |
Database list. For details, see Table 4. |
|
total_count |
Integer |
Total number. |
|
Name |
Type |
Description |
|---|---|---|
|
name |
String |
Database name. This parameter is not displayed for the config and admin databases. |
|
data_size |
String |
Database logical size, in GB. The value contains two decimal places. The logical size refers to the size of data stored in a database, excluding the size of indexes and logs. |
|
storage_size |
String |
Used storage space, in GB. The value contains two decimal places. The used storage space refers to the size of the physical space occupied by data files, log files, and index files on the disk. |
|
collection_num |
Integer |
Number of collections in a database. |
- Example response
{ "databases" : [ { "name" : "dds-test", "data_size" : "3593", "storage_size" : "256", "collection_num" : "5" } ], "total_count" : 1 }
Status Code
For details, see Status Code.
Error Code
For details, see Error Code.
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