CrowdStrike Falcon CrowdStrike Subreddit

Using the ML Exclusions service collection

Uber class support Service class support Documentation Version Page Updated

Table of Contents

Operation IDDescription
getMLExclusionsV1
PEP 8get_exclusions
Get a set of ML Exclusions by specifying their IDs.
createMLExclusionsV1
PEP 8create_exclusions
Create the ML exclusions.
deleteMLExclusionsV1
PEP 8delete_exclusions
Delete the ML exclusions by ID.
updateMLExclusionsV1
PEP 8update_exclusions
Update the ML exclusions.
queryMLExclusionsV1
PEP 8query_exclusions
Search for ML exclusions.
exclusions_aggregates_v2
PEP 8get_exclusion_aggregates
Get exclusion aggregates as specified via json in request body.
exclusions_get_all_v2
PEP 8get_all_exclusions
Get all exclusions.
exclusions_perform_action_v2
PEP 8perform_exclusion_action
Actions used to manipulate the content of exclusions, with ancestor fields.
exclusions_get_reports_v2
PEP 8get_exclusion_reports
Create a report of ML exclusions scoped by the given filters.
exclusions_get_v2
PEP 8get_exclusions_v2
Get the exclusions by id, with ancestor fields.
exclusions_create_v2
PEP 8create_exclusions_v2
Create the exclusions, with ancestor fields.
exclusions_update_v2
PEP 8update_exclusions_v2
Update the exclusions by id, with ancestor fields.
exclusions_delete_v2
PEP 8delete_exclusions_v2
Delete the exclusions by id, with ancestor fields.
exclusions_search_v2
PEP 8search_exclusions
Search for exclusions, with ancestor fields.

Passing credentials

WARNING

client_id and client_secret are keyword arguments that contain your CrowdStrike API credentials. Please note that all examples below do not hard code these values. (These values are ingested as strings.)

CrowdStrike does not recommend hard coding API credentials or customer identifiers within source code.

getMLExclusionsV1

Get a set of ML Exclusions by specifying their IDs

PEP8 method name

get_exclusions

Endpoint

MethodRoute
GET/policy/entities/ml-exclusions/v1

Required Scope

ml-exclusions:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
ids
Service Class Support

Uber Class Support
querystring or list of stringsThe IDs of the exclusions to retrieve.
parameters
Service Class Support

Uber Class Support
querydictionaryFull query string parameters payload in JSON format.

Usage

