Download A File

This API call allows you to download the files stored in MetaDefender Vault.

The call should be made to vault_rest/file/{file_id} through a GET request. Please note that you need to obtain {file_id} in order to retrieve the file.

Title

Download a file

URL Path

vault_rest/file/{file_id}

Method

GET

HTTP header parameters

Name

Value

Required

Description

Example

Authorization

The authentication token of the caller

REQUIRED

This header should have the following format:
Bearer [token obtained from authenticate API]
Example: Bearer Cp01BwnXAIOLZXxn7yogjKqIZnZpQD

GET /vault_rest/file/296fb5f15041430fa9cbc96710d3b21d HTTP/1.1
Host: localhost:8000
Authorization: Bearer OrRnBd9J0AzTiUe4Xrevj6IUoHbdMs
skip_notify: 0

skip_notify

Skip sending download notification email (if configured)

OPTIONAL

Select to send optional email notification when downloading file (if configured).
Possible values: 0 (default) or 1

Method: GET

file_id

Id of the file you wish to download

REQUIRED

Request Error

400

Bad Request

Invalid HTTP request

401

Invalid parameter

One or more parameters are invalid

403

Forbidden

Authentication credentials incorrect

404

Not found

File was not found in the database

500

Internal Server Error

Server is temporarily unavailable

Example of a successful scan request

[Content Stream]

Descriptions of response

The complete content stream of the file.

Notification

Just as regular downloads via the Web UI, downloads initiated via REST will generate email notifications based on the settings defined in "Default Transfer Settings" (see image below). Any configured notifications can be disabled by setting the skip_notify header (see above).

Example of email notification

Hi
[%]InitialSenderName[%],
The following
transfer has been successfully downloaded:
Date:
[%]DateAndTime[%]
Subject:
[%]TransferSubject[%]
File:
[%]FileName[%]
[%]Signature[%]

images/download/attachments/27531727/image2018-2-27_15-11-26.png