DescribePentestTaskList

Updated at:

Queries penetration test tasks for the current account by paging and returns information such as the task ID, current scan ID, status, and progress. This operation supports filtering by keyword and task status.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

OperationType

string

No

Not exposed in the SDK. The fixed operation identifier assigned by the system. The value for this operation is listPentestTask. You do not need to specify this parameter. Do not set it to other values.

Valid values:

  • listPentestTask :

    Query penetration test tasks.

listPentestTask

OperationInput

object

No

The business parameter object for the operation, specified in JSON format. This parameter is optional. If you do not specify this parameter, the default query conditions are used.

CurrentPage

integer

No

The page number to query. Pages start from 1. Default value: 1.

1

Keyword

string

No

The keyword for querying tasks. This operation performs a fuzzy match on task names. If you do not specify this parameter, no keyword-based filtering is applied.

Website

MaxResults

integer

No

Not exposed in the SDK. Not supported. Do not specify this parameter. Use PageSize to set the page size. The example value only indicates the integer type.

10

NextToken

string

No

Not exposed in the SDK. Not supported. Do not specify this parameter. Use CurrentPage and PageSize for pagination. The example value is not a valid pagination token.

unused-token

PageSize

integer

No

The number of records to return per page. Default value: 10. Use a positive integer.

10

Status

string

No

The task status. Valid values:

  • PENDING: The task is pending.

  • QUEUED: The task is queued.

  • STARTING: The task is starting.

  • RUNNING: The penetration test is in progress.

  • SUCCESS: The penetration test succeeded.

  • FAILED: The penetration test failed.

  • STOPPED: The task is stopped.

  • TIMEOUT: The task timed out.

  • ABNORMAL: The penetration test is abnormal.

  • DELETED: The task is deleted.

A successful task does not indicate that no vulnerabilities were found. Query the vulnerability list for details. If you do not specify this parameter, no status-based filtering is applied.

RUNNING

Specify business query conditions in OperationInput. You can omit the entire object to query with default conditions. Use CurrentPage and PageSize for paging. By default, the first page is queried with 10 records per page. MaxResults and NextToken are not supported and are not exposed in the SDK. Do not specify these parameters. You do not need to specify OperationType.

Response elements

Element

Type

Description

Example

object

The response object returned when the operation succeeds.

MaxResults

integer

Not exposed in the SDK. Not supported. Do not rely on this response field. Read PageInfo.PageSize for the number of records per page. The example value only indicates the data type and does not represent an actual response value.

10

NextToken

string

Not exposed in the SDK. Not supported. No valid next-page token is returned. Use PageInfo to query the next page. The example value is not a usable token.

unused-token

PageInfo

object

The pagination information for the current page. Use CurrentPage, PageSize, and TotalCount to determine whether to query the next page.

CurrentPage

integer

The page number of the returned results. Pages start from 1.

1

PageSize

integer

The number of records per page used in the current query.

10

TotalCount

integer

The total number of records that match the query conditions. The value is 0 if no results are found.

1

RequestId

string

The request ID, which is used to locate and troubleshoot issues.

72C16BE5-08B3-48D1-8D10-6C15F5A93E27

TaskList

array<object>

The list of tasks on the current page that match the query conditions. An empty array is returned if no results are found.

object

The information about a penetration test task.

CreatedAt

integer

The time when the task was created. The value is a UNIX timestamp in seconds, representing the number of seconds elapsed since 1970-01-01 00:00:00 UTC.

1788825600

Name

string

The task name. When multiple targets are created at a time, each task name is appended with a hyphen and a sequence number starting from 1 after the specified Name value.

Website security check

Progress

integer

The task execution progress returned by the server. The value is 0 when the task is being initialized.

0

ScanId

string

The scan ID of the current task execution. This value may be empty if the task has not started and no scan record has been generated.

b82f6e42-cc4d-4a39-96a4-4159cff16785

Status

string

The task status. Valid values:

  • PENDING: The task is pending.

  • QUEUED: The task is queued.

  • STARTING: The task is starting.

  • RUNNING: The penetration test is in progress.

  • SUCCESS: The penetration test succeeded.

  • FAILED: The penetration test failed.

  • STOPPED: The task is stopped.

  • TIMEOUT: The task timed out.

  • ABNORMAL: The penetration test is abnormal.

  • DELETED: The task is deleted.

A successful task does not indicate that no vulnerabilities were found. Query the vulnerability list for details.

RUNNING

TargetUrl

string

The target URL that was actually scanned in this task.

https://example.com/

TaskId

string

The task ID generated by the server. You can pass this ID to DescribePentestVulnList and DescribePentestReportContent to query the vulnerabilities and report for this task.

d89742f4-59a8-4ec8-98db-d109c2365392

The response returns TaskList and PageInfo. The query scope is limited to the current account. The list is empty if no tasks match the conditions. You can obtain TaskId from TaskList and call DescribePentestVulnList to query vulnerabilities or DescribePentestReportContent to obtain the report download link.

Examples

Success response

JSON format

{
  "MaxResults": 10,
  "NextToken": "unused-token",
  "PageInfo": {
    "CurrentPage": 1,
    "PageSize": 10,
    "TotalCount": 1
  },
  "RequestId": "72C16BE5-08B3-48D1-8D10-6C15F5A93E27",
  "TaskList": [
    {
      "CreatedAt": 1788825600,
      "Name": "网站安全检查",
      "Progress": 0,
      "ScanId": "b82f6e42-cc4d-4a39-96a4-4159cff16785",
      "Status": "RUNNING",
      "TargetUrl": "https://example.com/",
      "TaskId": "d89742f4-59a8-4ec8-98db-d109c2365392"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

500 ServerError ServerError
403 NoPermission caller has no permission

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.