Updated on 2026-01-13 GMT+08:00

Querying Databases in an Asset Catalog

Function

This API is used to query databases in an asset catalog. You can filter and sort database information based on multiple parameters to obtain the database information that meets the filter criteria.

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/metadata/catalog/databases

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Unique project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

address

No

String

Database address, which is used to filter databases with a specific address.

col_id

No

String

Classification ID, which is used to filter databases of a specific category.

instance_name

No

String

Instance name, which is used to filter database instances with a specific name.

label_id

No

String

Label ID, which is used to filter the database of a specific label.

limit

No

Integer

Maximum number of records that can be returned. The default value is 50.

offset

No

Integer

Start position of the query. The default value is 0.

sort

No

String

Sorting field, which is used to specify how results are ranked.

type_id

No

String

Type ID, which is used to filter databases of a specific type.

user

No

String

User information, which is used to filter the database of a specific user.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

instance_infos

Array of CatalogInstanceInfo objects

Instance information list.

total

Integer

Total number.

Table 4 CatalogInstanceInfo

Parameter

Type

Description

address

String

Instance address.

db_infos

Array of CatalogDbInfo objects

Database information list.

instance_id

String

Instance ID.

instance_name

String

Instance name.

sensitive_col_num

Integer

Number of sensitive columns.

sensitive_db_num

Integer

Number of sensitive databases.

sensitive_table_num

Integer

Number of sensitive tables.

user

String

User.

Table 5 CatalogDbInfo

Parameter

Type

Description

asset_id

String

Asset ID.

classifications

Array of strings

Classification list.

color_number

Integer

Color code.

db_id

String

Database ID.

db_name

String

Database name.

db_type

String

Database type.

latest_scan_time

Long

Latest scan time (Unix timestamp).

sensitive_level_name

String

Sensitive level name.

sensitive_table_count

Integer

Number of sensitive tables.

tags

Array of strings

Label list.

total_table_count

Integer

Total number of tables.

Example Requests

None

Example Responses

None

Status Codes

Status Code

Description

200

Query result.

401

Unauthorized. The user is not logged in or the token is invalid.

403

Unauthorized to access the resource.

404

The specified project does not exist.

Error Codes

See Error Codes.