API v2: Discovery¶
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 |
---|---|---|---|
account_id | number | Unique and read-only ID of the account to onboard/quarantine | |
server_id | number | Unique and read-only ID of the server to onboard/quarantine | |
rule_id | number | Read-only, protected ID of the rule used to onboard/quarantine | |
handled_by | number | 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 |
Request for retrieving available attributes of the DiscoveryModel
Method | GET
|
Path | /api/v2/objspec/discovery
|
Note
To check allowed methods, available URL parameters and possible responses please refer to the API overview section.
The next chapter describes procedures for creating separate requests.
Changing server’s discovery state¶
Request
Method | PATCH
|
Path | /api/v2/server/<server_id>/discovery
|
Headers | Content-Type: Application/JSON
|
Body | DiscoveryModel
|
Example request
Sending PATCH https://10.0.0.0/api/v2/server/1234567890123456798/discovery
{
"state": "onboarded"
}
Response
{
"result": "success"
}
Example request
Sending PATCH https://10.0.0.0/api/v2/server/1234567890123456789/discovery
{
"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 account’s discovery state¶
Request
Method | PATCH
|
Path | /api/v2/account/<account_id>/discovery
|
Headers | Content-Type: Application/JSON
|
Body | DiscoveryModel
|
Example request
Sending PATCH https://10.0.0.0/api/v2/account/1234567890123456798/discovery
{
"state": "onboarded"
}
Response
{
"result": "success"
}
Example request
Sending PATCH https://10.0.0.0/api/v2/account/1234567890123456789/discovery
{
"state":" quarantined",
"reason": "Example text"
}
Response
{
"result": "success"
}