CrowdStrike Falcon CrowdStrike Subreddit

Using the ODS (On Demand Scan) service collection

Uber class support Service class support Documentation Version Page Updated

Table of Contents

Operation IDDescription
aggregate_query_scan_host_metadata
PEP8aggregate_query_scan_host_metadata
Get aggregates on ODS scan-hosts data.
aggregate_scans
PEP8aggregate_scans
Get aggregates on ODS scan data.
aggregate_scheduled_scans
PEP8aggregate_scheduled_scans
Get aggregates on ODS scheduled-scan data.
get_malicious_files_by_ids
PEP8get_malicious_files
Get malicious files by ids.
cancel_scans
PEP8cancel_scans
Cancel ODS scans for the given scan ids.
get_scan_host_metadata_by_ids
PEP8get_scan_hosts
Get scan hosts by ids.
get_scans_by_scan_ids_v1
PEP8get_scans_by_scan_ids_v1
Get Scans by IDs.
get_scans_by_scan_ids_v2
PEP8get_scans_by_scan_ids_v2
Get Scans by IDs.
create_scan
PEP8create_scan
Create ODS scan and start or schedule scan for the given scan request.
get_scheduled_scans_by_scan_ids
PEP8get_scheduled_scans
Get ScheduledScans by IDs.
schedule_scan
PEP8schedule_scan
Create ODS scan and start or schedule scan for the given scan request.
delete_scheduled_scans
PEP8delete_scheduled_scans
Delete ODS scheduled-scans for the given scheduled-scan ids.
query_malicious_files
PEP8query_malicious_files
Query malicious files.
query_scan_host_metadata
PEP8query_scan_hosts
Query scan hosts.
query_scans
PEP8query_scans
Query Scans.
query_scheduled_scans
PEP8query_scheduled_scans
Query ScheduledScans.

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.

aggregate_query_scan_host_metadata

Get aggregates on ODS scan-hosts data.

PEP8 method name

aggregate_scan_hosts

Endpoint

MethodRoute
POST/ods/aggregates/scan-hosts/v1

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
body
Service Class Support

Uber Class Support
bodylist of dictionariesFull body payload in JSON format.
date_ranges
Service Class Support

No Uber Class Support
bodylist of dictionariesApplies 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
Service Class Support

No Uber Class Support
bodystringElements to exclude.
field
Service Class Support

No Uber Class Support
bodystringThe field on which to compute the aggregation.
filter
Service Class Support

No Uber Class Support
bodystringFQL syntax formatted string to use to filter the results.
from
Service Class Support

No Uber Class Support
bodyintegerStarting position.
include
Service Class Support

No Uber Class Support
bodystringElements to include.
interval
Service Class Support

No Uber Class Support
bodystringTime interval for date histogram aggregations. Valid values include:
  • year
  • month
  • week
  • day
  • hour
  • minute
max_doc_count
Service Class Support

No Uber Class Support
bodyintegerOnly return buckets if values are less than or equal to the value here.
min_doc_count
Service Class Support

No Uber Class Support
bodyintegerOnly return buckets if values are greater than or equal to the value here.
missing
Service Class Support

No Uber Class Support
bodystringMissing 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
Service Class Support

No Uber Class Support
bodystringName of the aggregate query, as chosen by the user. Used to identify the results returned to you.
q
Service Class Support

No Uber Class Support
bodystringFull text search across all metadata fields.
ranges
Service Class Support

No Uber Class Support
bodylist of dictionariesApplies 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
Service Class Support

No Uber Class Support
bodyintegerThe max number of term buckets to be returned.
sub_aggregates
Service Class Support

No Uber Class Support
bodylist of dictionariesA nested aggregation, such as:
[
  {
    "name": "max_first_behavior",
    "type": "max",
    "field": "first_behavior"
  }
]

There is a maximum of 3 nested aggregations per request.
sort
Service Class Support

No Uber Class Support
bodystringFQL syntax string to sort bucket results.
  • _count - sort by document count
  • _term - sort by the string value alphabetically
