updateCustomRule
You can use this method to edit any existing custom exclusion or detection rule by referencing its Rule ID.
Parameters
Parameter | Description | Included in request | Type | Values |
|---|---|---|---|---|
| The ID of the rule to be updated. | Mandatory | String | No additional requirements. |
| The type of the rule to be updated. | Optional | Integer | Possible values:
Default value: |
| The name of the rule to be updated. | Mandatory | String | No additional requirements. |
| A description of the rule. | Optional | String | No additional requirements. |
| The list of associated rule tags. | Optional | Array of Strings | No additional requirements. |
| Contains the settings associated with the rule. | Mandatory | Object | Refer to |
| Contains | Optional | Object | Refer to |
These are common parameters, available across all public API methods.
Parameter | Description | Included in request | Type | Values |
|---|---|---|---|---|
| This parameter adds an identifier to the request, linking it to its corresponding response. The target replies with the same value in the response, allowing easy call tracking. | Mandatory | String | No additional requirements. |
| The name of the method you are using to send the request. | Mandatory | String | Must be a valid method name. |
| The version of JSON-RPC used by the request and the response. | Mandatory | Integer | Possible values:
|
| An object containing the configuration of the request. | Mandatory | Object | No additional requirements. |
Under the | ||||
| The results page number. | Optional | Integer | Default value: |
| The number of results displayed per page. | Optional | Integer | The upper limit is 100 items per page. Default value: |
Objects
settings
Name | Description | Included in request | Type | Values |
|---|---|---|---|---|
| Indicates if the rule is active. | Mandatory | Integer | Possible values:
|
| Indicates the severity of the alerts that will be generated. | Mandatory for detection rules; not applicable to exclusion rules. | Integer | Possible values:
|
| Indicates the type of the target entity. | Mandatory | String | Possible values for custom exclusion rules:
Possible values for custom detection rules:
|
| Defines the rule by listing the exclusion or detection sub-rules that the specified ImportantThis parameter does not include exclusion definitions related to the | Mandatory | Array of Objects | Each object contains the following settings:
NoteFor more information on the possible values of |
| Contains the exclusion sub-rules related to the | Optional for exclusion rules; not applicable to detection rules. | Array of Objects | Each object contains the following settings:
|
| Indicates the automatic response actions and their enablement status for EDR incidents generated by this rule. Important
| Optional for detection rules; not applicable to exclusion rules. | Array of Objects | Each object contains the following settings:
|
targets
Name | Description | Included in request | Type | Values |
|---|---|---|---|---|
| The IDs of the companies to which the custom rule applies. | Optional | Array of Strings | Default value: a list with one entry, representing your company ID. |
Return value
Attribute | Type | Description |
|---|---|---|
| Boolean | Returns |
Example
Request
{
"params": {
"ruleId": "61827b8036492c2fc0718722",
"type": 1,
"name": "Detection Rule via API",
"description": "description test API",
"tags": ["test", "api", "demo"],
"settings": {
"status": 1,
"severity": 1,
"target": "connection",
"criteriaList": [
{
"field": "Connection.DestinationPort",
"relation": "is",
"value": [
"25691"
]
},
{
"field": "Connection.Process.Name",
"relation": "contains",
"value": "./network1"
},
{
"field": "Connection.SourcePort",
"relation": "any",
"value": [
"22",
"23",
"24"
]
}
],
"automaticActions": [
{
"type": 4,
"enabled": true,
"settings": {
"includeParent": false,
"includeChildren": true
}
}
]
},
"targets": {
"companiesIds": [
"61827b8036492c2fc0718722",
"61827b8036492c2fc0718724"
]
}
},
"jsonrpc": "2.0",
"method": "updateCustomRule",
"id": "0df7568c-59c1-48e0-a31b-18d83e6d9810"
} Response
{
"id": "301f7b05-ec02-481b-9ed6-c07b97de2b7b",
"jsonrpc":"2.0",
"result": true
}