CrowdStrike Falcon CrowdStrike Subreddit

Using the Drift Indicators service collection

Uber class support Service class support Documentation Version Page Updated

Table of Contents

Operation IDDescription
GetDriftIndicatorsValuesByDate
PEP8get_drift_indicators_by_date
Returns the count of Drift Indicators by the date. by default it's for 7 days.
ReadDriftIndicatorsCount
PEP8read_drift_indicator_counts
Returns the total count of Drift indicators over a time period
SearchAndReadDriftIndicatorEntities
PEP8search_and_read_drift_indicators
Retrieve Drift Indicators by the provided search criteria
ReadDriftIndicatorEntities
PEP8read_drift_indicator_entities
Retrieve Drift Indicator entities identified by the provided IDs
SearchDriftIndicators
PEP8search_drift_indicators
Retrieve all drift indicators that match the given query

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.

GetDriftIndicatorsValuesByDate

Returns the count of Drift Indicators by the date. by default it's for 7 days.

PEP8 method name

get_drift_indicators_by_date

Endpoint

MethodRoute
GET/container-security/aggregates/drift-indicators/count-by-date/v1

Required Scope

drift-indicators:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filter
Service Class Support

Uber Class Support
querystringFilter drift indicators using a query in Falcon Query Language (FQL). Supported filters: cid,cloud_name,command_line,container_id,file_name,file_sha256,host_id,indicator_process_id,namespace,occurred_at,parent_process_id,pod_name,prevented,scheduler_name,severity,worker_node_name
limit
Service Class Support

Uber Class Support
queryintegerThe upper-bound on the number of records 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 DriftIndicators

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

response = falcon.get_drift_indicators_by_date(filter="string", limit=integer)

print(response)
Service class example (Operation ID syntax)
from falconpy import DriftIndicators

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

response = falcon.GetDriftIndicatorsValuesByDate(filter="string", limit=integer)

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("GetDriftIndicatorsValuesByDate",
                          filter="string",
                          limit="string
                          )
print(response)

ReadDriftIndicatorsCount

Returns the total count of Drift indicators over a time period

PEP8 method name

read_drift_indicator_counts

Endpoint

MethodRoute
GET/container-security/aggregates/drift-indicators/count/v1

Required Scope

drift-indicators:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filter
Service Class Support

Uber Class Support
querystringFilter images using a query in Falcon Query Language (FQL). Supported filters: cid,cloud_name,command_line,container_id,file_name,file_sha256,host_id,indicator_process_id,namespace,occurred_at,parent_process_id,pod_name,prevented,scheduler_name,severity,worker_node_name
parameters
Service Class Support

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

Usage

Service class example (PEP8 syntax)
from falconpy import DriftIndicators

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

response = falcon.read_drift_indicator_counts(filter="string")

print(response)
Service class example (Operation ID syntax)
from falconpy import DriftIndicators

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

response = falcon.ReadDriftIndicatorsCount(filter="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("ReadDriftIndicatorsCount", filter="string")

print(response)

SearchAndReadDriftIndicatorEntities

Retrieve Drift Indicators by the provided search criteria

PEP8 method name

search_and_read_drift_indicators

Endpoint

MethodRoute
GET/container-security/combined/drift-indicators/v1

Required Scope

drift-indicators:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filter
Service Class Support

Uber Class Support
querystringFilter Drift Indicators using a query in Falcon Query Language (FQL). Supported filters: cid, cloud_name, command_line, container_id, file_name, file_sha256, host_id, indicator_process_id, namespace, occurred_at, parent_process_id, pod_name, prevented, scheduler_name, severity, worker_node_name
limit
Service Class Support

Uber Class Support
queryintegerThe upper-bound on the number of records to retrieve.
offset
Service Class Support

Uber Class Support
queryintegerThe offset from where to begin.
parameters
Service Class Support

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

Uber Class Support
querystringThe fields to sort the records on.

Usage

Service class example (PEP8 syntax)
from falconpy import DriftIndicators

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

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

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

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

ReadDriftIndicatorEntities

Retrieve Drift Indicator entities identified by the provided IDs

PEP8 method name

read_drift_indicators_entities

Endpoint

MethodRoute
GET/container-security/entities/drift-indicators/v1

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
ids
Service Class Support

Uber Class Support
queryarray (string)Search Drift Indicators by ids - The maximum amount is 100 IDs
parameters
Service Class Support

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

Usage

Service class example (PEP8 syntax)
from falconpy import DriftIndicators

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

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

response = falcon.read_drift_indicators(ids=id_list)

print(response)
Service class example (Operation ID syntax)
from falconpy import DriftIndicators

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

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

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

print(response)

SearchDriftIndicators

Retrieve all drift indicators that match the given query

PEP8 method name

search_drift_indicators

Endpoint

MethodRoute
GET/container-security/queries/drift-indicators/v1

Required Scope

drift-indicators:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filter
Service Class Support

Uber Class Support
querystringFilter Drift Indicators using a query in Falcon Query Language (FQL). Supported filters: cid, cloud_name, command_line, container_id, file_name, file_sha256, host_id, indicator_process_id, namespace, occurred_at, parent_process_id, pod_name, prevented, scheduler_name, severity, worker_node_name
limit
Service Class Support

Uber Class Support
queryintegerThe upper-bound on the number of records to retrieve.
offset
Service Class Support

Uber Class Support
queryintegerThe offset from where to begin.
parameters
Service Class Support

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

Uber Class Support
querystringThe fields to sort the records on.

Usage

Service class example (PEP8 syntax)
from falconpy import DriftIndicators

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

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

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

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