Supports asc and desc using | format.

Example: _count|desc
time_zone
Service Class Support

No Uber Class Support
bodystringTime zone for bucket results.
type
Service Class Support

No Uber Class Support
bodystringType of aggregation. Valid values include:
  • date_histogram - Aggregates counts on a specified time interval. Requires use of “interval” field.
  • date_range - Aggregates counts on custom defined date range buckets. Can include multiple ranges. (Similar to time series, but the bucket sizes are variable). Date formats to follow ISO 8601.
  • terms - Buckets alerts by the value of a specified field. For example, if field used is scenario, then alerts will be bucketed by the various alert scenario names.
  • range - Buckets alerts by specified (numeric) ranges of a specified field. For example, if doing a range aggregation on the max_severity field, the alerts will be counted by the specified ranges of severity.
  • cardinality - Returns the count of distinct values in a specified field.
  • max - Returns the maximum value of a specified field.
  • min - Returns the minimum value of a specified field.
  • avg - Returns the average value of the specified field.
  • sum - Returns the total sum of all values for the specified field.
  • percentiles - Returns the following percentiles for the specified field: 1, 5, 25, 50, 75, 95, 99.

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

MethodRoute
POST/ods/aggregates/scans/v1

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
body
Service Class Support

Uber Class Support
bodylist of dictionariesFull body payload in JSON format.
date_ranges
Service Class Support

No Uber Class Support
bodylist of dictionariesApplies 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
Service Class Support

No Uber Class Support
bodystringElements to exclude.
field
Service Class Support

No Uber Class Support
bodystringThe field on which to compute the aggregation.
filter
Service Class Support

No Uber Class Support
bodystringFQL syntax formatted string to use to filter the results.
from
Service Class Support

No Uber Class Support
bodyintegerStarting position.
include
Service Class Support

No Uber Class Support
bodystringElements to include.
interval
Service Class Support

No Uber Class Support
bodystringTime interval for date histogram aggregations. Valid values include:
  • year
  • month
  • week
  • day
  • hour
  • minute
max_doc_count
Service Class Support

No Uber Class Support
bodyintegerOnly return buckets if values are less than or equal to the value here.
min_doc_count
Service Class Support

No Uber Class Support
bodyintegerOnly return buckets if values are greater than or equal to the value here.
missing
Service Class Support

No Uber Class Support
bodystringMissing 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
Service Class Support

No Uber Class Support
bodystringName of the aggregate query, as chosen by the user. Used to identify the results returned to you.
q
Service Class Support

No Uber Class Support
bodystringFull text search across all metadata fields.
ranges
Service Class Support

No Uber Class Support
bodylist of dictionariesApplies 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
Service Class Support

No Uber Class Support
bodyintegerThe max number of term buckets to be returned.
sub_aggregates
Service Class Support

No Uber Class Support
bodylist of dictionariesA nested aggregation, such as:
[
  {
    "name": "max_first_behavior",
    "type": "max",
    "field": "first_behavior"
  }
]

There is a maximum of 3 nested aggregations per request.
sort
Service Class Support

No Uber Class Support
bodystringFQL syntax string to sort bucket results.
  • _count - sort by document count
  • _term - sort by the string value alphabetically
Supports asc and desc using | format.

Example: _count|desc
time_zone
Service Class Support

No Uber Class Support
bodystringTime zone for bucket results.
type
Service Class Support

No Uber Class Support
bodystringType of aggregation. Valid values include:
  • date_histogram - Aggregates counts on a specified time interval. Requires use of “interval” field.
  • date_range - Aggregates counts on custom defined date range buckets. Can include multiple ranges. (Similar to time series, but the bucket sizes are variable). Date formats to follow ISO 8601.
  • terms - Buckets alerts by the value of a specified field. For example, if field used is scenario, then alerts will be bucketed by the various alert scenario names.
  • range - Buckets alerts by specified (numeric) ranges of a specified field. For example, if doing a range aggregation on the max_severity field, the alerts will be counted by the specified ranges of severity.
  • cardinality - Returns the count of distinct values in a specified field.
  • max - Returns the maximum value of a specified field.
  • min - Returns the minimum value of a specified field.
  • avg - Returns the average value of the specified field.
  • sum - Returns the total sum of all values for the specified field.
  • percentiles - Returns the following percentiles for the specified field: 1, 5, 25, 50, 75, 95, 99.

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

