Scan
The Scan endpoint allows you to launch scans, get details about scans, and list/cancel scans that currently in progress.
Get a list of scans.
GET https://api.halosecurity.com/api/v1/scan/list.json
Returns a paginated list of scans.
https://www.halosecurity.com/user/security/targets/scanning
Query Parameters
sort
Integer
0
= scan id (default)
sort_desc
Integer
0 = No (default)
1 = Yes
type
string
current = (default)
recent = recent scans per target
prior = prior scans
all = all scans
{
    "list": [
        {
            "scan": {
                "date": "0000-00-00 00:00",
                "scan_id": "id1"
            },
            "target": {
                "target_name": "",
                "target_id": 1,
                "target": "www.example.com"
            }
        }
    ]
}Get the details of a scan.
GET https://api.halosecurity.com/api/v1/scan/get.json
Returns the details of a scan.
https://www.halosecurity.com/user/security/targets/scanning
Query Parameters
scan_id*
String
{
    "scan": {
        "date": "0000-00-00 00:00",
        "duration": 1000,
        "issue_severity_count": {
            "0": 10,
            "1": 10,
            "2": 10,
            "3": 10,
            "4": 10,
            "5": 10
        },
        "issue_instance_severity_count": {
            "0": 100,
            "1": 100,
            "2": 100,
            "3": 100,
            "4": 100,
            "5": 100
        },
        "issue_count": 10,
        "scan_web": 1,
        "scan_fw": 1,
        "risk_score": 100,
        "scan_was": 0,
        "target_id": 1,
        "scan_id": "id1",
        "scan_vms": 1
    }
}{
    "code": 0,
    "message": "scan_id required"
}Launch a scan on a given target.
GET https://api.halosecurity.com/api/v1/scan/start.json
Launch a scan on a given target. Requires the security_scan_start permission.
Learn about permissions: Permissions
https://www.halosecurity.com/user/security/targets/scanning
Query Parameters
target_d*
Integer
{
    "code": 0,
    "message": "Scan Already In Progress (202203161545TIa95TjO45S3ilhFzAvH)"
}{
    "code": 0,
    "message": "Scan Already In Progress (202203161545TIa95TjO45S3ilhFzAvH)"
}{
    "code": 0,
    "message": "target not found"
}Get a list of active scans.
GET https://api.halosecurity.com/api/v1/scan/inprogress-list.json
Returns a paginated list of active scans.
https://www.halosecurity.com/user/security/targets/scanning
Query Parameters
sort
Integer
0
= created date (default)
sort_desc
Integer
0 = No (default)
1 = Yes
target_id
Integer
Filter by target id
scan_id
String
Filter by scan id
{
    "list": [
        {
            "date": "0000-00-00 00:00",
            "duration": 1,
            "status_display": "Server - Running",
            "target_name": "www.example.com",
            "target_id": 1,
            "scan_id": "id1",
            "duration_display": "1h 0m",
            "status": 3
        }
    ]
}Cancel a scan that is currently in progress.
GET https://api.halosecurity.com/api/v1/scan/inprogress-cancel.json
Cancel a scan that is currently in progress. Requires the security_scan_cancel permission.
Learn about permissions: Permissions
https://www.halosecurity.com/user/security/targets/scanning
Query Parameters
scan_id
String
{
    "code": 0,
    "message": "scan_id required"
}{
    "code": 404,
    "message": "scan not found"
}Last updated
Was this helpful?