Skip to main content

Upload files to a vault secret

POST 

/api/v1/EncryptedFile/Upload/:secretVaultId

Uploads one or more files in a multipart form and stores them encrypted in the vault secret. A file with the same name and content type as a file already in the secret replaces that file. When malware scanning is turned on in the encrypted file settings, each file is scanned before it is stored.

Permission required: Admin role (or the App role).

Caution: Uploading a file with the same name and content type as an existing file in the secret replaces that file's content immediately. Files are stored one at a time, so if a later file in the same request fails (for example the malware scan), earlier files in that request are already stored.

Request​

Responses​

The files were stored. The body is a summary with secretVaultId, description, fileCount, totalSize, uploadTime and details, a list with the id, name, contentType, size, checksum and timestamps of each file.