Using the Sensor Usage service collection
Table of Contents
| Operation ID | Description | ||||
|---|---|---|---|---|---|
| Fetches weekly average. Each data point represents the average of how many unique AIDs were seen per week for the previous 28 days. | ||||
Passing credentials
WARNING
client_idandclient_secretare 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.
GetSensorUsageWeekly
Fetches weekly average. Each data point represents the average of how many unique AIDs were seen per week for the previous 28 days.
PEP8 method name
get_weekly_usage
Endpoint
| Method | Route |
|---|---|
/billing-dashboards-usage/aggregates/weekly-average/v1 |
Required Scope
Content-Type
- Consumes: application/json
- Produces: application/json
Keyword Arguments
| Name | Service | Uber | Type | Data type | Description |
|---|---|---|---|---|---|
| filter | query | string | The FQL search filter. | ||
| parameters | query | dictionary | Full query string parameters payload in JSON format. Not required if using other keywords. |
Allowed filters
| Filter | Description |
|---|---|
event_date | A specified date that will be final date of the results returned. Specified date cannot be after the default. Format: 2024-06-11, Default: the current date, minus 2 days, in UTC |
period | An integer surrounded by single quotes representing the number of days to return. Format: 30, Default: 28, Minimum: 1, Maximum: 395 |
selected_cids | A comma delimited list of CIDs to return data for. Caller must be a parent CID or have special access enabled. Format: cid_1,cid_2,cid_3, Default: for parent CIDs the default is the parent and all children, otherwise the current CID |
Usage
Service class example (PEP8 syntax)
from falconpy import SensorUsage
falcon = SensorUsage(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.GetSensorUsageWeekly(filter="string")
print(response)
Service class example (Operation ID syntax)
from falconpy import SensorUsage
falcon = SensorUsage(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.GetSensorUsageWeekly(filter="string")
print(response)
Uber class example
from falconpy import APIHarness
falcon = APIHarness(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.command("GetSensorUsageWeekly", filter="string")
print(response)