MethodRoute
POST/ods/aggregates/scheduled-scans/v1

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
body
Service Class Support

Uber Class Support
bodylist of dictionariesFull body payload in JSON format.
date_ranges
Service Class Support

No Uber Class Support
bodylist of dictionariesApplies 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
Service Class Support

No Uber Class Support
bodystringElements to exclude.
field
Service Class Support

No Uber Class Support
bodystringThe field on which to compute the aggregation.
filter
Service Class Support

No Uber Class Support
bodystringFQL syntax formatted string to use to filter the results.
from
Service Class Support

No Uber Class Support
bodyintegerStarting position.
include
Service Class Support

No Uber Class Support
bodystringElements to include.
interval
Service Class Support

No Uber Class Support
bodystringTime interval for date histogram aggregations. Valid values include:
  • year
  • month
  • week
  • day
  • hour
  • minute
max_doc_count
Service Class Support

No Uber Class Support
bodyintegerOnly return buckets if values are less than or equal to the value here.
min_doc_count
Service Class Support

No Uber Class Support
bodyintegerOnly return buckets if values are greater than or equal to the value here.
missing
Service Class Support

No Uber Class Support
bodystringMissing 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
Service Class Support

No Uber Class Support
bodystringName of the aggregate query, as chosen by the user. Used to identify the results returned to you.
q
Service Class Support

No Uber Class Support
bodystringFull text search across all metadata fields.
ranges
Service Class Support

No Uber Class Support
bodylist of dictionariesApplies 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
Service Class Support

No Uber Class Support
bodyintegerThe max number of term buckets to be returned.
sub_aggregates
Service Class Support

No Uber Class Support
bodylist of dictionariesA nested aggregation, such as:
[
  {
    "name": "max_first_behavior",
    "type": "max",
    "field": "first_behavior"
  }
]

There is a maximum of 3 nested aggregations per request.
sort
Service Class Support

No Uber Class Support
bodystringFQL syntax string to sort bucket results.
  • _count - sort by document count
  • _term - sort by the string value alphabetically
Supports asc and desc using | format.

Example: _count|desc
time_zone
Service Class Support

No Uber Class Support
bodystringTime zone for bucket results.
type
Service Class Support

No Uber Class Support
bodystringType of aggregation. Valid values include:
  • date_histogram - Aggregates counts on a specified time interval. Requires use of “interval” field.
  • date_range - Aggregates counts on custom defined date range buckets. Can include multiple ranges. (Similar to time series, but the bucket sizes are variable). Date formats to follow ISO 8601.
  • terms - Buckets alerts by the value of a specified field. For example, if field used is scenario, then alerts will be bucketed by the various alert scenario names.
  • range - Buckets alerts by specified (numeric) ranges of a specified field. For example, if doing a range aggregation on the max_severity field, the alerts will be counted by the specified ranges of severity.
  • cardinality - Returns the count of distinct values in a specified field.
  • max - Returns the maximum value of a specified field.
  • min - Returns the minimum value of a specified field.
  • avg - Returns the average value of the specified field.
  • sum - Returns the total sum of all values for the specified field.
  • percentiles - Returns the following percentiles for the specified field: 1, 5, 25, 50, 75, 95, 99.

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

MethodRoute
GET/ods/entities/malicious-files/v1

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
ids
Service Class Support

Uber Class Support
querystring or list of stringsMalicious file IDs to retrieve.
parameters
Service Class Support

Uber Class Support
querydictionaryFull 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

MethodRoute
POST/ods/entities/scan-control-actions/cancel/v1

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
ids
Service Class Support

Uber Class Support
querystring or list of stringsMalicious file IDs to retrieve.
parameters
Service Class Support

