Skip to main content
GET
/
scans
Get all scans
curl --request GET \
  --url https://app.pentest-tools.com/api/v2/scans \
  --header 'Authorization: Bearer <token>'
[
  {
    "tool_id": 123,
    "id": 123,
    "target_id": 123,
    "status_name": "running",
    "vpn_scan": true,
    "progress": 50,
    "result_summary": {
      "text": "<string>",
      "critical": 123,
      "high": 123,
      "medium": 123,
      "low": 123,
      "info": 123
    },
    "start_time": "2023-11-07T05:31:56Z",
    "end_time": "2023-11-07T05:31:56Z",
    "duration": 123,
    "num_tests": 123,
    "num_finished_tests": 123,
    "status_message": "<string>"
  }
]

Authorizations

Authorization
string
header
required

Use the "API key" from the profile page as the token

Query Parameters

tool_id
integer

ID of the tool to show scans from

workspace_id
integer

ID of the workspace to show scans from. If not set, the scans from the active workspace (set in the web interface) will be returned.

target_id
integer

ID of the target to show scans from

status
enum<string>

Status of the scans to be shown

Available options:
running,
finished,
failed to start,
stopped,
timed out,
waiting,
aborted,
VPN connection error,
auth failed,
connection error
limit
integer
default:1000

the maximum number of scans to return

Required range: 1 <= x <= 1000
page
integer
default:1

the page number to return

Required range: x >= 1
start_time
object

Start time interval of the scans to be shown

Response

OK

Maximum array length: 1000
tool_id
integer
required
id
integer
target_id
integer

only one of target_id and target_name should be used

status_name
enum<string>
Available options:
running,
finished,
failed to start,
stopped,
timed out,
waiting,
aborted,
VPN connection error,
auth failed,
connection error
vpn_scan
boolean
progress
integer

Current progress of the scan

Required range: 0 <= x <= 100
result_summary
object
start_time
string<date-time>
end_time
string<date-time> | null

End time of the scan. null if the scan is not finished

duration
integer

Duration of the scan in seconds

num_tests
integer

Number of tests run by the scanner. Always 1 for discovery scanners

num_finished_tests
integer

Number of currently finished tests. This should be equal to num_tests for successfully finished scans

status_message
string | null

Message describing the current status of the scan. This is null if the scan is not currently running.