Discovery Rule πΒΆ
Data StructuresΒΆ
Attribute |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Read-only. Unique identifier. |
|
|
string |
yes |
Case-insensitive. Unique. |
|
string |
||
|
string {account, server} |
yes |
|
|
boolean; default value |
yes |
|
|
string {privileged, nonprivileged, all} |
||
|
string{onboard, quarantine} |
yes |
|
|
string{consists, ends_with, starts_with} |
with |
|
|
string |
with |
|
|
object-array |
Read-only; expensive to use. |
|
|
string-array |
Read-only; expensive to use; hidden. |
|
|
string-array |
Read-only; expensive to use; hidden. |
|
|
datetime |
Read-only. Timestamp of creation. |
|
|
datetime |
Read-only. Timestamp of modification. |
|
|
boolean |
Read-only. |
|
|
boolean |
Read-only; Expensive to use; If |
|
|
boolean |
Read-only; Expensive to use; If |
Retrieve Available Attributes of the DiscoveryRuleModelΒΆ
Request
Method |
|
Path |
|
GET /api/v2/objspec/rule
To check allowed methods, available URL parameters and possible responses please refer to the API Overview section.
Get Rules ListΒΆ
Request
Method |
|
Path |
|
GET /api/v2/discovery/rule
Example Request
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.214.98/api/v2/discovery/rule'
Response
{
"result": "success",
"rule": [
{
"id": "9115285645797883905",
"name": "Rule_1",
"type": "account",
"enabled": true,
"category": "privileged",
"action": "onboard",
"filter_type": "starts_with",
"filter_value": "admin",
"created_at": "2025-05-06 00:27:11.928953-07",
"modified_at": "2025-05-06 00:27:11.928953-07",
"builtin": false,
"hidden": false
}
]
}
Get Rule by IDΒΆ
Request
Method |
|
Path |
|
GET /api/v2/discovery/rule/<id>
Example Request
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.214.98/api/v2/discovery/rule/9115285645797883905'
Response
{
"result": "success",
"rule": [
{
"id": "9115285645797883905",
"name": "Rule_1",
"type": "account",
"enabled": true,
"category": "privileged",
"action": "onboard",
"filter_type": "starts_with",
"filter_value": "admin",
"created_at": "2025-05-06 00:27:11.928953-07",
"modified_at": "2025-05-06 00:27:11.928953-07",
"builtin": false,
"hidden": false
}
]
}
Create RuleΒΆ
Request
Method |
|
Path |
|
Headers |
|
Body |
|
POST /api/v2/discovery/rule
Example Request
curl -s -k -X POST \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
-H 'Content-Type: application/json' \
'https://10.0.214.98/api/v2/discovery/rule' \
-d'{"name": "Rule_2","type": "account","enabled": true,"category": "privileged","action": "onboard","filter_type": "starts_with","filter_value": "admin"}'
Response
{
"result": "success",
"rule": {
"id": "9115285645797883906"
}
}
Modify RuleΒΆ
Request
Method |
|
Path |
|
Headers |
|
Body |
|
PATCH /api/v2/discovery/rule/<id>
Example Request
curl -s -k -X PATCH \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
-H 'Content-Type: application/json' \
'https://10.0.214.98/api/v2/scanner/9115285645797883906' \
-d'{"action":"quarantine","filter_type":"starts_with","filter_value":"fudo_admin"}'
Response
{
"result": "success"
}
Delete RuleΒΆ
Request
Method |
|
Path |
|
DELETE /api/v2/discovery/rule/<id>
Example Request
curl -s -k -X DELETE \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.214.98/api/v2/discovery/rule/9115285645797883906'
Response
{
"result": "success"
}