You can call this operation to create a scan task.

You can call this operation to create vulnerability scan tasks and content detection tasks.

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 CreateScan

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

FlowName String Yes assets

The mode of the scan task.

  • assets: asset scan
  • general: standard scan
  • skynet_vul_scan: full scan
Name String Yes one-time task

The name of the scan task.

Qps Integer Yes 16

The speed of the scan task. Valid values:

  • 16: slow
  • 32: normal
  • 64: fast
RuntimeEnd String Yes 08:00:00

The end time of the scan.

RuntimeStart String Yes 00:00:00

The start time of the scan.

ScanType String Yes vuln

The scan type of the task.

  • vuln: vulnerability type
  • content: content risk
  • aset: asset discovery
StartDate Long Yes 111122200000

The start time of the scan task.

TriggerType String Yes date

The trigger type of the scan task. Valid values:

  • date: one time
  • interval: periodic
EnableAssetDiscover Integer No 1

Specifies whether to enable asset discovery. Valid values: 0 and 1.

EnableAssetLoginScan Integer No 1

Specifies whether to enable logon scan. Valid values: 0 and 1.

EndDate Long No 212212000000

The end time of the scan task.

IndexIntervalInMinute Integer No 5

The homepage detection interval. Unit: minutes. Valid values:

  • 5: 5 minutes
  • 30: 30 minutes
  • 60: 60 minutes
Interval Integer No 5

The interval of the scan.

KeyWords.N RepeatList No []

The list of appended keyword libraries.

Period String No day

The cycle of the scan.

  • day: once every day
  • week: once every week
  • month: once every month
ScanAll Integer No 1

Specifies whether to scan all assets.

SiteIntervalInDay Integer No 1

The full site detection interval. Unit: days. Valid values:

  • 1: once every day
  • 7: once every seven days
SourceIp String No 1.2.3.4

The source IP address of the request.

TargetAssetTags.N RepeatList No []

The tag list of assets to be scanned.

Targets.N.Id RepeatList No ["***.testfire.net"]

The list of assets to be scanned.

Response parameters

Parameter Type Example Description
Data String { "Data": "2018080617471590979" }

The returned data.

RequestId String 76F297E0-D4C2-442A-AEAD-AABA97975060

The ID of the request.

Examples

Sample requests


/? Action=CreateScan 
&FlowName=skynet_vul_scan 
&IndexIntervalInMinute=60 
&Name=one-time task 
&Qps=64 
&RuntimeEnd=08:00:00 
&RuntimeStart=00:00:00 
&ScanAll=0 
&ScanType=vuln 
&SiteIntervalInDay=7 
&SourceIp=1.2.3.4
&StartDate=1552898972897 
&TargetAssetTags.1="***.testfire.net" 
&TriggerType=date 
&<Common request parameters>

Sample success responses

XML format

<CreateScan>
	  <requestId>76F297E0-D4C2-442A-AEAD-AABA97975060</requestId>
	  <data>
		    <Data>2018080617471590979</Data>
	  </data>
	  <code>200</code>
	  <success>true</success>
    </CreateScan>

JSON format

{
	"requestId":"76F297E0-D4C2-442A-AEAD-AABA97975060",
	"data":{
		"Data":"2018080617471590979"
	},
	"code":200,
	"success":true
}

Error codes

For more information about error codes, visit API Error Center.