Queries scan tasks.

Note This API operation supports paged queries, which returns specific pages of scan tasks. You can view information such as the scanning progress.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeScans

The operation that you want to perform. Set the value to DescribeScans.

SourceIp String No 1.2.3.4

The source IP address of the request.

Lang String No zh

The natural language in which the list of scan tasks is returned. Valid values:

  • zh: Chinese
  • en: English
StatusList.N RepeatList No ["finished"]

The status of the scan task to be queried. Valid values:

  • waiting
  • finished
  • running
  • aborted
  • invalid
  • disabled
TriggerType String No date

The trigger type of the scan task to be queried. Valid values:

  • date: The scan task is executed only once.
  • interval: The scan task is executed periodically.
ScanId String No 2019031816494923023

The ID of the scan task to be queried.

Search String No ***. ***.net

The query condition (task name, IP address, or domain name) for the scan task to be queried.

ScanType String No vuln

The type of the scan task to be queried. Valid values:

  • vuln: vulnerability scanning
  • content: content risk scanning
CurrentPage Integer No 1

The number of the page to return.

PageSize Integer No 20

The number of entries to return on each page.

Response parameters

Parameter Type Example Description
Count Integer 3

The number of returned scan tasks.

CurrentPage Integer 1

The number of the returned page.

List Array

The list of scan tasks.

CronActive String 1

The scheduling status of the task. Valid values:

  • 1: active, which indicates that the task can be scheduled.
  • 0: invalid, which indicates that the task cannot be scheduled.
EndDate Long 212212000000

The scanning end time of the returned task.

FlowName String skynet_vul_scan

The vulnerability scanning mode of the returned task. Valid values:

  • assets: asset scanning
  • general: standard scanning
  • skynet_vul_scan: in-depth scanning
IndexIntervalInMinute Integer 5

The homepage detection interval of the returned task.

Interval Integer 10

The scanning interval of the returned scan task.

JobStatistics String running

The statistics of the task instance. Valid values:

  • running
  • finished
  • aborted
KeyWords List 65084125-edc6-4ef3-931f-c3e87945631e

The ID of the appended keyword library.

LastSheduleDate Long 1111000000

The timestamp when the task was scheduled last time.

Name String test_0710-3

The name of the returned task.

NextRunDate Long 1212100000

The expected start time of the next scanning for the returned task.

Period String minute

The scanning cycle of the returned task. Valid values:

  • minute: every minute
  • hour: every hour
  • day: every day
  • week: every week
  • month: every month
RefJobId String 65084125-edc6-4ef3-931f-c3e87945631e

The ID of the scan subtask that is associated with the task instance.

ReportUrl String http://***.com

The link of the report generated for the returned scan task.

RunPercent Float 100.0

The progress (in percentage) of the scan task that is in the running state.

RuntimeEnd String 1545972690000

The end time of the returned scan task.

RuntimeStart String 1545972690000

The start time of the returned scan task.

ScanAll Integer 1

Indicates whether all assets are scanned. Valid values:

  • 0: Not all assets are scanned.
  • 1: All assets are scanned.
ScanId String 2018071010171127450

The ID of the returned scan task.

ScanType String vuln

The scan type of the returned task. Valid values:

  • vuln: vulnerability scanning
  • content: content risk scanning
SiteIntervalInDay Integer 1

The site-based detection interval of the returned task. Unit: days.

StartDate Long 111122200000

The start time of the returned task.

Status String running

The scanning status of the returned task. Valid values:

  • waiting
  • finished
  • running
  • aborted
  • invalid
  • disabled
Targets List ["demo.testfire.net"]

The name of the asset, which can be an IP address, domain name, or subdomain name.

TargetsOriginal List testtag

The original content of the asset when the scan task was created. The original content is the group label of the scanned asset.

TriggerType String date

The trigger type of the returned task. Valid values:

  • date: The task is executed only once.
  • interval: The task is executed periodically.
URLs List aliyun.com

The URL of the scanned domain name asset.

PageCount Integer 1

The number of returned pages.

PageSize Integer 20

The number of entries returned per page.

RequestId String B92696EA-44DE-4DE4-B3B7-07655394DC7C

The ID of the request.

TotalCount Integer 4

The total number of returned tasks.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeScans
&<Common request parameters>

Sample success responses

XML format

