1. API Operations
  2. Start scan by target ID

Deprecated

You are viewing a deprecated version of our API Reference. Please visit the up-to-date documentation.

Start scan by target ID

This operation starts a new scan using a specific target_id.


Request

Since tool_id and tool_params are specific for each tool, please see the specific start example for the tool that you need.

Parameters
Parameter
op
Type
string
required
true

Start a new scan. Value is "start_scan_by_targetid".

Parameter
tool_id
Type
integer
required
true

The ID of the tool that will be started. See details of each tool.

Parameter
target_id
Type
integer
required
true

The ID of the target to be scanned.

Parameter
tool_params
Type
dictionary
required
true

The parameters for the tool. See details of each tool.

Parameter
callback_url
Type
url

The PDF report will be sent to this URL in a POST request after the scan is finished.

Parameter
check_website_accessibility
Type
boolean
default
 
true

This method might take up to 20 seconds to process for URLs, which are checked for redirects and timeouts before starting the scan. Setting this parameter to false will prevent this, but inaccessible URLs will result in a scan status of "connection error".

{
  "op": "start_scan_by_targetid",
  "tool_id": 170,
  "target_id": 7456213,
  "tool_params": {
    "scan_type": "ptt_engine"
  }
}

Response

Attributes
Attribute
op_status
Type
string

The status of the operation. Value can be either "success" or "fail".

Attribute
scan_id
Type
integer

The ID of the new scan that was started. Returned in case of a successful operation. See details of each tool.

Attribute
scan_status
Type
string

The status of the new scan. Value returned in case of a successful operation: "waiting".

Attribute
error
Type
string

Error message. Returned in case of a failed operation. See details of each tool.

{
  "op_status": "success",
  "scan_id": 456234,
  "scan_status": "waiting"
}