CrowdStrike Falcon CrowdStrike Subreddit

Using the Sensor Visibility Exclusions service collection

Uber class support Service class support Documentation Version Page Updated

Table of Contents

Operation IDDescription
getSensorVisibilityExclusionsV1
PEP 8get_exclusions
Get a set of Sensor Visibility Exclusions by specifying their IDs.
createSVExclusionsV1
PEP 8create_exclusions
Create a sensor visibility exclusion.
deleteSensorVisibilityExclusionsV1
PEP 8delete_exclusions
Delete the sensor visibility exclusions by ID.
updateSensorVisibilityExclusionsV1
PEP 8update_exclusions
Update a sensor visibility exclusion.
querySensorVisibilityExclusionsV1
PEP 8query_exclusions
Search for sensor visibility exclusions.

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.

getSensorVisibilityExclusionsV1

Get a set of Sensor Visibility Exclusions by specifying their IDs

PEP8 method name

get_exclusions

Endpoint

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

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 SensorVisibilityExclusions

# Do not hardcode API credentials!
falcon = SensorVisibilityExclusions(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 SensorVisibilityExclusions

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

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

response = falcon.getSensorVisibilityExclusionsV1(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("getSensorVisibilityExclusionsV1", ids=id_list)
print(response)

createSVExclusionsV1

Create the sensor visibility exclusions

PEP8 method name

create_exclusions

Endpoint

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

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.
value
Service Class Support

Uber Class Support
bodystringValue to match for the exclusion.

Usage

Service class example (PEP8 syntax)
from falconpy import SensorVisibilityExclusions

# Do not hardcode API credentials!
falcon = SensorVisibilityExclusions(client_id=CLIENT_ID,
                                    client_secret=CLIENT_SECRET
                                    )
group_list = ['ID1', 'ID2', 'ID3']

response = falcon.create_exclusions(comment="string",
                                    groups=group_list,
                                    value="string"
                                    )
print(response)

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

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

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

response = falcon.createSVExclusionsV1(comment="string",
                                       groups=group_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']

BODY = {
    "comment": "string",
    "groups": [
        "string"
    ],
    "value": "string"
}

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

deleteSensorVisibilityExclusionsV1

Delete the sensor visibility exclusions by id

PEP8 method name

delete_exclusions

Endpoint

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

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 SensorVisibilityExclusions

# Do not hardcode API credentials!
falcon = SensorVisibilityExclusions(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 SensorVisibilityExclusions

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

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

response = falcon.deleteSensorVisibilityExclusionsV1(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
                      )

PARAMS = {
    "comment": "string"
}

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

response = falcon.command("deleteSensorVisibilityExclusionsV1", parameters=PARAMS, ids=id_list)
print(response)

updateSensorVisibilityExclusionsV1

Update the sensor visibility exclusions

PEP8 method name

update_exclusions

Endpoint

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

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.
is_descendent_process
Service Class Support

Uber Class Support
bodybooleanFlag to determine if an exclusion should apply to all descendant processes.
value
Service Class Support

Uber Class Support
bodystringValue to match for the exclusion.

Usage

Service class example (PEP8 syntax)
from falconpy import SensorVisibilityExclusions

# Do not hardcode API credentials!
falcon = SensorVisibilityExclusions(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",
                                    is_descendent_process=boolean
                                    )
print(response)
Service class example (Operation ID syntax)
from falconpy import SensorVisibilityExclusions

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

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

response = falcon.updateSensorVisibilityExclusionsV1(comment="string",
                                                     groups=group_list,
                                                     value="string",
                                                     id="string",
                                                     is_descendent_process=boolean
                                                     )
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",
    "is_descendent_process": boolean
    "value": "string"
}

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

querySensorVisibilityExclusionsV1

Search for sensor visibility exclusions.

PEP8 method name

query_exclusions

Endpoint

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

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 SensorVisibilityExclusions

# Do not hardcode API credentials!
falcon = SensorVisibilityExclusions(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 SensorVisibilityExclusions

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

response = falcon.querySensorVisibilityExclusionsV1(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("querySensorVisibilityExclusionsV1",
                          filter="string",
                          offset=integer,
                          limit=integer,
                          sort="string"
                          )
print(response)