Download a File

Endpoint URL: https://<your server>/rest/fetchfile/getfiles/:batchId
Endpoint URI: fetchfile/getfiles/:batchId

Action: GET

Downloads the actual file to your machine. You must also send a request to:

  1. Start the file download. For details on this request, see Start a File Download Operation.

  2. Get the operation batch number for the file download. For details on this request, see Get a Download Batch Number.

Note

Before running this request, ensure that you have logged into the Cybereason platform. For details, see Log in with the API.

Note

This request performs a live file download operation and will only successfully work on currently online machines.

Request Headers

You must add an Content-Type:application/json header with the request.

Note

If you are using cURL, add the authorization cookie details or the path to the file with cookie details with every request.


Request Body

None


Request Parameters

URL/URI parameters: none

Request Body Parameters: none


Response Status Codes

This request can return the following status codes:

  • 200: Success OK


Response Success Schema

The response can contain any of the following fields:

Field

Type

Description

data

Boolean

Indicates whether there is a response.

status

Enum

The status of the file download start operation. Possible values include:

  • PARTIAL_SUCCESS

  • NO_SERVERS_CONFIGURED

  • QUERY_LIMIT_CROSSED

  • FAILURE

  • TIMEOUT_ERROR

message

String

The message received from the server about this operation.


Response Failure Schema

None


Important Response Fields

Important information is found in these fields:

  • status parameter: This field shows whether the download operation succeeded.


Example: Download a file

Request

curl --request GET \
    --url https://12.34.56.78/rest/fetchfile/getfiles/1638177597 \
    --header 'Content-Type:application/json' \

Response

File downloads as binary code - save the file using your REST API client