ListTagMetaAsset

更新时间:
复制 MD 格式

Lists Database and Table assets associated with a specific Tag in a DataAgent Workspace.

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

Tid

integer

No

The ID of the tenant.

Note

You can find the tenant ID by hovering the pointer over the profile picture in the upper-right corner of the Data Management Service (DMS) console. For more information, see View tenant information.

3***

TagName

string

Yes

The name of the tag. To retrieve database and table assets from a DataAgent Workspace, specify the tag name in the format sys::DMS-DA::${DataAgentRegionId}::space:${DataAgentWorkspaceId}.

sys::DMS-DA::cn-hangzhou::space:abcde

MetaType

string

Yes

  • Specify META_DATABASE to retrieve databases.

  • Specify META_TABLE to retrieve tables in a specific database.

META_DATABASE

MetaParentId

string

No

The ID of the parent asset.

  • Omit this parameter to retrieve databases.

  • To retrieve tables in a specific database, set this parameter to the dbId of the database.

123456

SearchKey

string

No

A keyword for fuzzy search.

test

PageNumber

integer

Yes

The page number.

1

PageSize

integer

Yes

The number of entries per page.

50

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931

ErrorCode

string

The error code for a failed request.

UnknownError

ErrorMessage

string

The error message for a failed request.

UnknownError

Success

boolean

Indicates whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

true

Data

array<object>

A list of assets.

array<object>

MetaType

string

  • META_DATABASE: The asset is a database.

  • META_TABLE: The asset is a table.

META_DATABASE

MetaEntityAttrs

object

If MetaType is META_DATABASE, this object contains the following fields:

  • schemaName: The name of the database. For PostgreSQL-compatible databases, this field indicates the schema name.

  • catalogName: The name of the catalog. This field applies only to PostgreSQL-compatible databases.

  • dbId: The ID of the database in Data Management Service (DMS).

  • instanceResourceId: The resource ID of the instance. If the database is in an ApsaraDB RDS instance, this field indicates the ID of the RDS instance.

  • dbType: The type of the database in DMS.

If MetaType is META_TABLE, this object contains the following fields:

  • schemaName: The name of the database containing the table. For PostgreSQL-compatible databases, this field indicates the schema name.

  • catalogName: The name of the catalog. This field applies only to PostgreSQL-compatible databases.

  • dbId: The ID of the database in DMS.

  • dbType: The type of the database in DMS.

  • tableName: The name of the table.

  • tableSchemaName: The name of the table schema. This field is valid only for SQL Server.

{"schemaName": "test"}

TotalCount

integer

The total number of matching entries.

100

Examples

Success response

JSON format

{
  "RequestId": "0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931",
  "ErrorCode": "UnknownError",
  "ErrorMessage": "UnknownError",
  "Success": true,
  "Data": [
    {
      "MetaType": "META_DATABASE",
      "MetaEntityAttrs": {
        "schemaName": "test"
      }
    }
  ],
  "TotalCount": 100
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.