Using the ODS (On Demand Scan) service collection
Table of Contents
Passing credentials
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.
aggregate_query_scan_host_metadata
Get aggregates on ODS scan-hosts data.
PEP8 method name
aggregate_scan_hosts
Endpoint
Method | Route |
---|---|
/ods/aggregates/scan-hosts/v1 |
Required Scope
Content-Type
- Produces: application/json
Keyword Arguments
Name | Service | Uber | Type | Data type | Description |
---|---|---|---|---|---|
body | body | list of dictionaries | Full body payload in JSON format. | ||
date_ranges | body | list of dictionaries | Applies to date_range aggregations. Example: [ { "from": "2016-05-28T09:00:31Z", "to": "2016-05-30T09:00:31Z" }, { "from": "2016-06-01T09:00:31Z", "to": "2016-06-10T09:00:31Z" } ] | ||
exclude | body | string | Elements to exclude. | ||
field | body | string | The field on which to compute the aggregation. | ||
filter | body | string | FQL syntax formatted string to use to filter the results. | ||
from | body | integer | Starting position. | ||
include | body | string | Elements to include. | ||
interval | body | string | Time interval for date histogram aggregations. Valid values include:
| ||
max_doc_count | body | integer | Only return buckets if values are less than or equal to the value here. | ||
min_doc_count | body | integer | Only return buckets if values are greater than or equal to the value here. | ||
missing | body | string | Missing is the value to be used when the aggregation field is missing from the object. In other words, the missing parameter defines how documents that are missing a value should be treated. By default they will be ignored, but it is also possible to treat them as if they had a value. | ||
name | body | string | Name of the aggregate query, as chosen by the user. Used to identify the results returned to you. | ||
q | body | string | Full text search across all metadata fields. | ||
ranges | body | list of dictionaries | Applies to range aggregations. Ranges values will depend on field. For example, if max_severity is used, ranges might look like: [ { "From": 0, "To": 70 }, { "From": 70, "To": 100 } ] | ||
size | body | integer | The max number of term buckets to be returned. | ||
sub_aggregates | body | list of dictionaries | A nested aggregation, such as: [ { "name": "max_first_behavior", "type": "max", "field": "first_behavior" } ] There is a maximum of 3 nested aggregations per request. | ||
sort | body | string | FQL syntax string to sort bucket results.
asc and desc using | format. Example: _count|desc | ||
time_zone | body | string | Time zone for bucket results. | ||
type | body | string | Type of aggregation. Valid values include:
|
Usage
Service class example (PEP8 syntax)
from falconpy import ODS
# Do not hardcode API credentials!
falcon = ODS(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
date_ranges = [
{
"from": "2021-05-15T14:55:21.892315096Z",
"to": "2021-05-17T13:42:16.493180643Z"
}
]
ranges = [
{
"From": 1,
"To": 100
}
]
response = falcon.aggregate_scan_hosts(date_ranges=date_ranges,
exclude="string",
field="string",
filter="string",
from=integer,
include="string",
interval="string",
max_doc_count=integer,
min_doc_count=integer,
missing="string",
name="string",
q="string",
ranges=ranges,
size=integer,
sort="string",
time_zone="string",
type="string"
)
print(response)
Service class example (Operation ID syntax)
from falconpy import ODS
# Do not hardcode API credentials!
falcon = ODS(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
date_ranges = [
{
"from": "2021-05-15T14:55:21.892315096Z",
"to": "2021-05-17T13:42:16.493180643Z"
}
]
ranges = [
{
"From": 1,
"To": 100
}
]
response = falcon.aggregate_query_scan_host_metadata(date_ranges=date_ranges,
exclude="string",
field="string",
filter="string",
from=integer,
include="string",
interval="string",
max_doc_count=integer,
min_doc_count=integer,
missing="string",
name="string",
q="string",
ranges=ranges,
size=integer,
sort="string",
time_zone="string",
type="string"
)
print(response)
Uber class example
from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
date_ranges = [
{
"from": "2021-05-15T14:55:21.892315096Z",
"to": "2021-05-17T13:42:16.493180643Z"
}
]
ranges = [
{
"From": 1,
"To": 100
}
]
BODY = [{
"date_ranges": date_ranges,
"exclude": "string",
"field": "string",
"filter": "string",
"from": integer,
"include": "string",
"interval": "string",
"max_doc_count": integer,
"min_doc_count": integer,
"missing": "string",
"name": "string",
"q": "string",
"ranges": ranges,
"size": integer,
"sort": "string",
"sub_aggregates": [
null
]
"time_zone": "string",
"type": "string"
}]
response = falcon.command("aggregate_query_scan_host_metadata", body=BODY)
print(response)
Back to Table of Contents
aggregate_scans
Get aggregates on ODS scan data.
PEP8 method name
aggregate_scans
Endpoint
Method | Route |
---|---|
/ods/aggregates/scans/v1 |
Required Scope
Content-Type
- Produces: application/json
Keyword Arguments
Name | Service | Uber | Type | Data type | Description |
---|---|---|---|---|---|
body | body | list of dictionaries | Full body payload in JSON format. | ||
date_ranges | body | list of dictionaries | Applies to date_range aggregations. Example: [ { "from": "2016-05-28T09:00:31Z", "to": "2016-05-30T09:00:31Z" }, { "from": "2016-06-01T09:00:31Z", "to": "2016-06-10T09:00:31Z" } ] | ||
exclude | body | string | Elements to exclude. | ||
field | body | string | The field on which to compute the aggregation. | ||
filter | body | string | FQL syntax formatted string to use to filter the results. | ||
from | body | integer | Starting position. | ||
include | body | string | Elements to include. | ||
interval | body | string | Time interval for date histogram aggregations. Valid values include:
| ||
max_doc_count | body | integer | Only return buckets if values are less than or equal to the value here. | ||
min_doc_count | body | integer | Only return buckets if values are greater than or equal to the value here. | ||
missing | body | string | Missing is the value to be used when the aggregation field is missing from the object. In other words, the missing parameter defines how documents that are missing a value should be treated. By default they will be ignored, but it is also possible to treat them as if they had a value. | ||
name | body | string | Name of the aggregate query, as chosen by the user. Used to identify the results returned to you. | ||
q | body | string | Full text search across all metadata fields. | ||
ranges | body | list of dictionaries | Applies to range aggregations. Ranges values will depend on field. For example, if max_severity is used, ranges might look like: [ { "From": 0, "To": 70 }, { "From": 70, "To": 100 } ] | ||
size | body | integer | The max number of term buckets to be returned. | ||
sub_aggregates | body | list of dictionaries | A nested aggregation, such as: [ { "name": "max_first_behavior", "type": "max", "field": "first_behavior" } ] There is a maximum of 3 nested aggregations per request. | ||
sort | body | string | FQL syntax string to sort bucket results.
asc and desc using | format. Example: _count|desc | ||
time_zone | body | string | Time zone for bucket results. | ||
type | body | string | Type of aggregation. Valid values include:
|
Usage
Service class example (PEP8 / Operation ID syntax)
from falconpy import ODS
# Do not hardcode API credentials!
falcon = ODS(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
date_ranges = [
{
"from": "2021-05-15T14:55:21.892315096Z",
"to": "2021-05-17T13:42:16.493180643Z"
}
]
ranges = [
{
"From": 1,
"To": 100
}
]
response = falcon.aggregate_scans(date_ranges=date_ranges,
exclude="string",
field="string",
filter="string",
from=integer,
include="string",
interval="string",
max_doc_count=integer,
min_doc_count=integer,
missing="string",
name="string",
q="string",
ranges=ranges,
size=integer,
sort="string",
time_zone="string",
type="string"
)
print(response)
Uber class example
from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
date_ranges = [
{
"from": "2021-05-15T14:55:21.892315096Z",
"to": "2021-05-17T13:42:16.493180643Z"
}
]
ranges = [
{
"From": 1,
"To": 100
}
]
BODY = [{
"date_ranges": date_ranges,
"exclude": "string",
"field": "string",
"filter": "string",
"from": integer,
"include": "string",
"interval": "string",
"max_doc_count": integer,
"min_doc_count": integer,
"missing": "string",
"name": "string",
"q": "string",
"ranges": ranges,
"size": integer,
"sort": "string",
"sub_aggregates": [
null
]
"time_zone": "string",
"type": "string"
}]
response = falcon.command("aggregate_scans", body=BODY)
print(response)
Back to Table of Contents
aggregate_scheduled_scans
Get aggregates on ODS scheduled-scan data.
PEP8 method name
aggregate_scheduled_scans
Endpoint
Method | Route |
---|---|
/ods/aggregates/scheduled-scans/v1 |
Required Scope
Content-Type
- Produces: application/json
Keyword Arguments
Name | Service | Uber | Type | Data type | Description |
---|---|---|---|---|---|
body | body | list of dictionaries | Full body payload in JSON format. | ||
date_ranges | body | list of dictionaries | Applies to date_range aggregations. Example: [ { "from": "2016-05-28T09:00:31Z", "to": "2016-05-30T09:00:31Z" }, { "from": "2016-06-01T09:00:31Z", "to": "2016-06-10T09:00:31Z" } ] | ||
exclude | body | string | Elements to exclude. | ||
field | body | string | The field on which to compute the aggregation. | ||
filter | body | string | FQL syntax formatted string to use to filter the results. | ||
from | body | integer | Starting position. | ||
include | body | string | Elements to include. | ||
interval | body | string | Time interval for date histogram aggregations. Valid values include:
| ||
max_doc_count | body | integer | Only return buckets if values are less than or equal to the value here. | ||
min_doc_count | body | integer | Only return buckets if values are greater than or equal to the value here. | ||
missing | body | string | Missing is the value to be used when the aggregation field is missing from the object. In other words, the missing parameter defines how documents that are missing a value should be treated. By default they will be ignored, but it is also possible to treat them as if they had a value. | ||
name | body | string | Name of the aggregate query, as chosen by the user. Used to identify the results returned to you. | ||
q | body | string | Full text search across all metadata fields. | ||
ranges | body | list of dictionaries | Applies to range aggregations. Ranges values will depend on field. For example, if max_severity is used, ranges might look like: [ { "From": 0, "To": 70 }, { "From": 70, "To": 100 } ] | ||
size | body | integer | The max number of term buckets to be returned. | ||
sub_aggregates | body | list of dictionaries | A nested aggregation, such as: [ { "name": "max_first_behavior", "type": "max", "field": "first_behavior" } ] There is a maximum of 3 nested aggregations per request. | ||
sort | body | string | FQL syntax string to sort bucket results.
asc and desc using | format. Example: _count|desc | ||
time_zone | body | string | Time zone for bucket results. | ||
type | body | string | Type of aggregation. Valid values include:
|
Usage
Service class example (PEP8 / Operation ID syntax)
from falconpy import ODS
# Do not hardcode API credentials!
falcon = ODS(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
date_ranges = [
{
"from": "2021-05-15T14:55:21.892315096Z",
"to": "2021-05-17T13:42:16.493180643Z"
}
]
ranges = [
{
"From": 1,
"To": 100
}
]
response = falcon.aggregate_scheduled_scans(date_ranges=date_ranges,
exclude="string",
field="string",
filter="string",
from=integer,
include="string",
interval="string",
max_doc_count=integer,
min_doc_count=integer,
missing="string",
name="string",
q="string",
ranges=ranges,
size=integer,
sort="string",
time_zone="string",
type="string"
)
print(response)
Uber class example
from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
date_ranges = [
{
"from": "2021-05-15T14:55:21.892315096Z",
"to": "2021-05-17T13:42:16.493180643Z"
}
]
ranges = [
{
"From": 1,
"To": 100
}
]
BODY = [{
"date_ranges": date_ranges,
"exclude": "string",
"field": "string",
"filter": "string",
"from": integer,
"include": "string",
"interval": "string",
"max_doc_count": integer,
"min_doc_count": integer,
"missing": "string",
"name": "string",
"q": "string",
"ranges": ranges,
"size": integer,
"sort": "string",
"sub_aggregates": [
null
]
"time_zone": "string",
"type": "string"
}]
response = falcon.command("aggregate_scheduled_scans", body=BODY)
print(response)
Back to Table of Contents
get_malicious_files_by_ids
Get malicious files by ids.
PEP8 method name
get_malicious_files
Endpoint
Method | Route |
---|---|
/ods/entities/malicious-files/v1 |
Required Scope
Content-Type
- Produces: application/json
Keyword Arguments
Name | Service | Uber | Type | Data type | Description |
---|---|---|---|---|---|
ids | query | string or list of strings | Malicious file IDs to retrieve. | ||
parameters | query | dictionary | Full query string parameters payload in JSON format. |
Usage
Service class example (PEP8 / Operation ID syntax)
from falconpy import ODS
# Do not hardcode API credentials!
falcon = ODS(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_malicious_files(ids=id_list)
print(response)
Uber class example
from falconpy import APIHarnessV2
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("get_malicious_files_by_ids", ids=id_list)
print(response)
Back to Table of Contents
cancel_scans
Cancel ODS scans for the given scan ids.
PEP8 method name
cancel_scans
Endpoint
Method | Route |
---|---|
/ods/entities/scan-control-actions/cancel/v1 |
Required Scope
Content-Type
- Produces: application/json
Keyword Arguments
Name | Service | Uber | Type | Data type | Description |
---|---|---|---|---|---|
ids | query | string or list of strings | Malicious file IDs to retrieve. | ||
parameters | query | dictionary | Full query string parameters payload in JSON format. |
Usage
Service class example (PEP8 / Operation ID syntax)
from falconpy import ODS
# Do not hardcode API credentials!
falcon = ODS(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.cancel_scans(ids=id_list)
print(response)
Uber class example
from falconpy import APIHarnessV2
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("cancel_scans", ids=id_list)
print(response)
Back to Table of Contents
get_scan_host_metadata_by_ids
Get scan hosts by ids.
PEP8 method name
get_scan_hosts
Endpoint
Method | Route |
---|---|
/ods/entities/scan-hosts/v1 |
Required Scope
Content-Type
- Produces: application/json
Keyword Arguments
Name | Service | Uber | Type | Data type | Description |
---|---|---|---|---|---|
ids | query | string or list of strings | Scan IDs to retrieve hosts for. | ||
parameters | query | dictionary | Full query string parameters payload in JSON format. |
Usage
Service class example (PEP8 / Operation ID syntax)
from falconpy import ODS
# Do not hardcode API credentials!
falcon = ODS(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_scan_hosts(ids=id_list)
print(response)
Uber class example
from falconpy import APIHarnessV2
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("get_scan_host_metadata_by_ids", ids=id_list)
print(response)
Back to Table of Contents
get_scans_by_scan_ids_v1
Get Scans by IDs.
PEP8 method name
get_scans_by_scan_ids_v1
Endpoint
Method | Route |
---|---|
/ods/entities/scans/v1 |
Required Scope
Content-Type
- Produces: application/json
Keyword Arguments
Name | Service | Uber | Type | Data type | Description |
---|---|---|---|---|---|
ids | query | string or list of strings | Scan IDs to retrieve. | ||
parameters | query | dictionary | Full query string parameters payload in JSON format. |
Usage
Service class example (PEP8 / Operation ID syntax)
from falconpy import ODS
# Do not hardcode API credentials!
falcon = ODS(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_scans_by_scan_ids_v1(ids=id_list)
print(response)
Uber class example
from falconpy import APIHarnessV2
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("get_scans_by_scan_ids", ids=id_list)
print(response)
Back to Table of Contents
get_scans_by_scan_ids_v2
Get Scans by IDs.
PEP8 method name
get_scans_by_scan_ids_v2 (or get_scans)
Endpoint
Method | Route |
---|---|
/ods/entities/scans/v2 |
Required Scope
Content-Type
- Produces: application/json
Keyword Arguments
Name | Service | Uber | Type | Data type | Description |
---|---|---|---|---|---|
ids | query | string or list of strings | Scan IDs to retrieve. | ||
parameters | query | dictionary | Full query string parameters payload in JSON format. |
Usage
Service class example (PEP8 / Operation ID syntax)
from falconpy import ODS
# Do not hardcode API credentials!
falcon = ODS(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_scans(ids=id_list)
print(response)
Uber class example
from falconpy import APIHarnessV2
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("get_scans_by_scan_ids_v2", ids=id_list)
print(response)
Back to Table of Contents
create_scan
Create ODS scan and start or schedule scan for the given scan request.
PEP8 method name
create_scan
Endpoint
Method | Route |
---|---|
/ods/entities/scans/v1 |
Required Scope
Content-Type
- Produces: application/json
Keyword Arguments
Name | Service | Uber | Type | Data type | Description |
---|---|---|---|---|---|
body | body | dictionary | Full body payload in JSON format. | ||
cloud_ml_level_detection | body | integer | ML Detection level for the scan. | ||
cloud_ml_level_prevention | body | integer | ML Prevention level for the scan. | ||
cpu_priority | body | integer | Set the scan CPU priority. | ||
description | body | string | Scan description. | ||
endpoint_notification | body | boolean | Flag indicating if the endpoint should be notified of the results. | ||
file_paths | body | list of strings | List of file paths to be scanned. | ||
host_groups | body | list of strings | List of host groups to be scanned. | ||
initiated_from | body | string | Scan origination. | ||
max_duration | body | integer | Maximum time (in seconds) the scan is allowed to execute. | ||
max_file_size | body | integer | Maximum file size (in bytes) to be scanned. | ||
pause_duration | body | integer | Amount of time (in seconds) for scan pauses. | ||
quarantine | body | boolean | Flag indicating if identified threats should be quarantined. | ||
scan_exclusions | body | list of strings | List of excuded files or locations for this scan. | ||
sensor_ml_level_detection | body | integer | Sensor ML detection level. | ||
sensor_ml_level_prevention | body | integer | Sensor ML prevention level. |
Usage
Service class example (PEP8 / Operation ID syntax)
from falconpy import ODS
# Do not hardcode API credentials!
falcon = ODS(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
file_paths = ["string", "string"]
host_groups = ["string", "string"]
exclusions = ["string", "string"]
response = falcon.create_scan(cloud_ml_level_detection=integer,
cloud_ml_level_prevetion=integer,
cpu_priority=integer,
description="string",
endpoint_notification=boolean,
file_paths=file_paths,
host_groups=host_groups,
initiated_from="string",
max_duration=integer,
max_file_size=integer,
pause_duration=integer,
quarantine=boolean,
scan_exclusions=exclusions,
sensor_ml_level_detection=integer,
sensor_ml_level_prevention=integer
)
print(response)
Uber class example
from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
BODY = {
"cloud_ml_level_detection": integer,
"cloud_ml_level_prevention": integer,
"cpu_priority": integer,
"description": "string",
"endpoint_notification": boolean,
"file_paths": [
"string"
],
"host_groups": [
"string"
],
"hosts": [
"string"
],
"initiated_from": "string",
"max_duration": integer,
"max_file_size": integer,
"pause_duration": integer,
"quarantine": boolean,
"scan_exclusions": [
"string"
],
"sensor_ml_level_detection": integer,
"sensor_ml_level_prevention": integer
}
response = falcon.command("create_scan", body=BODY)
print(response)
Back to Table of Contents
get_scheduled_scans_by_scan_ids
Get ScheduledScans by IDs.
PEP8 method name
get_scheduled_scans
Endpoint
Method | Route |
---|---|
/ods/entities/scheduled-scans/v1 |
Required Scope
Content-Type
- Produces: application/json
Keyword Arguments
Name | Service | Uber | Type | Data type | Description |
---|---|---|---|---|---|
ids | query | string or list of strings | Scan IDs to retrieve. | ||
parameters | query | dictionary | Full query string parameters payload in JSON format. |
Usage
Service class example (PEP8 / Operation ID syntax)
from falconpy import ODS
# Do not hardcode API credentials!
falcon = ODS(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_scheduled_scans(ids=id_list)
print(response)
Uber class example
from falconpy import APIHarnessV2
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("get_scheduled_scans_by_scan_ids", ids=id_list)
print(response)
Back to Table of Contents
schedule_scan
Create ODS scan and start or schedule scan for the given scan request.
PEP8 method name
schedule_scan
Endpoint
Method | Route |
---|---|
/ods/entities/scheduled-scans/v1 |
Required Scope
Content-Type
- Produces: application/json
Keyword Arguments
Name | Service | Uber | Type | Data type | Description |
---|---|---|---|---|---|
body | body | dictionary | Full body payload in JSON format. | ||
cloud_ml_level_detection | body | integer | ML Detection level for the scan. | ||
cloud_ml_level_prevention | body | integer | ML Prevention level for the scan. | ||
cpu_priority | body | integer | Set the scan CPU priority. | ||
description | body | string | Scan description. | ||
endpoint_notification | body | boolean | Flag indicating if the endpoint should be notified of the results. | ||
file_paths | body | list of strings | List of file paths to be scanned. | ||
host_groups | body | list of strings | List of host groups to be scanned. | ||
initiated_from | body | string | Scan origination. | ||
max_duration | body | integer | Maximum time (in seconds) the scan is allowed to execute. | ||
max_file_size | body | integer | Maximum file size (in bytes) to be scanned. | ||
pause_duration | body | integer | Amount of time (in seconds) for scan pauses. | ||
quarantine | body | boolean | Flag indicating if identified threats should be quarantined. | ||
scan_exclusions | body | list of strings | List of excluded files or locations for this scan. | ||
scan_inclusions | body | list of strings | List of included files or locations for this scan. | ||
schedule | body | dictionary | Dictionary container the schedule for the scan. This dictionary will contain the ignored_by_channelfile (boolean), interval (integer) and start_timestamp (string) keys. | ||
sensor_ml_level_detection | body | integer | Sensor ML detection level. | ||
sensor_ml_level_prevention | body | integer | Sensor ML prevention level. |
Usage
Service class example (PEP8 / Operation ID syntax)
from falconpy import ODS
# Do not hardcode API credentials!
falcon = ODS(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
file_paths = ["string", "string"]
host_groups = ["string", "string"]
exclusions = ["string", "string"]
inclusions = ["string", "string"]
schedule = {
"ignored_by_channelfile": boolean,
"interval": integer,
"start_timestamp": "string"
}
response = falcon.schedule_scan(cloud_ml_level_detection=integer,
cloud_ml_level_prevetion=integer,
cpu_priority=integer,
description="string",
endpoint_notification=boolean,
file_paths=file_paths,
host_groups=host_groups,
initiated_from="string",
max_duration=integer,
max_file_size=integer,
pause_duration=integer,
quarantine=boolean,
scan_exclusions=exclusions,
scan_inclusions=inclusions,
schedule=schedule,
sensor_ml_level_detection=integer,
sensor_ml_level_prevention=integer
)
print(response)
Uber class example
from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
BODY = {
"cloud_ml_level_detection": integer,
"cloud_ml_level_prevention": integer,
"cpu_priority": integer,
"description": "string",
"endpoint_notification": boolean,
"file_paths": [
"string"
],
"host_groups": [
"string"
],
"initiated_from": "string",
"max_duration": integer,
"max_file_size": integer,
"pause_duration": integer,
"quarantine": boolean,
"scan_exclusions": [
"string"
],
"scan_inclusions": [
"string"
],
"schedule": {
"ignored_by_channelfile": boolean,
"interval": integer,
"start_timestamp": "string"
},
"sensor_ml_level_detection": integer,
"sensor_ml_level_prevention": integer
}
response = falcon.command("schedule_scan", body=BODY)
print(response)
Back to Table of Contents
delete_scheduled_scans
Delete ODS scheduled-scans for the given scheduled-scan ids.
PEP8 method name
delete_scheduled_scans
Endpoint
Method | Route |
---|---|
/ods/entities/scheduled-scans/v1 |
Required Scope
Content-Type
- Produces: application/json
Keyword Arguments
Name | Service | Uber | Type | Data type | Description |
---|---|---|---|---|---|
filter | query | string or list of strings | FQL compatible filter to use for selecting scan IDs. | ||
ids | query | string or list of strings | Scan IDs to delete. | ||
parameters | query | dictionary | Full query string parameters payload in JSON format. |
Usage
Service class example (PEP8 / Operation ID syntax)
from falconpy import ODS
# Do not hardcode API credentials!
falcon = ODS(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_scheduled_scans(filter="string", ids=id_list)
print(response)
Uber class example
from falconpy import APIHarnessV2
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("delete_scheduled_scans", filters="string", ids=id_list)
print(response)
Back to Table of Contents
query_malicious_files
Query malicious files.
PEP8 method name
query_malicious_files
Endpoint
Method | Route |
---|---|
/ods/queries/malicious-files/v1 |
Required Scope
Content-Type
- Produces: application/json
Keyword Arguments
Name | Service | Uber | Type | Data type | Description |
---|---|---|---|---|---|
filter | query | string | FQL Syntax formatted string used to limit the results. Available filters:
| ||
limit | query | integer | Maximum number of resources to return. | ||
offset | query | integer | Starting index of overall result set from which to return ids. | ||
sort | query | string | The property to sort by. (Ex: created_timestamp.desc) | ||
parameters | query | dictionary | Full query string parameters payload in JSON format. |
Usage
Service class example (PEP8 / Operation ID syntax)
from falconpy import ODS
# Do not hardcode API credentials!
falcon = ODS(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.query_malicious_files(filter="string",
limit=integer,
offset=integer,
sort="string"
)
print(response)
Uber class example
from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.command("query_malicious_files",
filter="string",
limit=integer,
offset=integer,
sort="string"
)
print(response)
Back to Table of Contents
query_scan_host_metadata
Query scan hosts.
PEP8 method name
query_scan_hosts
Endpoint
Method | Route |
---|---|
/ods/queries/scan-hosts/v1 |
Required Scope
Content-Type
- Produces: application/json
Keyword Arguments
Name | Service | Uber | Type | Data type | Description |
---|---|---|---|---|---|
filter | query | string | FQL Syntax formatted string used to limit the results. Available filters:
| ||
limit | query | integer | Maximum number of resources to return. | ||
offset | query | integer | Starting index of overall result set from which to return ids. | ||
sort | query | string | The property to sort by. (Ex: created_timestamp.desc) | ||
parameters | query | dictionary | Full query string parameters payload in JSON format. |
Usage
Service class example (PEP8 / Operation ID syntax)
from falconpy import ODS
# Do not hardcode API credentials!
falcon = ODS(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.query_scan_hosts(filter="string",
limit=integer,
offset=integer,
sort="string"
)
print(response)
Uber class example
from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.command("query_scan_host_metadata",
filter="string",
limit=integer,
offset=integer,
sort="string"
)
print(response)
Back to Table of Contents
query_scans
Query Scans.
PEP8 method name
query_scans
Endpoint
Method | Route |
---|---|
/ods/queries/scans/v1 |
Required Scope
Content-Type
- Produces: application/json
Keyword Arguments
Name | Service | Uber | Type | Data type | Description |
---|---|---|---|---|---|
filter | query | string | FQL Syntax formatted string used to limit the results. Available filters:
| ||
limit | query | integer | Maximum number of resources to return. | ||
offset | query | integer | Starting index of overall result set from which to return ids. | ||
sort | query | string | The property to sort by. (Ex: created_timestamp.desc) | ||
parameters | query | dictionary | Full query string parameters payload in JSON format. |
Usage
Service class example (PEP8 / Operation ID syntax)
from falconpy import ODS
# Do not hardcode API credentials!
falcon = ODS(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.query_scans(filter="string",
limit=integer,
offset=integer,
sort="string"
)
print(response)
Uber class example
from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.command("query_scans",
filter="string",
limit=integer,
offset=integer,
sort="string"
)
print(response)
Back to Table of Contents
query_scheduled_scans
Query ScheduledScans.
PEP8 method name
query_scheduled_scans
Endpoint
Method | Route |
---|---|
/ods/queries/scheduled-scans/v1 |
Required Scope
Content-Type
- Produces: application/json
Keyword Arguments
Name | Service | Uber | Type | Data type | Description |
---|---|---|---|---|---|
filter | query | string | FQL Syntax formatted string used to limit the results. Available filters:
| ||
limit | query | integer | Maximum number of resources to return. | ||
offset | query | integer | Starting index of overall result set from which to return ids. | ||
sort | query | string | The property to sort by. (Ex: created_timestamp.desc) | ||
parameters | query | dictionary | Full query string parameters payload in JSON format. |
Usage
Service class example (PEP8 / Operation ID syntax)
from falconpy import ODS
# Do not hardcode API credentials!
falcon = ODS(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.query_scheduled_scans(filter="string",
limit=integer,
offset=integer,
sort="string"
)
print(response)
Uber class example
from falconpy import APIHarnessV2
falcon = APIHarnessV2(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.command("query_scheduled_scans",
filter="string",
limit=integer,
offset=integer,
sort="string"
)
print(response)
Back to Table of Contents