RESTAPI: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. In order to get all transfer files together with a generated file that contains all file names and checksums, the query parameter include-checksum-file=true can be added to the request.

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

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