
# 查询敏感数据识别任务列表 - ShowScanJobList
#### 功能介绍
查询敏感数据识别任务列表
#### 调用方法
请参见[如何调用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}/sdg/scan/job
表1路径参数 
| 参数         | 是否必选 | 参数类型   | 描述   |
|:---|:---|:---|:---|
| project_id | 是    | String | 项目ID |
   
表2Query参数 
| 参数      | 是否必选 | 参数类型    | 描述       |
|:---|:---|:---|:---|
| offset  | 否    | Integer | 页码       |
| limit   | 否    | Integer | 分页大小     |
| content | 否    | String  | 任务名称     |
| is_new  | 否    | Boolean | 是否新版分级分类 |
   
#### 请求参数
无
#### 响应参数
**状态码：200**
表3响应Body参数 
| 参数    | 参数类型                                                           | 描述          |
|:---|:---|:---|
| tasks | Array of [ScanJob] objects | 本次返回的扫描任务列表 |
| total | Long                                                           | 任务总数        |
   
 表4ScanJob 
| 参数                   | 参数类型                                                               | 描述            |
|:---|:---|:---|
| id                   | String                                                             | 任务ID          |
| name                 | String                                                             | 任务名称          |
| rule_groups          | Array of strings                                                   | 任务使用的规则组      |
| scan_templates       | Map\<String,String\>                                               | 任务使用的模板       |
| cycle                | String                                                             | 任务执行方式        |
| status               | String                                                             | 任务当前状态        |
| last_run_time        | Long                                                               | 任务上一次执行时间     |
| create_time          | Long                                                               | 任务创建时间        |
| last_scan_risk       | String                                                             | 任务上一次扫描风险等级结果 |
| use_nlp              | Boolean                                                            | 是否使用了NLP进行扫描  |
| open                 | Boolean                                                            | 任务开启状态        |
| topic_urn            | String                                                             | SMN服务通知主题     |
| start_time           | Long                                                               | 任务启动时间        |
| security_level_name  | String                                                             | 识别结果风险等级名称    |
| security_level_color | Long                                                               | 识别结果风险等级      |
| asset_infos          | Array of [AssetInfo] objects | 资产列表          |
   
 表5AssetInfo 
| 参数         | 参数类型   | 描述   |
|:---|:---|:---|
| asset_id   | String | 资产ID |
| asset_type | String | 资产类型 |
   
**状态码：400**
表6响应Body参数 
| 参数         | 参数类型   | 描述   |
|:---|:---|:---|
| error_code | String | 错误码  |
| error_msg  | String | 错误信息 |
   
#### 请求示例
查询敏感数据识别任务列表
```
GET /v1/{project_id}/sdg/scan/job
{
  "limit" : 10,
  "offset" : 0,
  "content" : "xxxxxxxxxxxx",
  "is_new" : true
}
```
#### 响应示例
**状态码：200**
请求成功
```
{
  "total" : 1,
  "tasks" : [ {
    "id" : "xxxxxxxxxxxx",
    "name" : "xxxx",
    "cycle" : "xxxx",
    "status" : "FINISHED",
    "open" : true,
    "rule_groups" : [ "xxx" ],
    "scan_templates" : {
      "xxx" : "xxx"
    },
    "last_run_time" : 1712904721162,
    "create_time" : 1712022723454,
    "last_scan_risk" : "HIGH",
    "use_nlp" : false,
    "topic_urn" : "",
    "start_time" : 0,
    "security_level_name" : "L4",
    "security_level_color" : 9,
    "asset_infos" : [ {
      "asset_id" : "xxx",
      "asset_type" : "obs"
    } ]
  } ]
}
```
**状态码：400**
无效请求
```
{
  "error_code" : "dsc.40000011",
  "error_msg" : "Invalid parameter"
}
```
#### 状态码
| 状态码 | 描述   |
|:---|:---|
| 200 | 请求成功 |
| 400 | 无效请求 |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-dsc/ErrorCode.html)。
