Skip to content

Quarantine

The Quarantine service collection provides operations for managing quarantined files. Get quarantine file metadata and aggregates, update quarantine states by ID or query, and search for quarantine file IDs using FQL filters.

LanguageLast Update
Pythonv1.6.5
PowerShellv2.2.9
Gov0.22.0
TypeScriptv0.6.0
Rustv0.7.1
Rubyv1.4.0

This service collection has code examples posted to the repository.



OperationDescription
ActionUpdateCount
action_update_count
Returns count of potentially affected quarantined files for each action.
GetAggregateFiles
get_aggregate_files
Get quarantine file aggregates as specified via json in request body.
GetQuarantineFiles
get_quarantine_files
Get quarantine file metadata for specified ids.
QueryQuarantineFiles
query_quarantine_files
Get quarantine file ids that match the provided filter criteria.
UpdateQfByQuery
update_quarantined_detects_by_query
Apply quarantine file actions by query.
UpdateQuarantinedDetectsByIds
update_quarantined_detects_by_id
Apply action by quarantine file ids

Returns count of potentially affected quarantined files for each action.

Method GET
Route /quarantine/aggregates/action-update-count/v1
Scope Quarantined Files: READ
PEP 8 action_update_count
filter query · string
The filter expression that should be used to filter results. FQL syntax.
parameters query · dictionary
Full query string parameters payload in JSON format. Not required when using other keywords.
from falconpy import Quarantine
falcon = Quarantine(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.action_update_count(filter="string")
print(response)
[
{
"buckets": [],
"doc_count_error_upper_bound": 0,
"hits": {},
"name": "string",
"sum_other_doc_count": 0
}
]


Get quarantine file aggregates as specified via json in request body.

Method POST
Route /quarantine/aggregates/quarantined-files/GET/v1
Scope Quarantined Files: READ
PEP 8 get_aggregate_files
body body · dictionary
Full body payload as JSON formatted dictionary.
date_ranges body · array
If peforming a date range query specify the from and to date ranges. These can be in common date formats like 2019-07-18 or now.
exclude body · string
Fields to exclude.
extended_bounds body · object
field body · string
Term you want to aggregate on. If doing a date_range query, this is the date field you want to apply the date ranges to.
filter body · string
Optional filter criteria in the form of an FQL query. For more information about FQL queries, see our FQL documentation in Falcon.
filters_spec body · object
from body · integer
include body · string
Fields to include.
interval body · string
Available values (6)
yearmonthweek
dayhourminute
max_doc_count body · integer
Maximum number of documents.
min_doc_count body · integer
Minimum number of documents.
missing body · string
name body · string
Scan name.
percents body · array
q body · string
FQL syntax.
ranges body · array
size body · integer
sort body · string
FQL syntax.
Available values (2)
_count
sort by document count
_term
sort by the string value alphabetically
sub_aggregates body · array
time_zone body · string
type body · string
Available values (10)
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.
from falconpy import Quarantine
falcon = Quarantine(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
date_ranges = [
{
"from": "string",
"to": "string"
}
]
ranges = [
{
"From": 0,
"To": 0
}
]
response = falcon.get_aggregate_files(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=["string"],
time_zone="string",
type="string")
print(response)
[
{
"buckets": [],
"doc_count_error_upper_bound": 0,
"hits": {},
"name": "string",
"sum_other_doc_count": 0
}
]


Get quarantine file metadata for specified ids.

Method POST
Route /quarantine/entities/quarantined-files/GET/v1
Scope Quarantined Files: READ
PEP 8 get_quarantine_files
body body · dictionary
Full body payload as JSON formatted dictionary.
ids body · array
List of quarantine IDs to retrieve metadata for.
from falconpy import Quarantine
falcon = Quarantine(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_quarantine_files(ids=id_list)
print(response)
[
{
"aid": "string",
"alert_ids": [],
"cid": "string",
"date_created": "string",
"date_updated": "string",
"detect_ids": [],
"extracted": false,
"hostname": "string",
"id": "string",
"is_on_removable_disk": false,
"paths": [],
"primary_module": false,
"release_path_for_removable_media": "string",
"sandbox_report_id": "string",
"sandbox_report_state": "string",
"sha256": "string",
"state": "string",
"username": "string"
}
]


Get quarantine file ids that match the provided filter criteria.

Method GET
Route /quarantine/queries/quarantined-files/v1
Scope Quarantined Files: READ
PEP 8 query_quarantine_files
offset query · string
Starting index of overall result set from which to return ids.
limit query · integer
Number of ids to return.
sort query · string
Possible order by fields:
Available values (7)
hostnameusernamedate_updated
date_createdpaths.pathstate
paths.state
filter query · string
FQL query specifying the filter parameters. Special value * means to not filter on anything. Filter term criteria:
Available values (14)
statusadversary_iddevice.device_id
device.countrydevice.hostnamebehaviors.behavior_id
behaviors.ioc_typebehaviors.ioc_valuebehaviors.username
behaviors.tree_root_hashmax_severitymax_confidence
first_behaviorlast_behavior
q query · string
Match phrase_prefix query criteria; included fields: _all (all filter string fields), sha256, state, paths.path, paths.state, hostname, username, date_updated, date_created.
parameters query · dictionary
Full query string parameters payload in JSON format. Not required when using other keywords.
from falconpy import Quarantine
falcon = Quarantine(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
response = falcon.query_quarantine_files(filter="string",
q="string",
limit=integer,
offset="string",
sort="string")
print(response)
[
"string"
]


Apply quarantine file actions by query.

Method PATCH
Route /quarantine/queries/quarantined-files/v1
Scope Quarantined Files: WRITE
PEP 8 update_quarantined_detects_by_query
body body · dictionary
Full body payload as JSON formatted dictionary.
action body · string
Action to perform against the quarantined file. Allowed values:
Available values (3)
releaseunreleasedelete
comment body · string
Comment to list along with action taken.
filter body · string
q body · string
ids body · string or list of strings
List of quarantine IDs to perform an action on.
from falconpy import Quarantine
falcon = Quarantine(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.update_quarantined_detects_by_query(action="string",
comment="string",
ids=id_list)
print(response)
{
"errors": [
{
"code": 0,
"id": "string",
"message": "string"
}
],
"meta": {
"pagination": {
"limit": 0,
"offset": 0,
"total": 0
},
"powered_by": "string",
"query_time": 0.0,
"trace_id": "string",
"writes": {
"resources_affected": 0
}
}
}


Apply action by quarantine file ids

Method PATCH
Route /quarantine/entities/quarantined-files/v1
Scope Quarantined Files: WRITE
PEP 8 update_quarantined_detects_by_id
body body · dictionary
Full body payload as JSON formatted dictionary.
action body · string
Action to perform against the quarantined file. Allowed values:
Available values (3)
releaseunreleasedelete
comment body · string
Comment to list along with action taken.
ids body · array
List of quarantine IDs to perform an action on.
from falconpy import Quarantine
falcon = Quarantine(client_id=CLIENT_ID,
client_secret=CLIENT_SECRET
)
id_list = 'ID1,ID2,ID3' # Can also pass a list here: ['ID1', 'ID2', 'ID3']
response = falcon.update_quarantined_detects_by_id(action="string",
comment="string",
ids=id_list)
print(response)
{
"errors": [
{
"code": 0,
"id": "string",
"message": "string"
}
],
"meta": {
"pagination": {
"limit": 0,
"offset": 0,
"total": 0
},
"powered_by": "string",
"query_time": 0.0,
"trace_id": "string",
"writes": {
"resources_affected": 0
}
}
}