文档首页/ 数据安全中心 DSC/ API参考/ API/ 分类分级结果修改/ 获取分类结果列表 - ListClassificationResults
更新时间:2026-10-20 GMT+08:00
分享

获取分类结果列表 - ListClassificationResults

功能介绍

功能介绍:获取指定扫描作业的分类结果列表,支持分页。 关键参数说明:通过job_id定位扫描作业。 返回值说明:返回分类结果总数、分类结果列表(含资产信息、安全等级、命中规则及匹配示例)、分页标记。

调用方法

请参见如何调用API。

授权信息

账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限。

  • 如果使用角色与策略授权,具体权限要求请参见权限和授权项。
  • 如果使用身份策略授权,当前API调用无需身份策略权限。

URI

GET /v1/{project_id}/scan-jobs/{job_id}/classification-results

表1 路径参数

参数

是否必选

参数类型

描述

project_id

是

String

参数解释:

项目ID,标识用户在数据安全中心控制台中创建的项目

约束限制:

不涉及

取值范围:

长度为32个字符的字符串

默认取值:

不涉及

job_id

是

String

参数解释:

扫描作业ID,标识需要获取分类结果的扫描作业,可通过调用查询扫描作业列表接口获取,或可在数据安全中心控制台扫描作业列表中查看

约束限制:

不涉及

取值范围:

长度1~64个字符

默认取值:

不涉及

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

是

String

参数解释:

用户Token,用于接口请求鉴权,可通过调用IAM服务查询用户Token接口获取

约束限制:

不涉及

取值范围:

不涉及

默认取值:

不涉及

响应参数

状态码:200

表3 响应Body参数

参数

参数类型

描述

total

Integer

参数解释:

总记录数

取值范围:

不涉及

classification_list

Array of ClassificationResultsEntity objects

参数解释:

分类结果列表,每个元素为一个ClassificationResultsEntity对象,包含资源ID、资产名称、安全等级等分类结果信息

取值范围:

数组类型

marker

Array of objects

参数解释:

分页标记对象,用于标识分页查询的游标位置,包含上一页最后一条记录的相关标识,用于获取下一页数据

取值范围:

对象类型

template_type

String

参数解释:

分类匹配响应类型

取值范围:

不涉及

表4 ClassificationResultsEntity

参数

参数类型

描述

id

String

参数解释:

资源ID,唯一标识

取值范围:

不涉及

project_id

String

参数解释:

项目ID

取值范围:

不涉及

job_id

String

参数解释:

作业ID

取值范围:

不涉及

task_id

String

参数解释:

任务ID

取值范围:

不涉及

ins_id

String

参数解释:

实例ID

取值范围:

不涉及

asset_id

String

参数解释:

资产ID

取值范围:

不涉及

asset_name

String

参数解释:

资产名称

取值范围:

不涉及

asset_type

String

参数解释:

资产类型

取值范围:

不涉及

db_type

String

参数解释:

数据库类型

取值范围:

不涉及

object_name

String

参数解释:

对象名称

取值范围:

不涉及

object_comment

String

参数解释:

对象注释

取值范围:

不涉及

object_full_path

String

参数解释:

对象完整路径

取值范围:

不涉及

security_level_name

String

参数解释:

安全等级名称

取值范围:

不涉及

security_level_id

String

参数解释:

安全级别ID,标识分类结果对应的安全等级

取值范围:

字符串类型

security_level_color

Integer

参数解释:

安全等级颜色

取值范围:

不涉及

create_time

Long

参数解释:

创建时间,分类结果的创建时间,为Unix时间戳,单位为毫秒

取值范围:

毫秒级Unix时间戳

update_time

Long

参数解释:

更新时间,分类结果的更新时间,为Unix时间戳,单位为毫秒

取值范围:

毫秒级Unix时间戳

scan_time

Long

参数解释:

扫描时间,本次扫描执行的时间,为Unix时间戳,单位为毫秒

取值范围:

毫秒级Unix时间戳

match_content_cnt

Integer

参数解释:

匹配内容数量

取值范围:

不涉及

match_rate

Double

参数解释:

匹配率,标识分类结果的匹配比例

取值范围:

浮点数,以百分比表示,取值范围0.0~100.0

match_info

Array of ClassificationMatchInfo objects

参数解释:

匹配信息列表,每个元素为一个ClassificationMatchInfo对象,包含模板ID、规则ID、安全等级等匹配详情信息

取值范围:

数组类型

manual_modify

Boolean

参数解释:

是否人工修改

取值范围:

true-是,false-否

is_new

Boolean

参数解释:

是否新增

取值范围:

true-是,false-否

表5 ClassificationMatchInfo

参数

参数类型

描述

template_id

String

参数解释:

模板ID

取值范围:

不涉及

template_name

String

参数解释:

模板名称

取值范围:

不涉及

rule_id

String

参数解释:

规则ID

取值范围:

