更新时间:2025-09-12 GMT+08:00
分享

查询资产目录分类结果top5

功能介绍

该接口用于查询资产目录中的分类结果,返回分类结果的前5条记录。支持通过标签ID和类型ID进行过滤,帮助用户快速了解资产目录的分类分布。

调用方法

请参见如何调用API

URI

GET /v1/{project_id}/metadata/catalog/classification-tops

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目唯一标识符

表2 Query参数

参数

是否必选

参数类型

描述

label_id

String

标签ID,用于过滤特定标签的分类结果

type_id

String

类型ID,用于过滤特定类型的分类结果

请求参数

响应参数

状态码:200

表3 响应Body参数

参数

参数类型

描述

detection_classifications

Array of ClassificationRule objects

检测到的分类列表

表4 ClassificationRule

参数

参数类型

描述

classification_name

String

分类名称

column_details

Array of ColumnInfoAndMatchInfo objects

列详情列表

hit_number

Integer

匹配数量

表5 ColumnInfoAndMatchInfo

参数

参数类型

描述

asset_id

String

资产ID

asset_name

String

资产名称

column_fqn

String

列的完全限定名称(FQN)

db_type

String

数据库类型

match_infos

Array of ClassificationMatchInfo objects

匹配信息列表

表6 ClassificationMatchInfo

参数

参数类型

描述

classification_id

String

分类ID

classification_name

String

分类名称

match_content_cnt

Integer

匹配内容数量

match_rate

Double

匹配率(百分比)

matched_detail

String

匹配详情

matched_examples

Array of MatchedExamples objects

匹配示例列表

rule_id

String

规则ID

rule_name

String

规则名称

security_level_color

Integer

安全级别颜色(RGB值)

security_level_id

String

安全级别ID

security_level_name

String

安全级别名称

template_id

String

模板ID

template_name

String

模板名称

表7 MatchedExamples

参数

参数类型

描述

context

String

匹配上下文

line_number

Long

匹配所在行号

matched_content

String

匹配内容

nlp_revised

Boolean

是否经过NLP修订

请求示例

响应示例

状态码

状态码

描述

200

查询结果

401

未授权,用户未登录或令牌无效

403

无权限访问该资源

404

指定的项目不存在

错误码

请参见错误码

相关文档