1. API Operations
  2. Get output

Deprecated

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

Get output

This operation returns the output of a scan, including scan information and status.


Request

Parameters
Parameter
op
Type
string
required
true

Get the output of the scan. The value is get_output.

Parameter
scan_id
Type
integer
required
true

The ID of the scan that is queried for output. This value is usually taken from the response of start_scan or get_scans.

Parameter
output_format
Type
string
default
 
json

The format of the output. The value can be "json", "html" or "pdf".

{
  "op": "get_output",
  "scan_id": 7456213,
}

Response

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

Attributes
Attribute
op_status
Type
string

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

Attribute
target_id
Type
integer

The target of the scan. See details of each tool.

Attribute
scan_output
Type
dictionary

The output according to the requested output_format. Returned in case of a successful operation. The value can be:

  • scan_tests - a list of JSON objects containing information about each test performed and its results
  • output_html - raw HTML report
  • output_pdf - raw PDF report
Attribute
scan_info
Type
dictionary

Contains information about the scan.

Attribute
error
Type
string

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

{
  "op_status": "success",
  "scan_output": {
    "output_html": "<html>...</html>"
  },
  "scan_info": {
    "crt_test": "Searching for sensitive files...",
    "num_tests": 26,
    "num_finished_tests": 9,
    "start_time": "2017-08-31 13:01:52",
    "end_time": "2017-08-31 13:01:53",
    "scan_type": "vulnerability",
    "duration": "1.0 seconds"
  },
  "scan_status": "running"
}