Related Concepts: Custom Lists

This function gets a list of CustomList objects, representing lines in the CustomList settings table, and adds them to the table.
Each parameter should be explicitly specified – identifier, category and environment (all strings).

result = siemplify.add_entities_to_custom_list([custom_list])

Parameters

Param Name Param Type Possible Values Comments Mandatory Parameter
category_name string “custom_list” the custom list category Yes

Return Type

List

Example:

Here’s an example. Lets assume this is the state of the CustomList table prior to the function call:

Running add_entities_to_custom_list will result in a list of “CustomList” objects that represent configuration changes in the settings (added lines). Running the following code we get:

Sample Code
from SiemplifyAction import SiemplifyAction
from SiemplifyDataModel import CustomList
custom_list = CustomList(identifier="GOOGLE.COM", category="WhiteListed HOSTs", environment= " ") 

siemplify = SiemplifyAction() 
result = siemplify.add_entities_to_custom_list([custom_list])
Result Behavior
Entity is added to custom list category "WhiteListed HOSTs". 

You can add multiple values from the CustomList or manipulate multiple lists with the same call. Simply add more CustomList objects to the list (each can have its own identifier, category and environment)

Result Value
[]