Skip to content

CAO Hunting

The CAO Hunting service collection provides operations for accessing intelligence queries and hunting guides. Aggregate intelligence queries or hunting guides, create archive exports, retrieve entities by ID, and search for matching records using FQL filters.

LanguageLast Update
Pythonv1.5.5
PowerShellv2.2.9
Gov0.20.0
TypeScriptv0.6.0
Rustv0.7.0
Rubyv1.2.0
OperationDescription
AggregateHuntingGuides
aggregate_guides
Aggregate Hunting Guides
AggregateIntelligenceQueries
aggregate_queries
Aggregate intelligence queries.
GetArchiveExport
create_export_archive
Creates an Archive Export.
GetHuntingGuides
get_guides
Retrieves a list of Hunting Guides
GetIntelligenceQueries
get_queries
Retrieves a list of Intelligence queries.
SearchHuntingGuides
search_guides
Search for Hunting Guides that match the provided conditions
SearchIntelligenceQueries
search_queries
Search intelligence queries that match the provided conditions.

Aggregate intelligence queries.

POST /hunting/aggregates/intelligence-queries/v1
Scope CAO Hunting: READ Consumes · Produces application/json
PEP 8 aggregate_queries
NameTypeData typeDescription
bodybodydictionaryFull body payload as a dictionary. Not required when using other keywords.
date_rangesbodylist 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”}]
excludebodystringElements to exclude.
extended_boundsbodydictionaryExtended aggregate boundaries. Contains max and min values as strings. Example: {“max”: “string”,“min”: “string”}
fieldbodystringThe field on which to compute the aggregation.
filterbodystringFQL syntax formatted string to use to filter the results.
frombodyintegerStarting position.
includebodystringElements to include.
intervalbodystringTime interval for date histogram aggregations. Valid values include: year, month, week, day, hour, minute
max_doc_countbodyintegerOnly return buckets if values are less than or equal to the value here.
min_doc_countbodyintegerOnly return buckets if values are greater than or equal to the value here.
missingbodystringMissing 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.
namebodystringName of the aggregate query, as chosen by the user. Used to identify the results returned to you.
qbodystringFull text search across all metadata fields.
rangesbodylist 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}]
sizebodyintegerThe max number of term buckets to be returned.
sub_aggregatesbodylist 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.
sortbodystringFQL 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_zonebodystringTime zone for bucket results.
typebodystringType of aggregation. Valid values include: date_histogram, date_range, terms, range, cardinality, max, min, avg, sum, percentiles
from falconpy import CAOHunting
falcon = CAOHunting(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.aggregate_queries(date_ranges="string",
exclude="string",
extended_bounds={},
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=[{"key": "value"}],
size=integer,
sort="string",
sub_aggregates=["string"],
time_zone="string",
type="string")
print(response)

Creates an Archive Export.

GET /hunting/entities/archive-exports/v1
Scope CAO Hunting: READ Produces application/octet-stream
PEP 8 create_export_archive
NameTypeData typeDescription
archive_typequerystringThe Archive Type can be one of ‘zip’ and ‘gzip’. Defaults to ‘zip’.
filterquerystringThe FQL Filter.
languagequerystringThe Query Language. Accepted Values: cql, snort, suricata, yara, SPL AI translated (Beta), all returns a single archive with queries in all the languages
parametersquerydictionaryFull query string parameters payload in JSON format. Not required when using other keywords.
from falconpy import CAOHunting
falcon = CAOHunting(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
with open("output_file", "wb") as save_file:
response = falcon.create_export_archive(archive_type="string",
filter="string",
language="string",
stream=boolean)
save_file.write(response)

Retrieves a list of Intelligence queries.

GET /hunting/entities/intelligence-queries/v1
Scope CAO Hunting: READ Consumes · Produces application/json
PEP 8 get_queries
NameTypeData typeDescription
idsquerystring or list of stringsIntelligence queries IDs.
include_translated_contentquerystring or list of stringsThe AI translated language that should be returned if it exists. Accepted values are: SPL, all.
parametersquerydictionaryFull query string parameters payload in JSON format. Not required when using other keywords.
from falconpy import CAOHunting
falcon = CAOHunting(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_queries(ids=id_list, include_translated_content="string")
print(response)

Search intelligence queries that match the provided conditions.

GET /hunting/queries/intelligence-queries/v1
Scope CAO Hunting: READ Consumes · Produces application/json
PEP 8 search_queries
NameTypeData typeDescription
filterquerystringFQL query specifying the filter parameters.
limitqueryintegerNumber of IDs to return.
offsetquerystringStarting index of result set from which to return IDs.
parametersquerydictionaryFull query string parameters payload in JSON format. Not required when using other keywords.
qquerystringMatch phrase_prefix query criteria; included fields: _all (all filter string fields indexed).
sortquerystringOrder by fields.
from falconpy import CAOHunting
falcon = CAOHunting(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.search_queries(filter="string",
limit=integer,
sort="string",
offset="string",
q="string")
print(response)

Aggregate Hunting Guides

POST /hunting/aggregates/hunting-guides/v1
Scope CAO Hunting: READ Consumes · Produces application/json
PEP 8 aggregate_guides
NameTypeData typeDescription
bodybodylist of dictionariesFull body payload as a list of dictionaries. Not required when using other keywords.
date_rangesbodylist 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”}]
excludebodystringElements to exclude.
extended_boundsbodydictionaryExtended aggregate boundaries. Contains max and min values as strings. Example: {“max”: “string”,“min”: “string”}
fieldbodystringThe field on which to compute the aggregation.
filterbodystringFQL syntax formatted string to use to filter the results.
filters_specbodydictionaryFilters specification containing filters, other_bucket, and other_bucket_key. Example: {“filters”: {“additionalProp1”: “string”,“additionalProp2”: “string”},“other_bucket”: boolean,“other_bucket_key”: “string”}
frombodyintegerStarting position.
includebodystringElements to include.
intervalbodystringTime interval for date histogram aggregations. Valid values include: year, month, week, day, hour, minute
max_doc_countbodyintegerOnly return buckets if values are less than or equal to the value here.
min_doc_countbodyintegerOnly return buckets if values are greater than or equal to the value here.
missingbodystringMissing 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.
namebodystringName of the aggregate query, as chosen by the user. Used to identify the results returned to you.
percentsbodylist of integersPercentile values for percentile aggregations.
qbodystringFull text search across all metadata fields.
rangesbodylist 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}]
sizebodyintegerThe max number of term buckets to be returned.
sortbodystringFQL 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
sub_aggregatesbodylist 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.
time_zonebodystringTime zone for bucket results.
typebodystringType of aggregation. Valid values include: date_histogram, date_range, terms, cardinality, max, min, avg, sum, percentiles
from falconpy import CAOHunting
falcon = CAOHunting(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
date_ranges = [
{
"from": "string",
"to": "string"
}
]
extended_bounds = {
"max": "string",
"min": "string"
}
filters_spec = {
"filters": {},
"other_bucket": boolean,
"other_bucket_key": "string"
}
ranges = [
{
"from": integer,
"to": integer
}
]
sub_aggregates = [
{
"date_ranges": [
{
"from": "string",
"to": "string"
}
],
"exclude": "string",
"extended_bounds": {
"max": "string",
"min": "string"
},
"field": "string",
"filter": "string",
"filters_spec": {
"filters": {},
"other_bucket": boolean,
"other_bucket_key": "string"
},
"from": integer,
"include": "string",
"interval": "string",
"max_doc_count": integer,
"min_doc_count": integer,
"missing": "string",
"name": "string",
"percents": ["string"],
"q": "string",
"ranges": [
{
"from": integer,
"to": integer
}
],
"size": integer,
"sort": "string",
"sub_aggregates": [
{
"date_ranges": ["string"],
"exclude": "string",
"extended_bounds": {},
"field": "string",
"filter": "string",
"filters_spec": {},
"from": integer,
"include": "string",
"interval": "string",
"max_doc_count": integer,
"min_doc_count": integer,
"missing": "string",
"name": "string",
"percents": ["string"],
"q": "string",
"ranges": ["string"],
"size": integer,
"sort": "string",
"sub_aggregates": ["string"],
"time_zone": "string",
"type": "string"
}
],
"time_zone": "string",
"type": "string"
}
]
response = falcon.aggregate_guides(date_ranges=date_ranges,
exclude="string",
extended_bounds=extended_bounds,
field="string",
filter="string",
filters_spec=filters_spec,
from=integer,
include="string",
interval="string",
max_doc_count=integer,
min_doc_count=integer,
missing="string",
name="string",
percents=["string"],
q="string",
ranges=ranges,
size=integer,
sort="string",
sub_aggregates=sub_aggregates,
time_zone="string",
type="string")
print(response)

Retrieves a list of Hunting Guides

GET /hunting/entities/hunting-guides/v1
Scope CAO Hunting: READ Consumes · Produces application/json
PEP 8 get_guides
NameTypeData typeDescription
idsquerystring or list of stringsHunting Guides IDs. Required parameter.
parametersquerydictionaryFull query string parameters payload in JSON format. Not required when using other keywords.
from falconpy import CAOHunting
falcon = CAOHunting(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_guides(ids=id_list)
print(response)

Search for Hunting Guides that match the provided conditions

GET /hunting/queries/hunting-guides/v1
Scope CAO Hunting: READ Consumes · Produces application/json
PEP 8 search_guides
NameTypeData typeDescription
filterquerystringFQL query specifying the filter parameters.
limitqueryintegerNumber of IDs to return.
offsetquerystringStarting index of result set from which to return IDs.
parametersquerydictionaryFull query string parameters payload in JSON format. Not required when using other keywords.
sortquerystringOrder by fields.
qquerystringMatch phrase_prefix query criteria; included fields: _all (all filter string fields indexed).
from falconpy import CAOHunting
falcon = CAOHunting(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.search_guides(offset=integer,
limit=integer,
sort="string",
filter="string",
q="string")
print(response)