Sensor Visibility Exclusions - CrowdStrike/falconpy GitHub Wiki
Operation ID | Description | ||||
---|---|---|---|---|---|
|
Get a set of Sensor Visibility Exclusions by specifying their IDs. | ||||
|
Create a sensor visibility exclusion. | ||||
|
Delete the sensor visibility exclusions by ID. | ||||
|
Update a sensor visibility exclusion. | ||||
|
Search for sensor visibility exclusions. |
WARNING
client_id
andclient_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.
Get a set of Sensor Visibility Exclusions by specifying their IDs
get_exclusions
Method | Route |
---|---|
/policy/entities/sv-exclusions/v1 |
- Produces: application/json
Name | Service | Uber | Type | Data type | Description |
---|---|---|---|---|---|
ids |
|
|
query | string or list of strings | The IDs of the exclusions to retrieve. |
parameters |
|
|
query | dictionary | Full query string parameters payload in JSON format. |
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)
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)
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)
Create the sensor visibility exclusions
create_exclusions
Method | Route |
---|---|
/policy/entities/sv-exclusions/v1 |
- Produces: application/json
Name | Service | Uber | Type | Data type | Description |
---|---|---|---|---|---|
body |
|
|
body | dictionary | Full body payload in JSON format. |
comment |
|
|
body | string | String comment describing why the exclusions was created. |
groups |
|
|
body | list of strings | Group ID(s) impacted by the exclusion. |
value |
|
|
body | string | Value to match for the exclusion. |
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)
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)
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)
Delete the sensor visibility exclusions by id
delete_exclusions
Method | Route |
---|---|
/policy/entities/sv-exclusions/v1 |
- Produces: application/json
Name | Service | Uber | Type | Data type | Description |
---|---|---|---|---|---|
comment |
|
|
query | string | Explains why this exclusion was deleted. |
ids |
|
|
query | string or list of strings | The IDs of the exclusions to retrieve. |
parameters |
|
|
query | dictionary | Full query string parameters payload in JSON format. |
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)
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)
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)
Update the sensor visibility exclusions
update_exclusions
Method | Route |
---|---|
/policy/entities/sv-exclusions/v1 |
- Produces: application/json
Name | Service | Uber | Type | Data type | Description |
---|---|---|---|---|---|
body |
|
|
body | dictionary | Full body payload in JSON format. |
comment |
|
|
body | string | String comment describing why the exclusions was created. |
groups |
|
|
body | list of strings | Group ID(s) impacted by the exclusion. |
id |
|
|
body | string | The ID of the exclusion to update. |
is_descendent_process |
|
|
body | boolean | Flag to determine if an exclusion should apply to all descendant processes. |
value |
|
|
body | string | Value to match for the exclusion. |
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)
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)
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)
Search for sensor visibility exclusions.
query_exclusions
Method | Route |
---|---|
/policy/queries/sv-exclusions/v1 |
- Produces: application/json
Name | Service | Uber | Type | Data type | Description |
---|---|---|---|---|---|
filter |
|
|
query | string | The filter expression that should be used to limit the results. FQL syntax. Available filters:
|
limit |
|
|
query | integer | The maximum number of records to return. [1-500] |
offset |
|
|
query | integer | The offset to start retrieving records from. |
parameters |
|
|
query | dictionary | Full query string parameters payload in JSON format. |
sort |
|
|
query | string | The property to sort by. FQL syntax. (e.g. last_behavior|asc) Available sort fields:
|
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)
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)
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)