Skip to content

Prevention Policy

The Prevention Policy service collection provides operations for managing Falcon prevention policies. Search for policies and their members, create and delete policies, update settings, perform actions such as enabling, disabling, or assigning host groups, and set policy precedence order across your environment.

LanguageLast Update
Pythonv1.4.6
PowerShellv2.2.9
Gov0.20.0
TypeScriptv0.6.0
Rustv0.7.0
Rubyv1.2.0
OperationDescription
queryCombinedPreventionPolicyMembers
query_combined_policy_members
Search for members of a Prevention Policy in your environment by providing a FQL filter and paging details. Returns a set of host details which match the filter criteria
queryCombinedPreventionPolicies
query_combined_policies
Search for Prevention Policies in your environment by providing a FQL filter and paging details. Returns a set of Prevention Policies which match the filter criteria
performPreventionPoliciesAction
perform_policies_action
Perform the specified action on the Prevention Policies specified in the request
setPreventionPoliciesPrecedence
set_policies_precedence
Sets the precedence of Prevention Policies based on the order of IDs specified in the request. The first ID specified will have the highest precedence and the last ID specified will have the lowest. You must specify all non-Default Policies for a platform when updating precedence
getPreventionPolicies
get_policies
Retrieve a set of Prevention Policies by specifying their IDs
createPreventionPolicies
create_policies
Create Prevention Policies by specifying details about the policy to create
deletePreventionPolicies
delete_policies
Delete a set of Prevention Policies by specifying their IDs
updatePreventionPolicies
update_policies
Update Prevention Policies by specifying the ID of the policy and details to update
queryPreventionPolicyMembers
query_policy_members
Search for members of a Prevention Policy in your environment by providing a FQL filter and paging details. Returns a set of Agent IDs which match the filter criteria
queryPreventionPolicies
query_policies
Search for Prevention Policies in your environment by providing a FQL filter and paging details. Returns a set of Prevention Policy IDs which match the filter criteria

Search for members of a Prevention Policy in your environment by providing a FQL filter and paging details. Returns a set of host details which match the filter criteria

