Managing Discovery Stateยถ
The Discovery feature enables to search for servers and accounts on domain controllers and local accounts on Windows servers.
Data Structuresยถ
Attribute |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Unique and read-only ID of the account to onboard/quarantine. Requires |
|
|
string |
Unique and read-only ID of the server to onboard/quarantine. Requires |
|
|
string |
Read-only, protected ID of the rule used to onboard/quarantine. |
|
|
string |
Read-only, protected object identifier. |
|
|
string {onboarded, quarantined} |
yes |
Desired discovery state to be set. |
|
string, may be empty |
if |
Quarantine reason description. |
Retrieve Available Attributes of the DiscoveryModelยถ
Request
Method |
|
Path |
|
To check allowed methods, available URL parameters and possible responses please refer to the API Overview section.
Changing Serverโs Discovery Stateยถ
Request
Method |
|
Path |
|
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 |
|
Path |
|
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 |
|
Path |
|
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 |
|
Path |
|
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"
}