DescribeScans
Queries the scan tasks in a project with pagination.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-codesec:DescribeScans |
get |
*All Resource
|
None | None |
Request syntax
GET /v1/projects/{projectId}/scans HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| projectId |
integer |
Yes |
The project ID. |
111 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| maxResults |
integer |
No |
The number of entries per page. Default value: 20. Maximum value: 100. |
10 |
| nextToken |
string |
No |
The pagination token. To query the first page, leave this parameter empty or do not specify it. To query the next page, pass the nextToken value returned in the previous response without modification. If the nextToken value in the response is empty, the last page is returned. |
eyJ0IjoiMjAyNi0wNy0xNlQwNzo1MzozOC4wMjFaIiwiaSI6MTAwMDQ0OH0 |
| status |
string |
No |
The task status. Valid values:
|
completed |
| taskName |
string |
No |
The task name. |
name |
| query |
string |
No |
The keyword for fuzzy search by project name or prompt. |
name |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| requestId |
string |
Id of the request |
9A1F403F-0A85-5578-8B7C-55E3E9408659 |
| items |
array<object> |
The task list. |
|
|
array<object> |
The task information. |
||
| id |
integer |
The task ID. |
934 |
| projectId |
integer |
The project ID. |
1234567 |
| kind |
string |
The task type. Valid values:
|
full |
| status |
string |
The task status. Valid values:
|
completed |
| codeBundleId |
integer |
The code bundle ID. |
11 |
| engineSnapshot |
object |
The supported types. |
|
| sast |
boolean |
Indicates whether SAST is supported. |
true |
| sca |
boolean |
Indicates whether SCA is supported. |
true |
| taskName |
string |
The task name. |
1648622222394847-ha-cn-lm64p7tby01_dsl_kb_video_1773817008236_full |
| createdAt |
string |
The creation time. |
2026-07-28T03:36:31.573Z |
| updatedAt |
string |
The update time. |
2026-07-28T03:36:31.573Z |
| startedAt |
string |
The start time. |
2026-07-28T03:36:31.573Z |
| finishedAt |
string |
The scan end time. |
2026-07-28T03:36:31.573Z |
| createdBy |
string |
The user ID of the task creator. |
11111 |
| scanMetrics |
object |
The scan result statistics information. |
|
| linesOfCode |
integer |
The number of lines of code. |
11 |
| fileCount |
integer |
The number of files. |
459 |
| tokenTotal |
integer |
[Deprecated]. |
1 |
| credit |
number |
The number of credits consumed by the task. |
1.25 |
| scanProgress |
integer |
The task progress. |
100 |
| workerId |
string |
[Deprecated]. |
1 |
| currentPhase |
string |
The current scan phase. Valid values:
|
finalize |
| totalCount |
integer |
The total number of entries. |
2 |
| maxResults |
integer |
The page size. |
10 |
| nextToken |
string |
The pagination token. An empty value indicates that the last page is returned. |
eyJ0IjoiMjAyNi0wNy0xNlQwNzo1MzozOC4wMjFaIiwiaSI6MTAwMDQ0OH0 |
Examples
Success response
JSON format
{
"requestId": "9A1F403F-0A85-5578-8B7C-55E3E9408659",
"items": [
{
"id": 934,
"projectId": 1234567,
"kind": "full",
"status": "completed",
"codeBundleId": 11,
"engineSnapshot": {
"sast": true,
"sca": true
},
"taskName": "1648622222394847-ha-cn-lm64p7tby01_dsl_kb_video_1773817008236_full",
"createdAt": "2026-07-28T03:36:31.573Z",
"updatedAt": "2026-07-28T03:36:31.573Z",
"startedAt": "2026-07-28T03:36:31.573Z",
"finishedAt": "2026-07-28T03:36:31.573Z",
"createdBy": "11111",
"scanMetrics": {
"linesOfCode": 11,
"fileCount": 459,
"tokenTotal": 1,
"credit": 1.25
},
"scanProgress": 100,
"workerId": "1",
"currentPhase": "finalize"
}
],
"totalCount": 2,
"maxResults": 10,
"nextToken": "eyJ0IjoiMjAyNi0wNy0xNlQwNzo1MzozOC4wMjFaIiwiaSI6MTAwMDQ0OH0"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter.%s | Invalid parameter:%s. | Invalid parameter:%s. |
| 400 | NotFound.%s | The resource does not exist. | The resource does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.