Lists the details of all tables in a database.
Operation description
This API can only be used for database instances where the control mode is set to 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 obtain this ID by calling GetUserActiveTenant or ListUserTenants. |
3*** |
| DatabaseId |
string |
Yes |
The ID of the physical database. You can obtain this ID by calling ListDatabases or SearchDatabase. |
1860**** |
| PageNumber |
integer |
No |
The number of the page to return. |
1 |
| PageSize |
integer |
No |
The number of entries per page. |
10 |
| SearchName |
string |
No |
The keyword for a fuzzy search on table names. |
test |
| ReturnGuid |
boolean |
No |
Specifies whether to return the globally unique identifier (GUID) of the table. Valid values:
|
true |
| RealLoginUserUid |
string |
No |
The ID of the user that calls the API. |
1234 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| TotalCount |
integer |
The total number of matching tables. |
1 |
| RequestId |
string |
The request ID. |
B16FB618-5E96-4FFD-BB0D-490C890A4030 |
| ErrorCode |
string |
The error code. |
UnknownError |
| TableList |
object |
||
| Table |
array<object> |
The list of tables. |
|
|
array<object> |
|||
| DatabaseId |
string |
The ID of the physical database. |
1860**** |
| TableName |
string |
The table name. |
consumption_records |
| StoreCapacity |
integer |
The approximate storage space that the table uses, in MB. |
1024 |
| OwnerIdList |
object |
||
| 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 encoding of the table. |
utf8 |
| OwnerNameList |
object |
||
| OwnerNames |
array |
The nicknames of the table owners. |
|
|
string |
The nickname of a table owner. |
owner_name |
|
| TableSchemaName |
string |
The database that contains the table. |
qntest |
| TableType |
string |
The type of the table. Default: NORMAL. |
NORMAL |
| TableGuid |
string |
The GUID of the table in DMS. |
IDB_44743****.qntest.consumption_records |
| Engine |
string |
The table engine. |
InnoDB |
| NumRows |
integer |
The estimated number of rows in the table. |
10085 |
| TableId |
string |
The table ID. |
44743**** |
| ErrorMessage |
string |
The error message. |
UnknownError |
| Success |
boolean |
Indicates if 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.