CrowdStrike Falcon CrowdStrike Subreddit

Using the Container Alerts service collection

Uber class support Service class support Documentation Version Page Updated

Table of Contents

Operation IDDescription
ReadContainerAlertsCountBySeverity
PEP8read_counts_by_severity
Get Container Alert counts by severity.
ReadContainerAlertsCount
PEP8read_counts
Search Container Alerts by the provided search criteria.
SearchAndReadContainerAlerts
PEP8search_and_read
Search Container Alerts by the provided search criteria.

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.

ReadContainerAlertsCountBySeverity

Get Container Alert counts by severity.

PEP8 method name

read_counts_by_severity

Endpoint

MethodRoute
GET/container-security/aggregates/container-alerts/count-by-severity/v1

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filter
Service Class Support

Uber Class Support
querystringSearch Container Alerts using a query in Falcon Query Language (FQL). Supported filters: cid, container_id, last_seen
parametersService Class Support
Uber Class SupportquerydictionaryFull query string parameters payload in JSON format. Not required if using other keywords.

Usage

Service class example (PEP8 syntax)
from falconpy import ContainerAlerts

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

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

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

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

response = falcon.ReadContainerAlertsCountBySeverity(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("ReadContainerAlertsCountBySeverity", parameters=PARAMS)

print(response)

ReadContainerAlertsCount

Search Container Alerts by the provided search criteria

PEP8 method name

read_counts

Endpoint

MethodRoute
GET/container-security/aggregates/container-alerts/count/v1

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filter
Service Class Support

Uber Class Support
querystringSearch Container Alerts using a query in Falcon Query Language (FQL). Supported filters: cid,last_seen
parametersService Class Support
Uber Class SupportquerydictionaryFull query string parameters payload in JSON format. Not required if using other keywords.

Usage

Service class example (PEP8 syntax)
from falconpy import ContainerAlerts

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

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

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

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

response = falcon.ReadContainerAlertsCount(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("ReadContainerAlertsCount", parameters=PARAMS)

print(response)

SearchAndReadContainerAlerts

Search Container Alerts by the provided search criteria

PEP8 method name

search_and_read

Endpoint

MethodRoute
GET/container-security/combined/container-alerts/v1

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filter
Service Class Support

Uber Class Support
querystringSearch Container Alerts using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,last_seen,name,severity
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.
parametersService Class Support
Uber Class SupportquerydictionaryFull query string parameters payload in JSON format. Not required if using other keywords.
sort
Service Class Support

Uber Class Support
querystringThe fields to sort the records on.

Usage

Service class example (PEP8 syntax)
from falconpy import ContainerAlerts

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

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

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

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