Queries the details of tables in a physical database.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListTables

The operation that you want to perform. Set the value to ListTables.

Tid Long Yes 3***

The ID of the tenant. You can call the GetUserActiveTenant or ListUserTenants operation to obtain the tenant ID.

DatabaseId String Yes 1860****

The ID of the physical database. You can call the ListDatabases or SearchDatabase operation to obtain the ID of the physical database.

PageNumber Integer Yes 1

The number of the page to return.

PageSize Integer No 10

The number of entries to return on each page.

SearchName String No test

The name used to search for tables. Fuzzy search is supported.

ReturnGuid Boolean No true

Specifies whether to return the GUID of a table. Valid values:

  • true: returns the GUID of a table.
  • false: does not return the GUID of a table.
RegionId String No cn-hangzhou

The ID of the region in which Data Management (DMS) is activated. For more information, see RegionID parameter.

Response parameters

Parameter Type Example Description
TotalCount Long 1

The total number of tables that meet the query conditions.

RequestId String B16FB618-5E96-4FFD-BB0D-490C890A4030

The ID of the request.

ErrorCode String UnknownError

The error code that is returned if the request fails.

TableList Array of Table

The details of the tables.

Table
DatabaseId String 1860****

The ID of the physical database.

TableName String consumption_records

The name of the table.

StoreCapacity Long 1024

The storage space that is occupied by the table. This is a statistical value and does not indicate the accurate storage space. Unit: MB.

OwnerIdList Array of String 51****

The IDs of the owners of the table.

Description String test

The description of the table.

Encoding String utf8

The encoding format of the table.

OwnerNameList Array of String owner_name

The nicknames of the owners of the table.

TableSchemaName String qntest

The database in which the table resides.

TableType String NORMAL

The type of the table. Default value: NORMAL.

TableGuid String IDB_44743****.qntest.consumption_records

The GUID of the table in DMS.

Engine String InnoDB

The engine of the table.

NumRows Long 10085

The number of rows in the table. This is a statistical value and does not indicate the actual number of rows.

TableId String 44743****

The ID of the table.

ErrorMessage String UnknownError

The error message returned if the request fails.

Success Boolean true

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.

Examples

Sample requests

http(s)://dms-enterprise.aliyuncs.com/?Action=ListTables
&Tid=3***
&DatabaseId=1860****
&PageNumber=1
&PageSize=10
&SearchName=test
&ReturnGuid=true
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListTablesResponse>
    <TotalCount>1</TotalCount>
    <RequestId>B16FB618-5E96-4FFD-BB0D-490C890A4030</RequestId>
    <TableList>
        <DatabaseId>1860****</DatabaseId>
        <TableName>consumption_records</TableName>
        <StoreCapacity>1024</StoreCapacity>
        <OwnerIdList>51****</OwnerIdList>
        <Description>test</Description>
        <Encoding>utf8</Encoding>
        <OwnerNameList>owner_name</OwnerNameList>
        <TableSchemaName>qntest</TableSchemaName>
        <TableType>NORMAL</TableType>
        <TableGuid>IDB_44743****.qntest.consumption_records</TableGuid>
        <Engine>InnoDB</Engine>
        <NumRows>10085</NumRows>
        <TableId>44743****</TableId>
    </TableList>
    <Success>true</Success>
</ListTablesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TotalCount" : 1,
  "RequestId" : "B16FB618-5E96-4FFD-BB0D-490C890A4030",
  "TableList" : [ {
    "DatabaseId" : "1860****",
    "TableName" : "consumption_records",
    "StoreCapacity" : 1024,
    "OwnerIdList" : [ "51****" ],
    "Description" : "test",
    "Encoding" : "utf8",
    "OwnerNameList" : [ "owner_name" ],
    "TableSchemaName" : "qntest",
    "TableType" : "NORMAL",
    "TableGuid" : "IDB_44743****.qntest.consumption_records",
    "Engine" : "InnoDB",
    "NumRows" : 10085,
    "TableId" : "44743****"
  } ],
  "Success" : true
}

Error code

For a list of error codes, visit the Error Center.