Quarantine Files

Quarantine a file on endpoints.

Synopsis

URI
/public_api/v1/endpoints/quarantine/
HTTP Method
POST
Required License
Cortex XDR Prevent or Cortex XDR Pro per Endpoint

Description

Quarantine file on selected endpoints. You can select up to 1000 endpoints.
A success response means that the request reached the defined endpoints, however if the file was not found there, no quarantine action will take place. To ensure if the file has been quarantined, check the
Cortex XDR app
>
Action Center
.
When filtering by multiple fields:
  • Response is concatenated using AND condition (OR is not supported).
  • Maximum result set size is 1000.
  • Offset is the zero-based number of incidents from the start of the result set.

Request Fields

The body of this request contains a JSON object with the following fields:
Field
Description
request_data
(
Required
) A dictionary containing the API request fields.
filters
(
Required
) Provides an array of filtered fields. Each JSON object must contain the following keywords:
  • field
    String that identifies a list the filters match. Filters are based on the following keywords:
    • endpoint_id_list
      —List of endpoint IDs.
  • operator
    String that identifies the comparison operator you want to use for this filter. Valid keywords and values are:
    in
    • endpoint_id_list
      —List of strings
  • value
    Value that this filter must match. Valid keywords:
    • endpoint_id_list
      —List of strings
file_path
(
Required
) String that represents the path of the file you want to quarantine. You must enter a proper path and not symbolic links.
file_hash
(
Required
) String that represents the file’s hash. Hash must be a valid SHA256.
incident_id
String representing the incident ID.
When included in the request, the Quarentine File action will appear in the Cortex XDR Incident View Timeline tab.
Request Example
curl -X POST https://api-{fqdn}/public_api/v1/endpoints/quarantine/ \ -H "x-xdr-auth-id:{API_KEY_ID}" \ -H "Authorization:{API_KEY}" \ -H "Content-Type:application/json" \ -d '{ "request_data":{ "filters":[ { "field":"endpoint_id_list", "operator":"in", "value":[ "<endpoint ID>" ] } ], "file_path":"C:\\<file path>\\test_x64.msi", "file_hash":"<hash value>" } }'
Code copied to clipboard
Unable to copy due to lack of browser support.

Success Response

Upon success, the HTTP response code is 200.
Field
Description
reply
JSON object containing the query result.
action_id
ID of action to quarantine selected endpoints.
Response only indicates the request was successfully sent to the endpoint. To track if the file quarantine succeeded either:
  • In Cortex XDR console, navigate to
    Response
    Action Center
    and search for the action ID. Make sure the
    Action ID
    field is selected in the table
    Layout
    settings by selecting ( ).
  • Send a Get Action Status request.
status
Integer representing whether the action:
  • 1
    —succeeded
  • 0
    —failed
endpoints_count
Number of endpoints included in the request.
Success Response Example
{ "reply": { "action_id":"[ID value]", "status": "1", "endpoints_count": "673" } }
Code copied to clipboard
Unable to copy due to lack of browser support.

Error Response

Upon error, the reply includes an HTTP response code, an error message, and additional information describing the error. The HTTP response code is one of the following:
Field
Description
400
Bad Request. Got an invalid JSON.
401
Unauthorized access. An issue occurred during authentication. This can indicate an incorrect key, id, or other invalid authentication parameters.
402
Unauthorized access. User does not have the required license type to run this API.
403
Forbidden access. The provided API Key does not have the required RBAC permissions to run this API.
500
Internal server error. A unified status for API communication type errors.
Error Response Format
{"reply": {"err_code": STATUS_CODE, "err_msg": GENERAL_MESSAGE, "err_extra": EXTRA_DATA}}
Code copied to clipboard
Unable to copy due to lack of browser support.

Recommended For You