
# 查询资产目录分类结果top5 - ShowClassificationTop
#### 功能介绍
该接口用于查询资产目录中的分类结果，返回分类结果的前5条记录。支持通过标签ID和类型ID进行过滤，帮助用户快速了解资产目录的分类分布。
#### 调用方法
请参见[如何调用API](https://support.huaweicloud.com/api-dsc/dsc_02_0008.html)。
#### 授权信息
账号具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权，具体权限要求请参见[权限和授权项](https://support.huaweicloud.com/api-dsc/dsc_02_0031.html)。
- 如果使用身份策略授权，当前API调用无需身份策略权限。
 
#### URI
GET /v1/{project_id}/metadata/catalog/classification-tops
表1路径参数 
| 参数         | 是否必选 | 参数类型   | 描述      |
|:---|:---|:---|:---|
| project_id | 是    | String | 项目唯一标识符 |
   
表2Query参数 
| 参数       | 是否必选 | 参数类型   | 描述                 |
|:---|:---|:---|:---|
| label_id | 否    | String | 标签ID，用于过滤特定标签的分类结果 |
| type_id  | 否    | String | 类型ID，用于过滤特定类型的分类结果 |
   
#### 请求参数
无
#### 响应参数
**状态码：200**
表3响应Body参数 
| 参数                        | 参数类型                                                                                       | 描述       |
|:---|:---|:---|
| detection_classifications | Array of [ClassificationRule] objects | 检测到的分类列表 |
   
 表4ClassificationRule 
| 参数                  | 参数类型                                                                                               | 描述    |
|:---|:---|:---|
| classification_name | String                                                                                             | 分类名称  |
| column_details      | Array of [ColumnInfoAndMatchInfo] objects | 列详情列表 |
| hit_number          | Integer                                                                                            | 匹配数量  |
   
 表5ColumnInfoAndMatchInfo 
| 参数          | 参数类型                                                                                                 | 描述            |
|:---|:---|:---|
| asset_id    | String                                                                                               | 资产ID          |
| asset_name  | String                                                                                               | 资产名称          |
| column_fqn  | String                                                                                               | 列的完全限定名称（FQN） |
| db_type     | String                                                                                               | 数据库类型         |
| match_infos | Array of [ClassificationMatchInfo] objects | 匹配信息列表        |
   
 表6ClassificationMatchInfo 
| 参数                   | 参数类型                                                                                 | 描述           |
|:---|:---|:---|
| 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                                                                               | 模板名称         |
   
 表7MatchedExamples 
| 参数              | 参数类型    | 描述        |
|:---|:---|:---|
| context         | String  | 匹配上下文     |
| line_number     | Long    | 匹配所在行号    |
| matched_content | String  | 匹配内容      |
| nlp_revised     | Boolean | 是否经过NLP修订 |
   
#### 请求示例
无
#### 响应示例
无
#### 状态码
| 状态码 | 描述             |
|:---|:---|
| 200 | 查询结果           |
| 401 | 未授权，用户未登录或令牌无效 |
| 403 | 无权限访问该资源       |
| 404 | 指定的项目不存在       |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-dsc/ErrorCode.html)。
