File download

Aus Cryptshare Documentation
Wechseln zu:Navigation, Suche

Each transfer has a unique tracking-id that identifies one sender, recipient set and file set. However, in order to identify each recipient individually, for each recipient a transfer-id is assigned. Thus, for accessing a transfer as a recipient, the transfer-id is required.

In order to secure transfer related information, a password for accessing them is required as well.

This password can either be provided via the header X-CS-Password or via the query parameter password. The password has to be URL-encoded.

Download single file

With this endpoint a single file can be downloaded from the transfer. The file to download is identified by its file-id. The ids for each transfer can be requested via this endpoint.

GET https://<your-url>/api/transfers/<transfer-id>/files/<file-id>

Download all files as ZIP

With this endpoint all files of a transfer can be downloaded all at once in a zip file.

GET https://<your-url>/api/transfers/<transfer-id>/files/zip

The zip file can be customized with the following parameters:

Parameters
Parameter Default value Description
include-checksum-file false An extra file will be included in the zip file that contains all file names and the respective checksums.
customized-files-ids (empty list) A list of transfer file ids that should be explicitely included in the transfer or should be excluded from the transfer.

If the following parameter is not specified or if it is set to true, then the zip file will only contain the specified transfer files. Otherwise, it will contain all transfer files except the given transfer files.

is-customized-files-ids-include true Specifying this parameter will define if the transfer files that are referenced by the given customized-files-ids will be included or excluded from the generated zip file.
Minimum REST API Version
The parameters customized-files-ids and is-customized-files-ids-include require at least the Cryptshare REST API version 1.11.

Download all files as EML

With this endpoint all files of a transfer can be downloaded all at once in an eml file. This endpoint can only be used when a confidential message exists in the transfer.

By default, all transfer files are attached to the confidential message. If only limited space is available, the query parameter 'threshold' can be used. It defines a maximum size of the eml file in Megabytes. The order of the attached files is determined by a priorization list, see chapter Priorization.

GET https://<your-url>/api/transfers/<transfer-id>/files/eml

Download checksums of all transfer files

With this endpoint several information about the transfer files can be downloaded as a CSV file: The file names of the transfer files and their respective checksum algorithms. Additionally, it contains the subject of the notification message, if the Cryptshare server is configured to log notification subjects and messages.

By using the Accept-Language header, the language of the labels can be configured (Subject, File Name, and Checksum).

Here is an example for such checksums.csv file:

Subject My important transfer files
File Name Checksum
transferFile_1.txt 0a28b295a883e4122c36482e4b0ad2275bbd2ebd60d066dc6f9e7fe6922ad7f4 (SHA-256)
transferFile_2.txt 32d9c815c2c3cf989007b613d37844d919a1e7070b67a501150d760ac860505e (SHA-256)

GET https://<your-url>/api/transfers/<transfer-id>/checksums