Discovery Scanner πŸ†•ΒΆ


Data StructuresΒΆ

DiscoveryScannerModelΒΆ

Attribute

Type

Required

Description

id

string

Read-only. Unique identifier.

name

string

yes

Case-insensitive. Unique.

description

string

type

string {ldap_account, ldap_server, local_account}

yes

pool_id

string

if type == ldap_account || ldap_server

Requires read right on the pool object for GET, POST, PATCH, and DELETE requests.

server_id

string

if type == ldap_account || ldap_server

Requires read right on the server object for GET, POST, PATCH, and DELETE requests.

account_id

string

yes

Requires read right on the account object for GET, POST, PATCH, and DELETE requests.

enabled

boolean; default value false

yes

category

string {privileged, nonprivileged, all}

if type == ldap_account

filter_base

string

if type == ldap_account || ldap_server

filter_group

string

if type == ldap_account || ldap_server

server_tls_ca_cert

string

if type == ldap_server

schedule_dow

number {1Β -Β 7}

with schedule_time

Schedule day of week. Value-range: 1 to 7.

schedule_time

string

with schedule_dow

last_scan

string

Read-only. Timestamp of the last scan.

next_scan

string

Read-only. Timestamp of the next scan.

next_manual_scan

string

Read-only. Timestamp of the next manual scan.

password_change_policy_id

string

if type == ldap_account || local_account

password_changer_id

string

if type == ldap_account || local_account

password_verifier_id

string

if type == ldap_account || local_account

connection_port

number {1Β -Β 65535}

yes

Value format: port

connection_tls_ca_cert

string

Value format: x509-certificate

rules

object-array

Read-only; expensive to use.

rule_ids

string-array

Read-only; expensive to use; hidden.

rule_names

string-array

Read-only; expensive to use; hidden.

created_at

datetime

Read-only. Timestamp of creation.

modified_at

datetime

Read-only. Timestamp of modification.

removed

boolean

Read-only.

Retrieve Available Attributes of the DiscoveryScannerModelΒΆ

Request

Method

GET

Path

/api/v2/objspec/scanner

To check allowed methods, available URL parameters and possible responses please refer to the API Overview section.


Get Scanners ListΒΆ

Request

Method

GET

Path

/api/v2/scanner

Example Request

GET /api/v2/scanner`

curl -s -k -X GET \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  'https://10.0.214.98/api/v2/scanner'

Response

{
    "result": "success",
    "scanner": [
        {
            "id": "5620492334958379009",
            "name": "LDAP_scanner",
            "type": "ldap_account",
            "pool_id": "5620492334958379010",
            "server_id": "5620492334958379011",
            "account_id": "5620492334958379011",
            "enabled": true,
            "category": "nonprivileged",
                        "schedule_dow": 1,
                        "schedule_time": "23:00:00-07",
            "last_scan": "-infinity",
            "next_scan": "infinity",
                        "next_manual_scan": "infinity",
            "connection_port": 636,
            "created_at": "2024-06-24 04:25:40.966955-07",
            "modified_at": "2024-06-24 04:25:40.966955-07"
        }
    ]
}

Get Scanner by IDΒΆ

Request

Method

GET

Path

/api/v2/scanner/<id>

Example Request

GET /api/v2/scanner/<id>`

curl -s -k -X GET \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  'https://10.0.214.98/api/v2/scanner/5620492334958379009'

Response

{
    "result": "success",
    "scanner": [
        {
            "id": "5620492334958379009",
            "name": "LDAP_scanner",
            "type": "ldap_account",
            "pool_id": "5620492334958379010",
            "server_id": "5620492334958379011",
            "account_id": "5620492334958379011",
            "enabled": true,
            "category": "nonprivileged",
                        "schedule_dow": 1,
                        "schedule_time": "23:00:00-07",
            "last_scan": "-infinity",
            "next_scan": "infinity",
                        "next_manual_scan": "infinity",
            "connection_port": 636,
            "created_at": "2024-06-24 04:25:40.966955-07",
            "modified_at": "2024-06-24 04:25:40.966955-07"
        }
    ]
}

Create ScannerΒΆ

Request

Method

POST

Path

/api/v2/scanner

Headers

Content-Type: Application/json

Body

DiscoveryScannerModel

Example Request

POST /api/v2/scanner`

curl -s -k -X POST \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  -H 'Content-Type: application/json' \
  'https://10.0.214.98/api/v2/scanner' \
  -d'{"name":"LDAP_Scanner","type":"ldap_account","pool_id":"5620492334958379010","server_id":"5620492334958379011","account_id":"5620492334958379011","enabled":false,"category":"nonprivileged","connection_port": 636}'

Response

{
    "result": "success",
    "scanner": {
        "id": "5620492334958379010"
    }
}

Modify ScannerΒΆ

Request

Method

PATCH

Path

/api/v2/scanner/<id>

Headers

Content-Type: Application/json

Body

DiscoveryScannerModel

Example Request

PATCH /api/v2/scanner/<id>`

curl -s -k -X PATCH \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  -H 'Content-Type: application/json' \
  'https://10.0.214.98/api/v2/scanner/5620492334958379010' \
  -d'{"category":"privileged"}'

Response

{
    "result": "success"
}

Starting ScanΒΆ

Request

Method

POST

Path

/api/v2//scanner/<scanner_id>/start

Example Request

POST /api/v2/scanner/<id>/start`

curl -s -k -X POST \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  'https://10.0.214.98/api/v2/scanner/5620492334958379010/start'

Response

{
    "result": "success",
    "next_manual_scan": "2025-05-05 01:53:54.923673-07"
}

Deleting ScannerΒΆ

Request

Method

DELETE

Path

/api/v2/scanner/<id>

Example Request

DELETE /api/v2/scanner/<id>`

curl -s -k -X DELETE \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  'https://10.0.214.98/api/v2/scanner/5620492334958379010'

Response

{
    "result": "success"
}