Get output

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


Request parameters

NameTypeDescriptionValue
opStringGet the output of the scanget_output
scan_idIntegerThe id of the scan that is queried for output.This value is usually taken from the response of start_scan or get_scans.
output_formatStringThe format of the output. (optional)- json(default)
- html
- pdf

Request example

{
  "op": "get_output",
  "scan_id": 456234,
  "output_format": "html"
}

Response parameters

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

NameTypeDescriptionValue
op_statusStringThe status of the operation- success
- fail
target_idIntegerThe target of the scanSee details of each tool.
scan_outputDictionaryThe output according to the requested output_format. 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

(Returned in case of a successful operation)
- waiting
scan_infoDictionaryContains the following information about the scan:
  • crt_test - The description of the test that is currently running
  • num_tests - The total number of security tests performed by this scanner
  • num_finished_tests - The number of finished tests from this scan
  • start_time - The time when the scan started
  • end_time - The time when the scan finished
  • scan_type - The type of test performed. This influences the output format.
    • vulnerability
    • discovery
  • duration - The number of seconds the scan took to finish.
errorStringError message.
(Returned in case of a failed operation)
See details of each tool.

Response example for a "running" scan

{
  "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"
}

Response example for a "finished" scan

{
  "op_status": "success",
  "scan_output": {
    "output_html": "<html> ... </html>"
  },
  "scan_info": {
    "crt_test": "",
    "num_tests": 26,
    "num_finished_tests": 26,
    "start_time": "2017-08-31 13:08:02",
    "end_time": "2017-08-31 13:08:17",
    "scan_type": "vulnerability",
    "duration": "15.0 seconds"
  },
  "scan_status": "finished"
}