Archive file
This API allows users/developers to archive files in Kapsul. Before going to archive, you must be part of Kapsul's archival network called k-vault. Follow these instructions below going forward.
Request
POST: {base_url}/:networkID/files
networkID is a path parameter, where copied k-vault networkID need to be passed.
Headers
Learn how to pass authentication headers here.
Query Parameters
The API uses form-data for uploading files. Below are examples of how to structure the request when uploading a single file.
| Parameters | Type | Description |
|---|---|---|
files |
array of blobs | The file(s) to be uploaded |
fileName |
string | The absolute path of the file where the file will be stored. |
keepPrevious |
boolean | Set to true to keep the previous version of the file. |
createFolders |
boolean | Set to true to create directories if they don’t exist. |
encryptionType |
int | The encryption type for the file (see encryption types). |
Sample Request
curl --location '{{base_url}}/kapsul/v1/:networkID/files' \
--header 'Authorization: Bearer <DAT Token>' \
--form 'files=@"path_to_your_file"' \
--form 'fileName="path/filename.ext"' \
--form 'keepPrevious="true"' \
--form 'createFolders="true"' \
--form 'encryptionType="0"'