Uber Class Support
querydictionaryFull 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

MethodRoute
GET/ods/entities/scan-hosts/v1

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
ids
Service Class Support

Uber Class Support
querystring or list of stringsScan IDs to retrieve hosts for.
parameters
Service Class Support

Uber Class Support
querydictionaryFull 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

MethodRoute
GET/ods/entities/scans/v1

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
ids
Service Class Support

Uber Class Support
querystring or list of stringsScan IDs to retrieve.
parameters
Service Class Support

Uber Class Support
querydictionaryFull 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

MethodRoute
GET/ods/entities/scans/v2

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
ids
Service Class Support

Uber Class Support
querystring or list of stringsScan IDs to retrieve.
parameters
Service Class Support

Uber Class Support
querydictionaryFull 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

MethodRoute
POST/ods/entities/scans/v1

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
body
Service Class Support

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

Uber Class Support
bodyintegerML Detection level for the scan.
cloud_ml_level_prevention
Service Class Support

Uber Class Support
bodyintegerML Prevention level for the scan.
cpu_priority
Service Class Support

Uber Class Support
bodyintegerSet the scan CPU priority.
description
Service Class Support

Uber Class Support
bodystringScan description.
endpoint_notification
Service Class Support

Uber Class Support
bodybooleanFlag indicating if the endpoint should be notified of the results.
file_paths
Service Class Support

Uber Class Support
bodylist of stringsList of file paths to be scanned.
host_groups
Service Class Support

Uber Class Support
bodylist of stringsList of host groups to be scanned.
initiated_from
Service Class Support

Uber Class Support
bodystringScan origination.
max_duration
Service Class Support

Uber Class Support
bodyintegerMaximum time (in seconds) the scan is allowed to execute.
max_file_size
Service Class Support

Uber Class Support
bodyintegerMaximum file size (in bytes) to be scanned.
pause_duration
Service Class Support

Uber Class Support
bodyintegerAmount of time (in seconds) for scan pauses.
quarantine
Service Class Support

Uber Class Support
bodybooleanFlag indicating if identified threats should be quarantined.
scan_exclusions
Service Class Support

Uber Class Support
bodylist of stringsList of excuded files or locations for this scan.
sensor_ml_level_detection
Service Class Support

Uber Class Support
bodyintegerSensor ML detection level.
sensor_ml_level_prevention
Service Class Support

Uber Class Support
bodyintegerSensor 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

MethodRoute
GET/ods/entities/scheduled-scans/v1

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
ids
Service Class Support

Uber Class Support
querystring or list of stringsScan IDs to retrieve.
parameters
Service Class Support

Uber Class Support
querydictionaryFull 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

MethodRoute
POST/ods/entities/scheduled-scans/v1

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
body
Service Class Support

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

Uber Class Support
bodyintegerML Detection level for the scan.
cloud_ml_level_prevention
Service Class Support

Uber Class Support
bodyintegerML Prevention level for the scan.
cpu_priority
Service Class Support

Uber Class Support
bodyintegerSet the scan CPU priority.
description
Service Class Support

Uber Class Support
bodystringScan description.
endpoint_notification
Service Class Support

Uber Class Support
bodybooleanFlag indicating if the endpoint should be notified of the results.
file_paths
Service Class Support

Uber Class Support
bodylist of stringsList of file paths to be scanned.
host_groups
Service Class Support

Uber Class Support
bodylist of stringsList of host groups to be scanned.
initiated_from
Service Class Support

Uber Class Support
bodystringScan origination.
max_duration
Service Class Support

Uber Class Support
bodyintegerMaximum time (in seconds) the scan is allowed to execute.
max_file_size
Service Class Support

Uber Class Support
bodyintegerMaximum file size (in bytes) to be scanned.
pause_duration
Service Class Support

Uber Class Support
bodyintegerAmount of time (in seconds) for scan pauses.
quarantine
Service Class Support

Uber Class Support
bodybooleanFlag indicating if identified threats should be quarantined.
scan_exclusions
Service Class Support

