Update MalOp Notification Settings
Endpoint URL: https://<your server/rest/settings/configurations
Endpoint URI: settings/configurations
Action: POST
Updates MalOp notification settings.
Note
Ensure that you have logged into the Cybereason platform. For details, see Log in with the API.
Request Headers
You must add a Content-Type:application/json header with the request.
Note
If you are using cURL, add the authorization cookie details or the path to the file with cookie details with every request.
Request Body
Input: JSON
Depending on your browser settings, this linked file may open in a separate tab instead of downloading directly to your machine. If this happens, use the Save As option in your browser to save the file locally.
{
"lastUpdate": 00000000000,
"name": "malop.notifications",
"type": "PropertyConfiguration",
"value": {
"enabled": true,
"frequency": "<update frequency>",
"trigger": "CREATION",
"type": "malopNotificationConfig",
"malopType": [
"<Malop type>",
"<Malop type>"
]
}
}
Request Parameters
URL/URI parameters: None
Request Body Parameters: Use the following required fields in the request.
Field |
Type |
Description |
---|---|---|
lastUpdate |
Integer |
The time when the notification setting was last updated. |
name |
String |
The name of the setting to update. Use malop.notifications for this key. |
type |
Enum |
The type of setting to update. Set the value of this setting to PropertyConfiguration. |
enabled |
Boolean |
Whether or not to send notifications for Malops. Set this value to true. |
frequency |
Enum |
When to send a notification about a Malop. Possible values include:
|
trigger |
Enum |
The event that triggers the notification. Set this value to CREATION. |
type |
Enum |
The specific type of property configuration. Set this value to malopNotificationConfig. |
malopType |
Enum |
The type of Malops about which to receive notifications. Use one or both of the following values:
|
Response Success Schema
Field |
Type |
Description |
---|---|---|
outcome |
Enum |
The outcome of the update operation. |
data |
Array |
An object containing details on the update. The fields inside this object vary depending on the configuration update. |
Response Failure Schema
None
Example: Update MalOp notification settings
Request
curl --request POST \ --url https://12.34.56.78/rest/settings/configuration \ --header 'Content-Type:text/plain' \ --data '{ "lastUpdate": 1602525876869, "name": "malop.notifications", "type": "PropertyConfiguration", "value": { "enabled": true, "frequency": "IMMEDIATE", "trigger": "CREATION", "type": "malopNotificationConfig", "malopType": [ "ENDPOINT_PROTECTION", "AI_HUNTING" ] } }'
Response
{
"outcome": "success",
"data": [
{
"type": "PropertyConfiguration",
"name": "malop.notifications",
"value": {
"type": "malopNotificationConfig",
"enabled": true,
"frequency": "IMMEDIATE",
"trigger": "CREATION",
"malopTypes": [
"ENDPOINT_PROTECTION",
"AI_HUNTING"
]
},
"lastUpdate": 1603013427752
}
]
}
Request
Depending on your browser settings, this linked file may open in a separate tab instead of downloading directly to your machine. If this happens, use the Save As option in your browser to save the file locally.
Use this request body:
{ "lastUpdate": 1602525876869, "name": "malop.notifications", "type": "PropertyConfiguration", "value": { "enabled": true, "frequency": "IMMEDIATE", "trigger": "CREATION", "type": "malopNotificationConfig", "malopType": [ "ENDPOINT_PROTECTION", "AI_HUNTING" ] } }
Response
{
"outcome": "success",
"data": [
{
"type": "PropertyConfiguration",
"name": "malop.notifications",
"value": {
"type": "malopNotificationConfig",
"enabled": true,
"frequency": "IMMEDIATE",
"trigger": "CREATION",
"malopTypes": [
"ENDPOINT_PROTECTION",
"AI_HUNTING"
]
},
"lastUpdate": 1603013427752
}
]
}
Request
Depending on your browser settings, this linked file may open in a separate tab instead of downloading directly to your machine. If this happens, use the Save As option in your browser to save the file locally.
import requests
import json
# Login information
username ="[email protected]"
password = "mypassword"
server = "myserver.com"
port = "443"
data = {
"username": username,
"password": password
}
headers = {"Content-Type": "application/json"}
base_url = "https://" + server + ":" + port
login_url = base_url + "/login.html"
session = requests.session()
response = session.post(login_url, data=data, verify=True)
print (response.status_code)
print (session.cookies.items())
# Request URL
endpoint_url = "/rest/crimes/unified"
api_url = base_url + endpoint_url
last_update_time = 1602525876869
update_frequency = "IMMEDIATE"
query = json.dumps({"lastUpdate":last_update_time,"name":"malop.notifications","type":"PropertyConfiguration","value":{"enabled":True,"frequency":update_frequency,"trigger":"CREATION","type":"malopNotificationConfig","malopType":["ENDPOINT_PROTECTION","AI_HUNTING"]}})
api_response = session.request("POST", api_url, data=query, headers=headers)
your_response = json.loads(api_response.content)
print(json.dumps(your_response, indent=4, sort_keys=True))
Response
{
"outcome": "success",
"data": [
{
"type": "PropertyConfiguration",
"name": "malop.notifications",
"value": {
"type": "malopNotificationConfig",
"enabled": true,
"frequency": "IMMEDIATE",
"trigger": "CREATION",
"malopTypes": [
"ENDPOINT_PROTECTION",
"AI_HUNTING"
]
},
"lastUpdate": 1603013427752
}
]
}