addToBlocklist
Use this method to set up one or more rules that you can use to add items to blocklists.
Important
This method has been updated to version 1.2. For information applicable to version 1.0, refer to this section.
Version 1.0 is only compatible with hash type blocklist rules.
Parameters
Parameter | Description | Included in request | Type | Values |
|---|---|---|---|---|
| Indicates the type of rules you want to create. | Mandatory | String | Possible values:
|
| Contains the list of rules you want to create and their assigned settings. | Mandatory | Array of objects | You can only add rules that match the type specified in the Refer to |
These are common parameters, available across all public API methods:
Parameter | Description | Included in request | Type | Value requirements |
|---|---|---|---|---|
| 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 | String | The only possible value is |
| An object containing the configuration of the request. | Mandatory | Object | No additional requirements. |
Objects
rules
Parameter | Description | Included in request | Type | Values |
|---|---|---|---|---|
| Describes this specific rule. | Optional | String | No additional requirements. |
| Identifies a specific rule and its settings. | Mandatory | Object | Refer to |
details
Parameters available when type is hash:
Parameter | Description | Included in request | Type | Values |
|---|---|---|---|---|
| The algorithm used to obtain the hash. | Mandatory | String | Possible values:
|
| The hash associated with the file you want to block. | Mandatory | String | The hash value must conform to the format specified in the |
Parameters available when type is connection:
Parameter | Description | Included in request | Type | Values |
|---|---|---|---|---|
| The name under which the rule will be listed in the rules table (for example, the name of the application the rule applies to). | Mandatory | String | No additional requirements. |
| If included, the rule applies only when an application is opened by using the command line interface with the specified command. | Optional when Not available otherwise | String | No additional requirements. |
| If included, the rule applies only if a specific IP protocol is used by the connection. | Mandatory | String | Possible values:
|
| The rule applies only to connections of a specific direction. | Mandatory | String | Possible values:
|
| The rule applies only to connections to or from a specific IP type. | Mandatory | String | Possible values:
|
| If included, the rule applies only to connections to or from specific local network addresses. | Optional | Object | Refer to |
| If included, the rule applies only to connections to or from specific remote addresses. | Optional | Object | Refer to |
| If enabled, the rule applies only to connections to or from specific Mac addresses. | Optional | Object | Refer to |
| If included, the rule applies only to connections to or from endpoints using the specified operating systems. | Optional | Array of strings | Possible values for each element of the array:
Default value: |
| Determines which application the rule applies to. | Optional | String | No additional requirements. |
| The MD5 of the application. | Optional when Not available otherwise | String | No additional requirements. |
Parameters available when type is path:
Parameter | Description | Included in request | Type | Values |
|---|---|---|---|---|
| All applications that are launched from the specified path are blocked. | Mandatory | String | The path format must match the operating system of the target endpoint. Must be a file absolute path. |
localAddress
This object is only available if type is connection.
Parameter | Description | Included in request | Type | Values |
|---|---|---|---|---|
| If If | Mandatory | Boolean | No additional requirements. |
| If | Optional when Not available otherwise | String | The value can be in an IP or an IP/Mask format. |
| If a range is used, only connections made through ports between these two values are blocked. If specific ports are used, only connections made through ports are blocked. | Optional | String | No additional requirements. |
remoteAddress
This object is only available if type is connection.
Parameter | Description | Included in request | Type | Values |
|---|---|---|---|---|
| If If | Mandatory | Boolean | No additional requirements. |
| If | Optional when Not available otherwise | String | The value can be in an IP or an IP/mask format. |
| If a range is used, only connections made through ports between these two values are blocked. If specific ports are used, only connections made through ports are blocked. | Optional | String | No additional requirements. |
directlyConnected
This object is only available if type is connection.
Parameter | Description | Included in request | Type | Values |
|---|---|---|---|---|
| Indicates if this option is enabled. | Mandatory for Windows, optional for macOS | Boolean | No additional requirements. |
| Only connections from the specified Mac addresses are allowed. | Mandatory when Not available otherwise | String | Must be in a valid Mac address format. |
Return value
Attribute | Type | Description |
|---|---|---|
| Boolean | Indicates if the operation was successful. |
Examples
Request
Response
{
"id": "5087eab8-b74f-4a3e-85b3-4271e85890d5",
"jsonrpc": "2.0",
"result": true
}Use this method to add one or more file hashes to the Blocklist.
Parameters
Parameter | Type | Optional | Description |
|---|---|---|---|
| Integer | No | The algorithm used to obtain the hash. Possible values:
|
| Array of strings | No | An array containing several hashes. All hashes must be of the type specified by the |
| String | No | A description for the hashes. |
These are common parameters, available across all public API methods:
Parameter | Description | Included in request | Type | Value requirements |
|---|---|---|---|---|
| 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 | String | The only possible value is |
| An object containing the configuration of the request. | Mandatory | Object | No additional requirements. |
Return value
This method returns a Boolean which is true if the operation was successful.
Example
Request:
{
"id": "0df7568c-59c1-48e0-a31b-18d83e6d9810",
"jsonrpc": "2.0",
"method": "addToBlocklist",
"params": {
"hashType": 2,
"hashList": [
"5b7ac19bb1a43dfb107b23c6",
"f696282aa4cd4f614aa995190cf442fe"
],
"sourceInfo": "Added from public API"
}
} Response:
{
"id": "0df7568c-59c1-48e0-a31b-18d83e6d9810",
"jsonrpc": "2.0",
"result": true
}