DescribeScan - 查询扫描详情
查询扫描任务详细信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
yundun-codesec:DescribeScan |
get |
*全部资源
|
无 | 无 |
请求语法
GET /v1/projects/{projectId}/scans/{scanId} HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| projectId |
integer |
是 |
项目 ID |
123 |
| scanId |
integer |
是 |
任务 ID。 |
3088795 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
当前API无需请求参数
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| requestId |
string |
请求唯一标识。 |
9A1F403F-0A85-5578-8B7C-55E3E9408659 |
| id |
integer |
任务 ID。 |
111 |
| projectId |
integer |
项目 ID |
1111 |
| kind |
string |
类型取值:
|
full |
| status |
string |
状态取值:
|
completed |
| codeBundleId |
integer |
代码包 ID |
111 |
| engineSnapshot |
object |
支持的类型。 |
|
| sast |
boolean |
支持 SAST |
true |
| sca |
boolean |
支持 SCA |
true |
| taskName |
string |
任务名称 |
name |
| createdAt |
string |
创建时间 |
2026-08-27T00:53:46.774Z |
| updatedAt |
string |
更新时间 |
2026-08-27T00:53:46.774Z |
| startedAt |
string |
开始时间 |
2026-08-27T00:53:46.774Z |
| finishedAt |
string |
扫描结束时间 |
2026-08-27T00:53:46.774Z |
| createdBy |
string |
任务创建者的用户 ID |
3221 |
| scanMetrics |
object |
扫描结果。 |
|
| linesOfCode |
integer |
代码行数。 |
1 |
| fileCount |
integer |
文件数。 |
73894 |
| tokenTotal |
integer |
弃用 |
1 |
| credit |
number |
任务消耗 credit 数量。 |
1 |
| scanProgress |
integer |
任务进度。 |
40 |
| securityCredits |
number |
弃用 |
1 |
| workerId |
string |
弃用 |
1 |
| currentPhase |
string |
扫描阶段取值如下:
|
discovery |
示例
正常返回示例
JSON格式
{
"requestId": "9A1F403F-0A85-5578-8B7C-55E3E9408659",
"id": 111,
"projectId": 1111,
"kind": "full",
"status": "completed",
"codeBundleId": 111,
"engineSnapshot": {
"sast": true,
"sca": true
},
"taskName": "name",
"createdAt": "2026-08-27T00:53:46.774Z",
"updatedAt": "2026-08-27T00:53:46.774Z",
"startedAt": "2026-08-27T00:53:46.774Z",
"finishedAt": "2026-08-27T00:53:46.774Z",
"createdBy": "3221",
"scanMetrics": {
"linesOfCode": 1,
"fileCount": 73894,
"tokenTotal": 1,
"credit": 1
},
"scanProgress": 40,
"securityCredits": 1,
"workerId": "1",
"currentPhase": "discovery"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParameter.%s | Invalid parameter:%s. | 无效的参数:%s。 |
| 400 | NotFound.%s | The resource does not exist. | 资源不存在。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。