Get Database List
Query the database list for a data source.
Endpoint: /openapi/v1/metadata/database/list
Method: GET
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
datasourceId | String | Yes | Data source ID. Call Retrieve Data Source List to get the value. | ds-d92qvqp8o1fw |
current | Integer | No | Page number, starting from 1. The default is 1. | 1 |
pageSize | Integer | No | Page size. The default is 10. | 10 |
Response parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
success | Bool | Whether the call succeeded. Values: true or false. | true |
requestId | String | Request ID. | Ej9m8LUA-jpmmtURnkpog6FOdpjt5PKP |
data | Array | Database list, including databaseName, charsetName, and collationName. | {"databaseName":"9zcloud"} |
current | Integer | Current page number. | 1 |
pageSize | Integer | Page size. | 50 |
total | Integer | Total number of databases. | 1 |
Database details
Each database object in data contains the following fields.
| Parameter | Type | Description | Example |
|---|---|---|---|
databaseName | String | Database name. | 9zcloud |
charsetName | String | Character set. | utf8 |
collationName | String | Collation. | utf8_general_ci |
Successful response
{
"success": true,
"requestId": "Ej9m8LUA-jpmmtURnkpog6FOdpjt5PKP",
"data": [
{
"databaseName": "9zcloud",
"charsetName": "utf8",
"collationName": "utf8_general_ci"
}
],
"current": 1,
"pageSize": 10,
"total": 1
}