<? xml version="1.0" encoding="UTF-8" ? >
<DescribeScansResponse>
    <requestId>B92696EA-44DE-4DE4-B3B7-07655394DC7C</requestId>
    <data>
        <PageCount>1</PageCount>
        <Count>3</Count>
        <TotalCount>3</TotalCount>
        <PageSize>20</PageSize>
        <CurrentPage>1</CurrentPage>
        <List>
            <Name>test_0710-3</Name>
            <RefJobId>65084125-edc6-4ef3-931f-c3e87945631e</RefJobId>
            <Status>finished</Status>
            <ScanType>vuln</ScanType>
            <EndDate>1531191010000</EndDate>
            <RunPercent>100</RunPercent>
            <StartDate>1531190450000</StartDate>
            <ReportUrl>http://***.com/VUL_REPORT/d3ba039d-24cf-46e3-8ffb-ee56d8de40b0?Expires=1533555431&amp;OSSAccessKeyId=<yourAccessKeyId>&amp;Signature=CmFMLzRIFOqETWWqj01mYpkKZI****</ReportUrl>
            <FlowName>skynet</FlowName>
            <TriggerType>date</TriggerType>
            <Targets>***. ***.net</Targets>
            <ScanAll>0</ScanAll>
            <ScanId>2018071010384940572</ScanId>
        </List>
        <List>
            <Name>test_0710-2</Name>
            <RefJobId>5c2d86bf-ace4-4c62-86e0-63f0b1e1413b</RefJobId>
            <Status>finished</Status>
            <ScanType>vuln</ScanType>
            <EndDate>1531189680000</EndDate>
            <RunPercent>100</RunPercent>
            <StartDate>1531189151000</StartDate>
            <ReportUrl>http://***.com/VUL_REPORT/29e66729-d571-489d-bc23-9d4cacf9e283?Expires=1533555431&amp;OSSAccessKeyId=<yourAccessKeyId>&amp;Signature=x0BVqK%2B4BpKfZkGzYSaKJAWFLB****</ReportUrl>
            <FlowName>skynet</FlowName>
            <TriggerType>date</TriggerType>
            <Targets>***. ***.net</Targets>
            <ScanAll>0</ScanAll>
            <ScanId>2018071010171127450</ScanId>
        </List>
        <List>
            <Name>test_0709-7</Name>
            <RefJobId>6e504749-3ddc-47b5-a1e8-4e772a784122</RefJobId>
            <Status>finished</Status>
            <ScanType>vuln</ScanType>
            <EndDate>1531139501000</EndDate>
            <RunPercent>100</RunPercent>
            <StartDate>1531138568000</StartDate>
            <ReportUrl>http://***.com/VUL_REPORT/1a4415a0-ac30-4240-b6ae-7fe137152bdb?Expires=1533555431&amp;OSSAccessKeyId=<yourAccessKeyId>&amp;Signature=WJ%2B5TWNQJ6CRshuGvFPPnvBifZ****</ReportUrl>
            <FlowName>skynet</FlowName>
            <TriggerType>date</TriggerType>
            <Targets>***. ***.net</Targets>
            <ScanAll>0</ScanAll>
            <ScanId>2018070920140740337</ScanId>
        </List>
    </data>
    <code>200</code>
    <success>true</success>
    </DescribeScansResponse>

JSON format

{
    "requestId": "B92696EA-44DE-4DE4-B3B7-07655394DC7C",
    "data": {
        "PageCount": 1,
        "Count": 3,
        "TotalCount": 3,
        "PageSize": 20,
        "CurrentPage": 1,
        "List": [
            {
                "Name": "test_0710-3",
                "RefJobId": "65084125-edc6-4ef3-931f-c3e87945631e",
                "Status": "finished",
                "ScanType": "vuln",
                "EndDate": 1531191010000,
                "RunPercent": 100,
                "StartDate": 1531190450000,
                "ReportUrl": "http://***.com/VUL_REPORT/d3ba039d-24cf-46e3-8ffb-ee56d8de40b0?Expires=1533555431&OSSAccessKeyId=<yourAccessKeyId>&Signature=CmFMLzRIFOqETWWqj01mYpkKZI****",
                "FlowName": "skynet",
                "TriggerType": "date",
                "Targets": [
                    "***. ***.net"
                ],
                "ScanAll": 0,
                "ScanId": "2018071010384940572"
            },
            {
                "Name": "test_0710-2",
                "RefJobId": "5c2d86bf-ace4-4c62-86e0-63f0b1e1413b",
                "Status": "finished",
                "ScanType": "vuln",
                "EndDate": 1531189680000,
                "RunPercent": 100,
                "StartDate": 1531189151000,
                "ReportUrl": "http://***.com/VUL_REPORT/29e66729-d571-489d-bc23-9d4cacf9e283?Expires=1533555431&OSSAccessKeyId=<yourAccessKeyId>&Signature=x0BVqK%2B4BpKfZkGzYSaKJAWFLB****",
                "FlowName": "skynet",
                "TriggerType": "date",
                "Targets": [
                    "***. ***.net"
                ],
                "ScanAll": 0,
                "ScanId": "2018071010171127450"
            },
            {
                "Name": "test_0709-7",
                "RefJobId": "6e504749-3ddc-47b5-a1e8-4e772a784122",
                "Status": "finished",
                "ScanType": "vuln",
                "EndDate": 1531139501000,
                "RunPercent": 100,
                "StartDate": 1531138568000,
                "ReportUrl": "http://***.com/VUL_REPORT/1a4415a0-ac30-4240-b6ae-7fe137152bdb?Expires=1533555431&OSSAccessKeyId=<yourAccessKeyId>&Signature=WJ%2B5TWNQJ6CRshuGvFPPnvBifZ****",
                "FlowName": "skynet",
                "TriggerType": "date",
                "Targets": [
                    "***. ***.net"
                ],
                "ScanAll": 0,
                "ScanId": "2018070920140740337"
            }
        ]
    },
    "code": 200,
    "success": true
}

Error codes

For a list of error codes, visit the API Error Center.