Call ListTables to retrieve details about tables in a database.
Operation description
This API can only be called for Database Instances with a Control Mode of Secure Collaboration.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dms:ListTables |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Tid |
integer |
No |
The tenant ID. You can call the GetUserActiveTenant or ListUserTenants operation to obtain the tenant ID. |
3*** |
| DatabaseId |
string |
Yes |
The database ID. You can call the ListDatabases or SearchDatabase operation to obtain the database ID. |
1860**** |
| PageNumber |
integer |
No |
The page number of the results. |
1 |
| PageSize |
integer |
No |
The number of entries per page. |
10 |
| SearchName |
string |
No |
The search keyword for table names. Fuzzy Search is supported. |
test |
| ReturnGuid |
boolean |
No |
Specifies whether to return the globally unique identifier (GUID) of the table. Valid values:
|
true |
| RealLoginUserUid |
string |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| TotalCount |
integer |
The total number of tables that meet the specified criteria. |
1 |
| RequestId |
string |
The request ID. |
B16FB618-5E96-4FFD-BB0D-490C890A4030 |
| ErrorCode |
string |
The error code. |
UnknownError |
| TableList |
object |
The details about the tables. |
|
| Table |
array<object> |
The list of tables. |
|
|
array<object> |
|||
| DatabaseId |
string |
The ID of the physical database. |
1860**** |
| TableName |
string |
The name of the table. |
consumption_records |
| StoreCapacity |
integer |
The storage space occupied by the table. Unit: MB. This is a statistical value and not an accurate value. |
1024 |
| OwnerIdList |
object |
The IDs of the table owners. |
|
| OwnerIds |
array |
The user IDs of the table owners. |
|
|
string |
The user ID of a table owner. |
51**** |
|
| Description |
string |
The description of the table. |
test |
| Encoding |
string |
The character set of the table. |
utf8 |
| OwnerNameList |
object |
The nicknames of the table owners. |
|
| OwnerNames |
array |
A list of the table owner nicknames. |
|
|
string |
The nickname of a table owner. |
owner_name |
|
| TableSchemaName |
string |
The name of the database to which the table belongs. |
qntest |
| TableType |
string |
The type of the table. Default value: NORMAL. |
NORMAL |
| TableGuid |
string |
The globally unique identifier (GUID) of the table in Data Management (DMS). |
IDB_44743****.qntest.consumption_records |
| Engine |
string |
The storage engine of the table. |
InnoDB |
| NumRows |
integer |
The number of rows in the table. This is a statistical value and not an accurate value. |
10085 |
| TableId |
string |
The ID of the table. |
44743**** |
| ErrorMessage |
string |
The error message. |
UnknownError |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
Examples
Success response
JSON format
{
"TotalCount": 1,
"RequestId": "B16FB618-5E96-4FFD-BB0D-490C890A4030",
"ErrorCode": "UnknownError",
"TableList": {
"Table": [
{
"DatabaseId": "1860****",
"TableName": "consumption_records",
"StoreCapacity": 1024,
"OwnerIdList": {
"OwnerIds": [
"51****"
]
},
"Description": "test",
"Encoding": "utf8",
"OwnerNameList": {
"OwnerNames": [
"owner_name"
]
},
"TableSchemaName": "qntest",
"TableType": "NORMAL",
"TableGuid": "IDB_44743****.qntest.consumption_records",
"Engine": "InnoDB",
"NumRows": 10085,
"TableId": "44743****"
}
]
},
"ErrorMessage": "UnknownError",
"Success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.