All Products
Search
Document Center

Data Management:SearchTable

Last Updated:Aug 28, 2026

Searches for tables.

Operation description

This operation is available only for database instances that are managed in Security Collaboration mode.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dms:SearchTable

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

Tid

integer

No

The ID of the tenant.

Note

To view the tenant ID, hover over the profile picture in the upper-right corner of the Data Management (DMS) console. For more information, see the View information about the current tenant section of the "Manage DMS tenants" topic.

1

SearchKey

string

No

The keyword that is used to query tables.

test

PageNumber

integer

No

The number of the page to return.

1

PageSize

integer

No

The number of entries to return on each page.

10

EnvType

string

No

The type of the environment to which databases belong. For more information, see Change the environment type of an instance.

PRODUCT

SearchRange

string

No

The scope of tables that you want to query. Valid values:

  • HAS_PERMSSION: the tables on which the current account has permissions.

  • OWNER: the tables owned by the current account.

  • MY_FOCUS: the tables that the current account follows.

  • UNKNOWN: all tables.

OWNER

SearchTarget

string

No

The type of table that you want to query. Valid values:

  • TABLE: physical and logical tables

  • SINGLE_TABLE: physical tables

  • LOGIC_TABLE: logical tables

LOGIC_TABLE

DbType

string

No

The type of database. Valid values:

  • MySQL

  • SQLServer

  • PostgreSQL

  • Oracle

  • DRDS

  • OceanBase

  • Mongo

  • Redis

MySQL

ReturnGuid

boolean

No

Specifies whether to return the GUID of each table.

false

Response elements

Element

Type

Description

Example

object

SearchTableList

object

SearchTable

array<object>

The details of the tables.

array<object>

TableId

string

The ID of the table.

1

Description

string

The description of the table.

test

DatabaseId

string

The ID of the database to which the table belongs.

1

Encoding

string

The encoding format of the table.

utf8

DBSearchName

string

The name that is used to search for the database to which the table belongs.

test

EnvType

string

The type of the environment to which the database belongs.

test

DbType

string

The type of the database. Valid values:

  • MySQL

  • SQLServer

  • PostgreSQL

  • Oracle

  • DRDS

  • OceanBase

  • Mongo

  • Redis

mysql

TableName

string

The name of the table.

test_table

TableGuid

string

The GUID of the table.

IDB_L_9032.db-test.yuyang_test

TableSchemaName

string

The name of the database to which the table belongs.

test@xxx.xxx.xxx.xxx:3306

DbName

string

The name of the database.

test

OwnerNameList

object

OwnerNames

array

The nicknames of the table owners.

string

The nickname of the table owner.

user

Logic

boolean

Indicates whether the table is a logical table. Valid values:

  • true: The table is a logical table.

  • false: The table is not a logical table.

false

OwnerIdList

object

OwnerIds

array

The IDs of the table owners.

string

The ID of the table owner.

1

Engine

string

The engine of the table.

innodb

TotalCount

integer

The total number of entries that are returned.

1

RequestId

string

The ID of the request.

1489257F-1B5D-4B5B-89EF-923C12CEEBD1

ErrorCode

string

The error code returned if the request failed.

UnknownError

ErrorMessage

string

The error message returned if the request failed.

UnknownError

Success

boolean

Indicates whether the request was successful.

true

Examples

Success response

JSON format

{
  "SearchTableList": {
    "SearchTable": [
      {
        "TableId": "1",
        "Description": "test",
        "DatabaseId": "1",
        "Encoding": "utf8",
        "DBSearchName": "test",
        "EnvType": "test",
        "DbType": "mysql",
        "TableName": "test_table",
        "TableGuid": "IDB_L_9032.db-test.yuyang_test",
        "TableSchemaName": "test@xxx.xxx.xxx.xxx:3306",
        "DbName": "test",
        "OwnerNameList": {
          "OwnerNames": [
            "user"
          ]
        },
        "Logic": false,
        "OwnerIdList": {
          "OwnerIds": [
            "1"
          ]
        },
        "Engine": "innodb"
      }
    ]
  },
  "TotalCount": 1,
  "RequestId": "1489257F-1B5D-4B5B-89EF-923C12CEEBD1",
  "ErrorCode": "UnknownError",
  "ErrorMessage": "UnknownError",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.