All Products
Search
Document Center

Data Management:GetTableDBTopology

Last Updated:Oct 21, 2024

Queries the topology of a data table.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
TidlongNo

The ID of the tenant.

Note To view the tenant ID, move the pointer over the profile picture in the upper-right corner of the Data Management (DMS) console. For more information, see Manage DMS tenants.
3***
TableGuidstringYes

The GUID of the table in DMS.

Note
  • If the database to which the table belongs is a logical database, you can call the ListLogicTables operation to obtain the GUID. The value of the ReturnGuid parameter must be set to true.

  • If the database to which the table belongs is a physical database, you can call the ListTables operation to obtain the GUID. The value of the ReturnGuid parameter must be set to true.

IDB_L_9032.db-test.yuyang_test

Response parameters

ParameterTypeDescriptionExample
object

The schema of the response.

RequestIdstring

The ID of the request.

853F7FD4-D922-4EFB-931C-D253EF159E06
DBTopologyobject

The topology of the data table.

TableNamestring

The name of the table.

Note
  • If a logical table is queried, the name of the logical table is returned.

  • If a physical table is queried, the name of the physical table is returned.

yuyang_test
DataSourceListarray<object>

The data sources.

DataSourceobject

The schema of the response.

Sidstring

The system ID (SID) of the data source.

def
Hoststring

The endpoint of the data source.

xxx.mysql.polardb.rds.aliyuncs.com
DbTypestring

The type of the database. For more information about the valid values of this parameter, see DbType parameter.

MySQL
DatabaseListarray<object>

The physical databases.

Databaseobject

The schema of the response.

DbIdstring

The ID of the database.

489347
DbNamestring

The name of the database.

db-test
DbTypestring

The type of the database. For more information about the valid values of this parameter, see DbType parameter.

MySQL
TableListarray<object>

The physical tables.

Tableobject

The schema of the response.

TableNamestring

The name of the physical table.

151977812
TableTypestring

The type of the table. This is a reserved parameter.

yuyang_test_0000
TableIdstring

The ID of the table.

NORMAL
EnvTypestring

The type of the environment to which the database belongs. Valid values:

  • product: production environment
  • dev: development environment
  • pre: pre-release environment
  • test: test environment
  • sit: system integration testing (SIT) environment
  • uat: user acceptance testing (UAT) environment
  • pet: stress testing environment
  • stag: staging environment
Note For more information, see Change the environment type of an instance.
pre
Portinteger

The port that is used to connect to the data source.

3306
TableGuidstring

The GUID of the table in DMS.

IDB_L_9032.db-test.yuyang_test
ErrorCodestring

The error code.

UnknownError
ErrorMessagestring

The error message.

UnknownError
Successboolean

Indicates whether the request is successful.

true

Examples

Sample success responses

JSONformat

{
  "RequestId": "853F7FD4-D922-4EFB-931C-D253EF159E06",
  "DBTopology": {
    "TableName": "yuyang_test",
    "DataSourceList": [
      {
        "Sid": "def",
        "Host": "xxx.mysql.polardb.rds.aliyuncs.com",
        "DbType": "MySQL",
        "DatabaseList": [
          {
            "DbId": "489347",
            "DbName": "db-test",
            "DbType": "MySQL",
            "TableList": [
              {
                "TableName": "151977812",
                "TableType": "yuyang_test_0000",
                "TableId": "NORMAL"
              }
            ],
            "EnvType": "pre"
          }
        ],
        "Port": 3306
      }
    ],
    "TableGuid": "IDB_L_9032.db-test.yuyang_test"
  },
  "ErrorCode": "UnknownError",
  "ErrorMessage": "UnknownError",
  "Success": true
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history