不涉及

rule_name

String

参数解释:

规则名称

取值范围:

不涉及

security_level_name

String

参数解释:

安全等级名称

取值范围:

不涉及

security_level_id

String

参数解释:

分类匹配信息ID

取值范围:

不涉及

security_level_color

Integer

参数解释:

安全等级颜色

取值范围:

不涉及

classification_name

String

参数解释:

分类匹配信息名称

取值范围:

不涉及

classification_id

String

参数解释:

分类匹配信息ID

取值范围:

不涉及

matched_detail

String

参数解释:

匹配详情

取值范围:

不涉及

match_content_cnt

Integer

参数解释:

匹配内容数量

取值范围:

不涉及

match_rate

Double

参数解释:

匹配率

取值范围:

不涉及

template_type

String

参数解释:

分类匹配信息类型

取值范围:

不涉及

manual_modify

Boolean

参数解释:

是否人工修改

取值范围:

true-是,false-否

matched_examples

Array of MatchedExamples objects

参数解释:

匹配示例列表,每个元素为一个MatchedExamples对象,包含行号、匹配内容、上下文信息等匹配详情

取值范围:

数组类型

表6 MatchedExamples

参数

参数类型

描述

line_number

Long

参数解释:

行号

取值范围:

不涉及

matched_content

String

参数解释:

匹配内容

取值范围:

不涉及

context

String

参数解释:

上下文信息

取值范围:

不涉及

nlp_revised

Boolean

参数解释:

NLP优化标记,标识自然语言处理(NLP)是否对匹配内容(matchedContent)进行过优化

取值范围:

true-已优化,false-未优化

请求示例

获取分类结果列表

/v1/2b31ed520aabbccddeedb6e5712345678/scan-jobs/3a7b8c9d-0e1f-4a2b-9c8d-7e6f5a4b3c2d/classification-results

响应示例

状态码:200