GET /policy/combined/prevention-members/v1
Scope Prevention Policies: READ Consumes · Produces application/json
PEP 8 query_combined_policy_members
NameTypeData typeDescription
filterquerystringFQL query expression that should be used to limit the results.
limitqueryintegerMaximum number of records to return. Max: 5000.
offsetquerystringStarting index of overall result set from which to return ids.
idquerystringThe ID of the Prevention Policy to search for members of.
sortquerystringThe property to sort by.
parametersquerydictionaryFull query string parameters payload in JSON format.
from falconpy import PreventionPolicy
falcon = PreventionPolicy(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.query_combined_policy_members(id="string",
filter="string",
limit=integer,
offset=integer,
sort="string")
print(response)

Search for Prevention Policies in your environment by providing a FQL filter and paging details. Returns a set of Prevention Policies which match the filter criteria

GET /policy/combined/prevention/v1
Scope Prevention Policies: READ Consumes · Produces application/json
PEP 8 query_combined_policies
NameTypeData typeDescription
filterquerystringFQL query expression that should be used to limit the results.
limitqueryintegerMaximum number of records to return. Max: 5000.
offsetquerystringStarting index of overall result set from which to return ids.
sortquerystringThe property to sort by. Available fields: created_by, modified_timestamp, created_timestamp, name, enabled, platform_name, modified_by, precedence. Example: created_timestamp.desc
parametersquerydictionaryFull query string parameters payload in JSON format.
from falconpy import PreventionPolicy
falcon = PreventionPolicy(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.query_combined_policies(filter="string",
limit=integer,
offset=integer,
sort="string")
print(response)

Perform the specified action on the Prevention Policies specified in the request

POST /policy/entities/prevention-actions/v1
Scope Prevention Policies: WRITE Consumes · Produces application/json
PEP 8 perform_policies_action
NameTypeData typeDescription
action_namequerystringThe action to perform. Allowed values: add-host-group, add-rule-group, disable, enable, remove-host-group, remove-rule-group.
action_parametersbodylist of dictionariesList of name / value pairs in JSON format.
bodybodydictionaryFull body payload in JSON format.
group_idbody action_parametersstringHost Group ID to apply the policy to. String. Overridden if action_parameters is specified.
idsbodystring or list of stringsPrevention Policy ID(s) to perform actions against.
parametersquerydictionaryFull query string parameters payload in JSON format.
from falconpy import PreventionPolicy
falcon = PreventionPolicy(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.perform_policies_action(action_name="string",
action_parameters=[{"key": "value"}],
group_id="string",
ids=id_list)
print(response)

Sets the precedence of Prevention Policies based on the order of IDs specified in the request. The first ID specified will have the highest precedence and the last ID specified will have the lowest. You must specify all non-Default Policies for a platform when updating precedence

POST /policy/entities/prevention-precedence/v1
Scope Prevention Policies: WRITE Consumes · Produces application/json
PEP 8 set_policies_precedence
NameTypeData typeDescription
bodybodydictionaryFull body payload in JSON format.
idsbodystring or list of stringsPrevention Policy ID(s) to adjust precedence.
platform_namebodystringOS platform name. Linux, Mac, Windows, iOS, Android.
from falconpy import PreventionPolicy
falcon = PreventionPolicy(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.set_policies_precedence(ids=id_list, platform_name="string")
print(response)

Retrieve a set of Prevention Policies by specifying their IDs

GET /policy/entities/prevention/v1
Scope Prevention Policies: READ Consumes · Produces application/json
PEP 8 get_policies
NameTypeData typeDescription
idsquerystring or list of stringsThe ID(s) of the Prevention Policies to return.
parametersquerydictionaryFull query string parameters payload in JSON format.
from falconpy import PreventionPolicy
falcon = PreventionPolicy(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.get_policies(ids=id_list)
print(response)

Create Prevention Policies by specifying details about the policy to create

POST /policy/entities/prevention/v1
Scope Prevention Policies: WRITE Consumes · Produces application/json
PEP 8 create_policies
NameTypeData typeDescription
bodybodydictionaryFull body payload in JSON format.
clone_idbodystringPrevention Policy ID to clone.
descriptionbodystringPrevention Policy description.
namebodystringPrevention Policy name.
platform_namebodystringOperating system platform name. Linux, Mac, Windows, iOS, Android.
settingsbodylist of dictionariesList of policy-specific settings to apply to the newly created policy. Multiple settings can be applied by passing a list containing multiple entries.
from falconpy import PreventionPolicy
falcon = PreventionPolicy(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.create_policies(clone_id="string",
description="string",
name="string",
platform_name="string",
settings=[{"key": "value"}])
print(response)

Delete a set of Prevention Policies by specifying their IDs

DELETE /policy/entities/prevention/v1
Scope Prevention Policies: WRITE Consumes · Produces application/json
PEP 8 delete_policies
NameTypeData typeDescription
idsquerystring or list of stringsThe ID(s) of the Prevention Policies to delete.
parametersquerydictionaryFull query string parameters payload in JSON format.
from falconpy import PreventionPolicy
falcon = PreventionPolicy(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.delete_policies(ids=id_list)
print(response)

Update Prevention Policies by specifying the ID of the policy and details to update

PATCH /policy/entities/prevention/v1
Scope Prevention Policies: WRITE Consumes · Produces application/json
PEP 8 update_policies
NameTypeData typeDescription
bodybodydictionaryFull body payload in JSON format.
descriptionbodystringPrevention Policy description.
idbodystringPrevention Policy ID to update.
namebodystringPrevention Policy name.
settingsbodylist of dictionariesList of policy-specific settings to apply to the newly created policy. Multiple settings can be applied by passing a list containing multiple entries.
from falconpy import PreventionPolicy
falcon = PreventionPolicy(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.update_policies(description="string",
id="string",
name="string",
settings=[{"key": "value"}])
print(response)

Search for members of a Prevention Policy in your environment by providing a FQL filter and paging details. Returns a set of Agent IDs which match the filter criteria

GET /policy/queries/prevention-members/v1
Scope Prevention Policies: READ Consumes · Produces application/json
PEP 8 query_policy_members
NameTypeData typeDescription
filterquerystringFQL query expression that should be used to limit the results.
limitqueryintegerMaximum number of records to return. Max: 5000.
offsetquerystringStarting index of overall result set from which to return ids.
idquerystringThe ID of the Prevention Policy to search for members of.
sortquerystringThe property to sort by.
parametersquerydictionaryFull query string parameters payload in JSON format.
from falconpy import PreventionPolicy
falcon = PreventionPolicy(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.query_policy_members(id="string",
filter="string",
limit=integer,
offset=integer,
sort="string")
print(response)

Search for Prevention Policies in your environment by providing a FQL filter and paging details. Returns a set of Prevention Policy IDs which match the filter criteria

GET /policy/queries/prevention/v1
Scope Prevention Policies: READ Consumes · Produces application/json
PEP 8 query_policies
NameTypeData typeDescription
filterquerystringFQL query expression that should be used to limit the results.
limitqueryintegerMaximum number of records to return. Max: 5000.
offsetquerystringStarting index of overall result set from which to return ids.
sortquerystringThe property to sort by. Available fields: created_by, modified_timestamp, created_timestamp, name, enabled, platform_name, modified_by, precedence. Example: created_timestamp.desc
parametersquerydictionaryFull query string parameters payload in JSON format.
from falconpy import PreventionPolicy
falcon = PreventionPolicy(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.query_policies(filter="string",
limit=integer,
offset=integer,
sort="string")
print(response)