Uber Class Support
bodylist of stringsList of excluded files or locations for this scan.
scan_inclusions
Service Class Support

Uber Class Support
bodylist of stringsList of included files or locations for this scan.
schedule
Service Class Support

Uber Class Support
bodydictionaryDictionary 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
Service Class Support

Uber Class Support
bodyintegerSensor ML detection level.
sensor_ml_level_prevention
Service Class Support

Uber Class Support
bodyintegerSensor 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

MethodRoute
DELETE/ods/entities/scheduled-scans/v1

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filter
Service Class Support

Uber Class Support
querystring or list of stringsFQL compatible filter to use for selecting scan IDs.
ids
Service Class Support

Uber Class Support
querystring or list of stringsScan IDs to delete.
parameters
Service Class Support

Uber Class Support
querydictionaryFull 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

MethodRoute
GET/ods/queries/malicious-files/v1

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filter
Service Class Support

Uber Class Support
querystringFQL Syntax formatted string used to limit the results.
Available filters:
  • id
  • cid
  • host_id
  • scan_id
  • host_scan_id
  • filepath
  • filename
  • hash
  • pattern_id
  • severity
  • quarantined
  • last_updated
limit
Service Class Support

Uber Class Support
queryintegerMaximum number of resources to return.
offset
Service Class Support

Uber Class Support
queryintegerStarting index of overall result set from which to return ids.
sort
Service Class Support

Uber Class Support
querystringThe property to sort by. (Ex: created_timestamp.desc)
parameters
Service Class Support

Uber Class Support
querydictionaryFull 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

MethodRoute
GET/ods/queries/scan-hosts/v1

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filter
Service Class Support

Uber Class Support
querystringFQL Syntax formatted string used to limit the results.
Available filters:
  • id
  • cid
  • profile_id
  • host_id
  • scan_id
  • host_scan_id
  • filecount.scanned
  • filecount.malicious
  • filecount.quarantined
  • filecount.skipped
  • affected_hosts_count
  • status
  • severity
  • started_on
  • completed_on
  • last_updated
limit
Service Class Support

Uber Class Support
queryintegerMaximum number of resources to return.
offset
Service Class Support

Uber Class Support
queryintegerStarting index of overall result set from which to return ids.
sort
Service Class Support

Uber Class Support
querystringThe property to sort by. (Ex: created_timestamp.desc)
parameters
Service Class Support

Uber Class Support
querydictionaryFull 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

MethodRoute
GET/ods/queries/scans/v1

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filter
Service Class Support

Uber Class Support
querystringFQL Syntax formatted string used to limit the results.
Available filters:
  • id
  • cid
  • profile_id
  • description.keyword
  • initiated_from
  • filecount.scanned
  • filecount.malicious
  • filecount.quarantined
  • filecount.skipped
  • affected_hosts_count
  • status
  • severity
  • scan_started_on
  • scan_completed_on
  • created_on
  • created_by
  • last_updated
limit
Service Class Support

Uber Class Support
queryintegerMaximum number of resources to return.
offset
Service Class Support

Uber Class Support
queryintegerStarting index of overall result set from which to return ids.
sort
Service Class Support

Uber Class Support
querystringThe property to sort by. (Ex: created_timestamp.desc)
parameters
Service Class Support

Uber Class Support
querydictionaryFull 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

MethodRoute
GET/ods/queries/scheduled-scans/v1

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filter
Service Class Support

Uber Class Support
querystringFQL Syntax formatted string used to limit the results.
Available filters:
  • id
  • cid
  • description
  • initiated_from
  • status
  • schedule.start_timestamp
  • schedule.Interval
  • created_on
  • created_by
  • last_updated
  • deleted
limit
Service Class Support

Uber Class Support
queryintegerMaximum number of resources to return.
offset
Service Class Support

Uber Class Support
queryintegerStarting index of overall result set from which to return ids.
sort
Service Class Support

Uber Class Support
querystringThe property to sort by. (Ex: created_timestamp.desc)
parameters
Service Class Support

Uber Class Support
querydictionaryFull 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