1. API Operations
  2. Start scan

Deprecated

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

Start scan

This operation starts a new scan.


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".

Parameter
tool_id
Type
integer
required
true

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

Parameter
target
Type
string
required
true

The name of the target to be scanned.

Parameter
tool_params
Type
dictionary
required
true

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

Parameter
workspace_id
Type
integer

The ID of the workspace you want your scan to be placed into. To find the IDs of your workspaces, use the get_workspaces method.

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",
  "tool_id": 170,
  "target": "http://demo.pentest-tools.com/webapp/",
  "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"
}