Service class example (PEP8 syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(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_exclusions(ids=id_list)
print(response)

Service class example (Operation ID syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.getMLExclusionsV1(ids=id_list)
print(response)

Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.command("getMLExclusionsV1", ids=id_list)
print(response)

Back to Table of Contents

createMLExclusionsV1

Create the ML exclusions

PEP8 method name

create_exclusions

Endpoint

MethodRoute
POST/policy/entities/ml-exclusions/v1

Required Scope

ml-exclusions:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
body
Service Class Support

Uber Class Support
bodydictionaryFull body payload in JSON format.
comment
Service Class Support

Uber Class Support
bodystringString comment describing why the exclusions was created.
excluded_from
Service Class Support

Uber Class Support
bodylist of stringsGroup ID(s) explicitly excluded from the exclusion.
groups
Service Class Support

Uber Class Support
bodylist of stringsGroup ID(s) impacted by the exclusion. Defaults to ["all"] when not specified while using a Service Class. This default must be provided by the developer when using the Uber Class.
value
Service Class Support

Uber Class Support
bodystringValue to match for the exclusion.

Usage

Service class example (PEP8 syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

group_list = ['ID1', 'ID2', 'ID3']
exclude_list = ['EX1', 'EX2', 'EX3']

response = falcon.create_exclusions(comment="string",
                                    groups=group_list,
                                    excluded_from=exclude_list,
                                    value="string"
                                    )
print(response)
Service class example (Operation ID syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

group_list = ['ID1', 'ID2', 'ID3']
exclude_list = ['EX1', 'EX2', 'EX3']

response = falcon.createMLExclusionsV1(comment="string",
                                       groups=group_list,
                                       excluded_from=exclude_list,
                                       value="string"
                                       )
print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )
group_list = ['ID1', 'ID2', 'ID3']  # If not specifying a group ID, you must submit ["all"].
exclude_list = ['EX1', 'EX2', 'EX3']

BODY = {
    "comment": "string",
    "excluded_from": exclude_list,
    "groups": group_list,
    "value": "string"
}

response = falcon.command("createMLExclusionsV1", body=BODY)
print(response)

Back to Table of Contents

deleteMLExclusionsV1

Delete the ML exclusions by id

PEP8 method name

delete_exclusions

Endpoint

MethodRoute
DELETE/policy/entities/ml-exclusions/v1

Required Scope

ml-exclusions:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
comment
Service Class Support

Uber Class Support
querystringExplains why this exclusion was deleted.
ids
Service Class Support

Uber Class Support
querystring or list of stringsThe IDs of the exclusions to retrieve.
parameters
Service Class Support

Uber Class Support
querydictionaryFull query string parameters payload in JSON format.

Usage

Service class example (PEP8 syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(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_exclusions(comment="string", ids=id_list)
print(response)

Service class example (Operation ID syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.deleteMLExclusionsV1(comment="string", ids=id_list)
print(response)

Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.command("deleteMLExclusionsV1", comment="string", ids=id_list)
print(response)

Back to Table of Contents

updateMLExclusionsV1

Update the ML exclusions

PEP8 method name

update_exclusions

Endpoint

MethodRoute
PATCH/policy/entities/ml-exclusions/v1

Required Scope

ml-exclusions:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
body
Service Class Support

Uber Class Support
bodydictionaryFull body payload in JSON format.
comment
Service Class Support

Uber Class Support
bodystringString comment describing why the exclusions was created.
groups
Service Class Support

Uber Class Support
bodylist of stringsGroup ID(s) impacted by the exclusion.
id
Service Class Support

Uber Class Support
bodystringThe ID of the exclusion to update.
value
Service Class Support

Uber Class Support
bodystringValue to match for the exclusion.

Usage

Service class example (PEP8 syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

group_list = ['ID1', 'ID2', 'ID3']

response = falcon.update_exclusions(comment="string",
                                    groups=group_list,
                                    value="string",
                                    id="string"
                                    )
print(response)
Service class example (Operation ID syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

group_list = ['ID1', 'ID2', 'ID3']

response = falcon.updateMLExclusionsV1(comment="string",
                                       groups=group_list,
                                       value="string",
                                       id="string"
                                       )
print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

group_list = ['ID1', 'ID2', 'ID3']

BODY = {
    "comment": "string",
    "groups": group_list,
    "id": "string",
    "value": "string"
}

response = falcon.command("updateMLExclusionsV1", body=BODY)
print(response)

Back to Table of Contents

queryMLExclusionsV1

Search for ML exclusions.

PEP8 method name

query_exclusions

Endpoint

MethodRoute
GET/policy/queries/ml-exclusions/v1

Required Scope

ml-exclusions:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filter
Service Class Support

No Uber Class Support
querystringThe filter expression that should be used to limit the results. FQL syntax.

Available filters:
  • applied_globally
  • created_by
  • created_on
  • last_modified
  • modified_by
  • value
limit
Service Class Support

No Uber Class Support
queryintegerThe maximum number of records to return. [1-500]
offset
Service Class Support

No Uber Class Support
queryintegerThe offset to start retrieving records from.
parameters
Service Class Support

Uber Class Support
querydictionaryFull query string parameters payload in JSON format.
sort
Service Class Support

No Uber Class Support
querystringThe property to sort by.
FQL syntax. (e.g. last_behavior|asc)

Available sort fields:
  • applied_globally
  • created_by
  • created_on
  • last_modified
  • modified_by
  • value

Usage

Service class example (PEP8 syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

response = falcon.query_exclusions(filter="string",
                                   offset=integer,
                                   limit=integer,
                                   sort="string"
                                   )
print(response)
Service class example (Operation ID syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

response = falcon.queryMLExclusionsV1(filter="string",
                                      offset=integer,
                                      limit=integer,
                                      sort="string"
                                      )
print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

response = falcon.command("queryMLExclusionsV1",
                          filter="string",
                          offset=integer,
                          limit=integer,
                          sort="string"
                          )
print(response)

Back to Table of Contents

exclusions_aggregates_v2

Get exclusion aggregates as specified via json in request body.

PEP8 method name

get_exclusion_aggregates

Endpoint

MethodRoute
POST/exclusions/aggregates/exclusions/GET/v2

Required Scope

ml-exclusions:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
body
Service Class Support

Uber Class Support
bodylist of dictionariesFull body payload as a JSON formatted list.
date_ranges
Service Class Support

Uber Class Support
bodylist of dictionariesList of date ranges for the aggregate.
exclude
Service Class Support

Uber Class Support
bodystringExclusion string for the aggregate query.
extended_bounds
Service Class Support

Uber Class Support
bodydictionaryExtended bounds for the aggregate.
field
Service Class Support

Uber Class Support
bodystringThe field to aggregate on.
filter
Service Class Support

Uber Class Support
bodystringFQL filter to limit aggregation results.
filters_spec
Service Class Support

Uber Class Support
bodydictionarySpecification for additional filters.
from
Service Class Support

Uber Class Support
bodyintegerStarting position for pagination.
include
Service Class Support

Uber Class Support
bodystringInclusion string for the aggregate query.
interval
Service Class Support

Uber Class Support
bodystringTime interval for date histogram aggregates.
max_doc_count
Service Class Support

Uber Class Support
bodyintegerMaximum number of documents per bucket.
min_doc_count
Service Class Support

Uber Class Support
bodyintegerMinimum number of documents per bucket.
missing
Service Class Support

Uber Class Support
bodystringValue for documents missing the field.
name
Service Class Support

Uber Class Support
bodystringThe name of the aggregate query.
parameters
Service Class Support

Uber Class Support
querydictionaryFull query string parameters payload in JSON format.
percents
Service Class Support

Uber Class Support
bodylist of numbersList of percentiles to calculate.
q
Service Class Support

Uber Class Support
bodystringFull text query string.
ranges
Service Class Support

Uber Class Support
bodylist of dictionariesList of range specifications.
size
Service Class Support

Uber Class Support
bodyintegerMaximum number of results to return per aggregate.
sort
Service Class Support

Uber Class Support
bodystringThe field to sort results on.
sub_aggregates
Service Class Support

Uber Class Support
bodylist of dictionariesNested sub-aggregation definitions.
time_zone
Service Class Support

Uber Class Support
bodystringThe time zone for date operations.
type
Service Class Support

Uber Class Support
bodystringThe type of aggregate query to perform.

Usage

Service class example (PEP8 syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

date_range_list = [{"from": "string", "to": "string"}]
range_list = [{"From": 1, "To": 2}]

response = falcon.get_exclusion_aggregates(date_ranges=date_range_list,
                                           exclude="string",
                                           field="string",
                                           filter="string",
                                           include="string",
                                           interval="string",
                                           max_doc_count=integer,
                                           min_doc_count=integer,
                                           missing="string",
                                           name="string",
                                           q="string",
                                           ranges=range_list,
                                           size=integer,
                                           sort="string",
                                           time_zone="string",
                                           type="string"
                                           )
print(response)
Service class example (Operation ID syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

date_range_list = [{"from": "string", "to": "string"}]
range_list = [{"From": 1, "To": 2}]

response = falcon.exclusions_aggregates_v2(date_ranges=date_range_list,
                                           exclude="string",
                                           field="string",
                                           filter="string",
                                           include="string",
                                           interval="string",
                                           max_doc_count=integer,
                                           min_doc_count=integer,
                                           missing="string",
                                           name="string",
                                           q="string",
                                           ranges=range_list,
                                           size=integer,
                                           sort="string",
                                           time_zone="string",
                                           type="string"
                                           )
print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

date_range_list = [{"from": "string", "to": "string"}]
range_list = [{"From": 1, "To": 2}]

BODY = [
    {
        "date_ranges": date_range_list,
        "exclude": "string",
        "field": "string",
        "filter": "string",
        "include": "string",
        "interval": "string",
        "max_doc_count": integer,
        "min_doc_count": integer,
        "missing": "string",
        "name": "string",
        "q": "string",
        "ranges": range_list,
        "size": integer,
        "sort": "string",
        "time_zone": "string",
        "type": "string"
    }
]

response = falcon.command("exclusions_aggregates_v2", body=BODY)
print(response)

Back to Table of Contents

exclusions_get_all_v2

Get all exclusions.

PEP8 method name

get_all_exclusions

Endpoint

MethodRoute
GET/exclusions/entities/all-exclusions/v2

Required Scope

ml-exclusions:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
parameters
Service Class Support

Uber Class Support
querydictionaryFull query string parameters payload in JSON format.

Usage

Service class example (PEP8 syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

response = falcon.get_all_exclusions()
print(response)
Service class example (Operation ID syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

response = falcon.exclusions_get_all_v2()
print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

response = falcon.command("exclusions_get_all_v2")
print(response)

Back to Table of Contents

exclusions_perform_action_v2

Actions used to manipulate the content of exclusions, with ancestor fields.

PEP8 method name

perform_exclusion_action

Endpoint

MethodRoute
POST/exclusions/entities/exclusion-actions/v2

Required Scope

ml-exclusions:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
action_name
Service Class Support

Uber Class Support
querystringThe action to perform. Available values: add_item, remove_item, validate_filepath.
action_parameters
Service Class Support

Uber Class Support
bodylist of dictionariesList of action parameter name/value pairs.
available
Service Class Support

Uber Class Support
bodybooleanFlag indicating if the action is available.
body
Service Class Support

Uber Class Support
bodydictionaryFull body payload in JSON format.
description
Service Class Support

Uber Class Support
bodystringDescription of the action to perform.
group
Service Class Support

Uber Class Support
bodystringThe group associated with this action.
label
Service Class Support

Uber Class Support
bodystringThe label associated with this action.
name
Service Class Support

Uber Class Support
bodystringThe name associated with this action.
parameters
Service Class Support

Uber Class Support
querydictionaryFull query string parameters payload in JSON format.

Usage

Service class example (PEP8 syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

action_param_list = [{"name": "string", "value": "string"}]

response = falcon.perform_exclusion_action(action_name="string",
                                           action_parameters=action_param_list,
                                           available=boolean,
                                           description="string",
                                           group="string",
                                           label="string",
                                           name="string"
                                           )
print(response)
Service class example (Operation ID syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

action_param_list = [{"name": "string", "value": "string"}]

response = falcon.exclusions_perform_action_v2(action_name="string",
                                               action_parameters=action_param_list,
                                               available=boolean,
                                               description="string",
                                               group="string",
                                               label="string",
                                               name="string"
                                               )
print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

BODY = {
    "action_parameters": [
        {
            "name": "string",
            "value": "string"
        }
    ],
    "available": boolean,
    "description": "string",
    "group": "string",
    "label": "string",
    "name": "string"
}

response = falcon.command("exclusions_perform_action_v2",
                          action_name="string",
                          body=BODY
                          )
print(response)

Back to Table of Contents

exclusions_get_reports_v2

Create a report of ML exclusions scoped by the given filters.

PEP8 method name

get_exclusion_reports

Endpoint

MethodRoute
POST/exclusions/entities/exclusions/reports/v2

Required Scope

ml-exclusions:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
body
Service Class Support

Uber Class Support
bodydictionaryFull body payload in JSON format.
filter
Service Class Support

Uber Class Support
bodystringFQL filter to limit the report results.
report_format
Service Class Support

Uber Class Support
bodystringThe format for the report output.
search
Service Class Support

Uber Class Support
bodydictionarySearch criteria for the report.
sort
Service Class Support

Uber Class Support
bodystringThe field to sort report results on.

Usage

Service class example (PEP8 syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

response = falcon.get_exclusion_reports(report_format="string",
                                        filter="string",
                                        sort="string"
                                        )
print(response)
Service class example (Operation ID syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

response = falcon.exclusions_get_reports_v2(report_format="string",
                                            filter="string",
                                            sort="string"
                                            )
print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

BODY = {
    "report_format": "string",
    "search": {
        "filter": "string",
        "sort": "string"
    }
}

response = falcon.command("exclusions_get_reports_v2", body=BODY)
print(response)

Back to Table of Contents

exclusions_get_v2

Get the exclusions by id, with ancestor fields.

PEP8 method name

get_exclusions_v2

Endpoint

MethodRoute
GET/exclusions/entities/exclusions/v2

Required Scope

ml-exclusions:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
ids
Service Class Support

Uber Class Support
querystring or list of stringsThe IDs of the exclusions to retrieve.
parameters
Service Class Support

Uber Class Support
querydictionaryFull query string parameters payload in JSON format.

Usage

Service class example (PEP8 syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(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_exclusions_v2(ids=id_list)
print(response)
Service class example (Operation ID syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.exclusions_get_v2(ids=id_list)
print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.command("exclusions_get_v2", ids=id_list)
print(response)

Back to Table of Contents

exclusions_create_v2

Create the exclusions, with ancestor fields.

PEP8 method name

create_exclusions_v2

Endpoint

MethodRoute
POST/exclusions/entities/exclusions/v2

Required Scope

ml-exclusions:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
body
Service Class Support

Uber Class Support
bodydictionaryFull body payload in JSON format.
comment
Service Class Support

Uber Class Support
bodystringDescriptive comment for the exclusion.
excluded_from
Service Class Support

Uber Class Support
bodystring or list of stringsSources to exclude from.
exclusions
Service Class Support

Uber Class Support
bodylist of dictionariesList of exclusion definition dictionaries.
grandparent_value
Service Class Support

Uber Class Support
bodystringThe grandparent value for the exclusion.
groups
Service Class Support

Uber Class Support
bodystring or list of stringsGroup IDs to apply this exclusion to.
parent_value
Service Class Support

Uber Class Support
bodystringThe parent value for the exclusion.
value
Service Class Support

Uber Class Support
bodystringThe value to exclude.

Usage

Service class example (PEP8 syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

group_list = ['ID1', 'ID2', 'ID3']
exclude_list = ['EX1', 'EX2', 'EX3']

response = falcon.create_exclusions_v2(comment="string",
                                       excluded_from=exclude_list,
                                       grandparent_value="string",
                                       groups=group_list,
                                       parent_value="string",
                                       value="string"
                                       )
print(response)
Service class example (Operation ID syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

group_list = ['ID1', 'ID2', 'ID3']
exclude_list = ['EX1', 'EX2', 'EX3']

response = falcon.exclusions_create_v2(comment="string",
                                       excluded_from=exclude_list,
                                       grandparent_value="string",
                                       groups=group_list,
                                       parent_value="string",
                                       value="string"
                                       )
print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

group_list = ['ID1', 'ID2', 'ID3']
exclude_list = ['EX1', 'EX2', 'EX3']

BODY = {
    "exclusions": [
        {
            "comment": "string",
            "excluded_from": exclude_list,
            "grandparent_value": "string",
            "groups": group_list,
            "parent_value": "string",
            "value": "string"
        }
    ]
}

response = falcon.command("exclusions_create_v2", body=BODY)
print(response)

Back to Table of Contents

exclusions_update_v2

Update the exclusions by id, with ancestor fields.

PEP8 method name

update_exclusions_v2

Endpoint

MethodRoute
PATCH/exclusions/entities/exclusions/v2

Required Scope

ml-exclusions:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
body
Service Class Support

Uber Class Support
bodydictionaryFull body payload in JSON format.
comment
Service Class Support

Uber Class Support
bodystringDescriptive comment for the exclusion update.
excluded_from
Service Class Support

Uber Class Support
bodystring or list of stringsSources to exclude from.
grandparent_value
Service Class Support

Uber Class Support
bodystringThe grandparent value for the exclusion.
groups
Service Class Support

Uber Class Support
bodystring or list of stringsGroup IDs to apply this exclusion to.
id
Service Class Support

Uber Class Support
bodystringThe ID of the exclusion to update.
parent_value
Service Class Support

Uber Class Support
bodystringThe parent value for the exclusion.
value
Service Class Support

Uber Class Support
bodystringThe value to exclude.

Usage

Service class example (PEP8 syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

group_list = ['ID1', 'ID2', 'ID3']
exclude_list = ['EX1', 'EX2', 'EX3']

response = falcon.update_exclusions_v2(comment="string",
                                       excluded_from=exclude_list,
                                       grandparent_value="string",
                                       groups=group_list,
                                       id="string",
                                       parent_value="string",
                                       value="string"
                                       )
print(response)
Service class example (Operation ID syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

group_list = ['ID1', 'ID2', 'ID3']
exclude_list = ['EX1', 'EX2', 'EX3']

response = falcon.exclusions_update_v2(comment="string",
                                       excluded_from=exclude_list,
                                       grandparent_value="string",
                                       groups=group_list,
                                       id="string",
                                       parent_value="string",
                                       value="string"
                                       )
print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

group_list = ['ID1', 'ID2', 'ID3']
exclude_list = ['EX1', 'EX2', 'EX3']

BODY = {
    "comment": "string",
    "excluded_from": exclude_list,
    "grandparent_value": "string",
    "groups": group_list,
    "id": "string",
    "parent_value": "string",
    "value": "string"
}

response = falcon.command("exclusions_update_v2", body=BODY)
print(response)

Back to Table of Contents

exclusions_delete_v2

Delete the exclusions by id, with ancestor fields.

PEP8 method name

delete_exclusions_v2

Endpoint

MethodRoute
DELETE/exclusions/entities/exclusions/v2

Required Scope

ml-exclusions:write

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
comment
Service Class Support

Uber Class Support
querystringThe comment why these exclusions were deleted.
ids
Service Class Support

Uber Class Support
querystring or list of stringsThe IDs of the exclusions to delete.
parameters
Service Class Support

Uber Class Support
querydictionaryFull query string parameters payload in JSON format.

Usage

Service class example (PEP8 syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(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_exclusions_v2(comment="string", ids=id_list)
print(response)
Service class example (Operation ID syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.exclusions_delete_v2(comment="string", ids=id_list)
print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.command("exclusions_delete_v2", comment="string", ids=id_list)
print(response)

Back to Table of Contents

exclusions_search_v2

Search for exclusions, with ancestor fields.

PEP8 method name

search_exclusions

Endpoint

MethodRoute
GET/exclusions/queries/exclusions/v2

Required Scope

ml-exclusions:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filter
Service Class Support

Uber Class Support
querystringThe filter expression that should be used to limit the results. FQL syntax.
limit
Service Class Support

Uber Class Support
queryintegerThe maximum records to return. [1-500]
offset
Service Class Support

Uber Class Support
queryintegerThe offset to start retrieving records from.
parameters
Service Class Support

Uber Class Support
querydictionaryFull query string parameters payload in JSON format.
sort
Service Class Support

Uber Class Support
querystringThe sort expression that should be used to sort the results.

Available sort fields:
  • applied_globally
  • created_by
  • created_on
  • grandparent_value
  • is_descendant_process
  • last_modified
  • modified_by
  • parent_value
  • value

Usage

Service class example (PEP8 syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

response = falcon.search_exclusions(filter="string",
                                    offset=integer,
                                    limit=integer,
                                    sort="string"
                                    )
print(response)
Service class example (Operation ID syntax)
from falconpy import MLExclusions

# Do not hardcode API credentials!
falcon = MLExclusions(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

response = falcon.exclusions_search_v2(filter="string",
                                       offset=integer,
                                       limit=integer,
                                       sort="string"
                                       )
print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

response = falcon.command("exclusions_search_v2",
                          filter="string",
                          offset=integer,
                          limit=integer,
                          sort="string"
                          )
print(response)

Back to Table of Contents