Managing Discovery Stateยถ

The Discovery feature enables to search for servers and accounts on domain controllers and local accounts on Windows servers.


Data Structuresยถ

DiscoveryModelยถ

Attribute

Type

Required

Description

account_id

string

Unique and read-only ID of the account to onboard/quarantine. Requires modify right on the account object for PATCH operations.

server_id

string

Unique and read-only ID of the server to onboard/quarantine. Requires modify right on the server object for PATCH operations.

rule_id

string

Read-only, protected ID of the rule used to onboard/quarantine.

handled_by

string

Read-only, protected object identifier.

state

string {onboarded, quarantined}

yes

Desired discovery state to be set.

reason

string, may be empty

if type == quarantined

Quarantine reason description.

Retrieve Available Attributes of the DiscoveryModelยถ

Request

Method

GET

Path

/api/v2/objspec/discovery

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


Changing Serverโ€™s Discovery Stateยถ

Request

Method

PATCH

Path

/api/v2/server/<server_id>/discovery

Example Request

PATCH /api/v2/server/<id>/discovery`

curl -s -k -X GET \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  -H 'Content-Type: application/json' \
  'https://10.0.214.98/api/v2/server/1234567890123456798/discovery' \
  -d'{"state": "onboarded"}'

Response

{
    "result": "success"
}

Example Request

PATCH /api/v2/server/<id>/discovery`

curl -s -k -X GET \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  -H 'Content-Type: application/json' \
  'https://10.0.214.98/api/v2/server/1234567890123456789/discovery' \
  -d'{"state":"quarantined","reason": "Example text"}'

Response

{
    "result": "success"
}

Batch Request Example

{
    "requests": {
        "onboard_o": {
            "method": "PATCH",
            "endpoint": "/server/1234567890123456789/discovery",
            "data": {
                "state": "onboarded"
            }
        },
        "onboard_q": {
            "method": "PATCH",
            "endpoint": "/server/1234567890123456790/discovery",
            "data": {
                "state": "quarantined",
                "reason": "A quarantine reason"
            }
        }
    }
}

Changing Multiple Serverโ€™s Discovery State ๐Ÿ†•ยถ

Request

Method

POST

Path

/api/v2/discovery/server/manage

Example Request

POST /api/v2/discovery/server/manage`

curl -s -k -X POST \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  -H 'Content-Type: application/json' \
  'https://10.0.214.98/api/v2/discovery/server/manage' \
  -d'{"servers":["9115285645797883913","1234567890123456790"],"state":"onboard","pools":["9115285645797883908"]}'

Response

{
    "result": "success"
}

Example Request

POST /api/v2/discovery/server/manage`

curl -s -k -X POST \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  -H 'Content-Type: application/json' \
  'https://10.0.214.98/api/v2/discovery/server/manage' \
  -d'{"servers":["1234567890123456789","1234567890123456790"],"state":"quarantine","reason":"Example text"}'

Response

{
    "result": "success"
}

Changing Accountโ€™s Discovery Stateยถ

Request

Method

PATCH

Path

/api/v2/account/<account_id>/discovery

Example Request

PATCH /api/v2/account/<id>/discovery`

curl -s -k -X GET \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  -H 'Content-Type: application/json' \
  'https://10.0.214.98/api/v2/account/1234567890123456789/discovery' \
  -d'{"state":"onboarded"}'

Response

{
    "result": "success"
}

Example Request

PATCH /api/v2/account/<id>/discovery`

curl -s -k -X GET \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  -H 'Content-Type: application/json' \
  'https://10.0.214.98/api/v2/account/1234567890123456789/discovery' \
  -d'{"state":"quarantined","reason":"Example text"}'

Response

{
    "result": "success"
}

Changing Multiple Accountโ€™s Discovery State ๐Ÿ†•ยถ

Request

Method

POST

Path

/api/v2/discovery/account/manage

Example Request

POST /api/v2/discovery/account/manage`

curl -s -k -X POST \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  -H 'Content-Type: application/json' \
  'https://10.0.214.98/api/v2/discovery/account/manage' \
  -d'{"accounts":["9115285645797883912","9115285645797883921"],"state":"onboard","safes":["9115285645797883906","9115285645797883907"],"listeners":["9115285645797883906","9115285645797883905"]}'

Response

{
    "result": "success"
}

Example Request

POST /api/v2/discovery/account/manage`

curl -s -k -X POST \
  -H 'Authorization: sgfeea6jsaz4mum9su8w6' \
  -H 'Content-Type: application/json' \
  'https://10.0.214.98/api/v2/discovery/account/manage' \
  -d'{"accounts":["9115285645797883922","9115285645797883923"],"state":"quarantine","reason":"Example text"}'

Response

{
    "result": "success"
}