{
  "total" : 2,
  "classification_list" : [ {
    "id" : "8f2a3b4c-5d6e-4f7a-2b3c-1d0e9f8a7b6c",
    "project_id" : "2d52d09a-f0d3-4c1a-86b4-fc7e435e9c7a",
    "job_id" : "3a7b8c9d-0e1f-4a2b-9c8d-7e6f5a4b3c2d",
    "task_id" : "6d0e1f2a-3b4c-4d5e-0f1a-9b8c7d6e5f4a",
    "ins_id" : "6d0e1f2a-3b4c-4d5e-0f1a-9b8c7d6e5f4a",
    "asset_id" : "5c9d0e1f-2a3b-4c4d-9e0f-8a7b6c5d4e3f",
    "asset_name" : "asset-obs-01",
    "asset_type" : "OBS",
    "db_type" : "MYSQL",
    "object_name" : "user_info_table",
    "object_comment" : "用户信息表",
    "object_full_path" : "/data/user_info",
    "security_level_name" : "classification-result-01",
    "security_level_id" : "5c9d0e1f-2a3b-4c4d-9e0f-8a7b6c5d4e3f",
    "security_level_color" : 3,
    "create_time" : 1700000000000,
    "update_time" : 1700000000000,
    "scan_time" : 1700000000000,
    "match_content_cnt" : 100,
    "match_rate" : 0.85,
    "match_info" : [ {
      "template_id" : "7e1f2a3b-4c5d-4e6f-1a2b-0c9d8e7f6a5b",
      "template_name" : "scan-template-01",
      "rule_id" : "4b8c9d0e-1f2a-4b3c-8d9e-7f6a5b4c3d2e",
      "rule_name" : "classification-rule-01",
      "security_level_name" : "classification-result-01",
      "security_level_id" : "5c9d0e1f-2a3b-4c4d-9e0f-8a7b6c5d4e3f",
      "security_level_color" : 3,
      "classification_name" : "classification-result-01",
      "classification_id" : "9a3b4c5d-6e7f-4a8b-3c4d-2e1f0a9b8c7d",
      "matched_detail" : "classification-result-01",
      "match_content_cnt" : 100,
      "match_rate" : 0.85,
      "template_type" : "BUILT_IN",
      "manual_modify" : true,
      "matched_examples" : [ {
        "line_number" : 10,
        "matched_content" : "\\d{11}",
        "context" : "classification-result-01",
        "nlp_revised" : true
      }, {
        "line_number" : 10,
        "matched_content" : "\\d{11}",
        "context" : "classification-result-01",
        "nlp_revised" : true
      } ]
    }, {
      "template_id" : "7e1f2a3b-4c5d-4e6f-1a2b-0c9d8e7f6a5b",
      "template_name" : "scan-template-01",
      "rule_id" : "4b8c9d0e-1f2a-4b3c-8d9e-7f6a5b4c3d2e",
      "rule_name" : "classification-rule-01",
      "security_level_name" : "classification-result-01",
      "security_level_id" : "5c9d0e1f-2a3b-4c4d-9e0f-8a7b6c5d4e3f",
      "security_level_color" : 3,
      "classification_name" : "classification-result-01",
      "classification_id" : "9a3b4c5d-6e7f-4a8b-3c4d-2e1f0a9b8c7d",
      "matched_detail" : "classification-result-01",
      "match_content_cnt" : 100,
      "match_rate" : 0.85,
      "template_type" : "BUILT_IN",
      "manual_modify" : true,
      "matched_examples" : [ {
        "line_number" : 10,
        "matched_content" : "\\d{11}",
        "context" : "classification-result-01",
        "nlp_revised" : true
      }, {
        "line_number" : 10,
        "matched_content" : "\\d{11}",
        "context" : "classification-result-01",
        "nlp_revised" : true
      } ]
    } ],
    "manual_modify" : true,
    "is_new" : true
  }, {
    "id" : "8f2a3b4c-5d6e-4f7a-2b3c-1d0e9f8a7b6c",
    "project_id" : "2d52d09a-f0d3-4c1a-86b4-fc7e435e9c7a",
    "job_id" : "3a7b8c9d-0e1f-4a2b-9c8d-7e6f5a4b3c2d",
    "task_id" : "6d0e1f2a-3b4c-4d5e-0f1a-9b8c7d6e5f4a",
    "ins_id" : "6d0e1f2a-3b4c-4d5e-0f1a-9b8c7d6e5f4a",
    "asset_id" : "5c9d0e1f-2a3b-4c4d-9e0f-8a7b6c5d4e3f",
    "asset_name" : "asset-obs-01",
    "asset_type" : "OBS",
    "db_type" : "MYSQL",
    "object_name" : "user_info_table",
    "object_comment" : "用户信息表",
    "object_full_path" : "/data/user_info",
    "security_level_name" : "classification-result-01",
    "security_level_id" : "5c9d0e1f-2a3b-4c4d-9e0f-8a7b6c5d4e3f",
    "security_level_color" : 3,
    "create_time" : 1700000000000,
    "update_time" : 1700000000000,
    "scan_time" : 1700000000000,
    "match_content_cnt" : 100,
    "match_rate" : 0.85,
    "match_info" : [ {
      "template_id" : "7e1f2a3b-4c5d-4e6f-1a2b-0c9d8e7f6a5b",
      "template_name" : "scan-template-01",
      "rule_id" : "4b8c9d0e-1f2a-4b3c-8d9e-7f6a5b4c3d2e",
      "rule_name" : "classification-rule-01",
      "security_level_name" : "classification-result-01",
      "security_level_id" : "5c9d0e1f-2a3b-4c4d-9e0f-8a7b6c5d4e3f",
      "security_level_color" : 3,
      "classification_name" : "classification-result-01",
      "classification_id" : "9a3b4c5d-6e7f-4a8b-3c4d-2e1f0a9b8c7d",
      "matched_detail" : "classification-result-01",
      "match_content_cnt" : 100,
      "match_rate" : 0.85,
      "template_type" : "BUILT_IN",
      "manual_modify" : true,
      "matched_examples" : [ {
        "line_number" : 10,
        "matched_content" : "\\d{11}",
        "context" : "classification-result-01",
        "nlp_revised" : true
      }, {
        "line_number" : 10,
        "matched_content" : "\\d{11}",
        "context" : "classification-result-01",
        "nlp_revised" : true
      } ]
    }, {
      "template_id" : "7e1f2a3b-4c5d-4e6f-1a2b-0c9d8e7f6a5b",
      "template_name" : "scan-template-01",
      "rule_id" : "4b8c9d0e-1f2a-4b3c-8d9e-7f6a5b4c3d2e",
      "rule_name" : "classification-rule-01",
      "security_level_name" : "classification-result-01",
      "security_level_id" : "5c9d0e1f-2a3b-4c4d-9e0f-8a7b6c5d4e3f",
      "security_level_color" : 3,
      "classification_name" : "classification-result-01",
      "classification_id" : "9a3b4c5d-6e7f-4a8b-3c4d-2e1f0a9b8c7d",
      "matched_detail" : "classification-result-01",
      "match_content_cnt" : 100,
      "match_rate" : 0.85,
      "template_type" : "BUILT_IN",
      "manual_modify" : true,
      "matched_examples" : [ {
        "line_number" : 10,
        "matched_content" : "\\d{11}",
        "context" : "classification-result-01",
        "nlp_revised" : true
      }, {
        "line_number" : 10,
        "matched_content" : "\\d{11}",
        "context" : "classification-result-01",
        "nlp_revised" : true
      } ]
    } ],
    "manual_modify" : true,
    "is_new" : true
  } ],
  "marker" : [ "marker-01" ],
  "template_type" : "BUILT_IN"
}

状态码

状态码

描述

200

请求已成功

错误码

请参见错误码。

相关文档