Skip to main content

Endpoints

All four require the file to be visible to the caller’s company and permissions.

List versions

The response is nested: the controller wraps a service result, which itself has status, message, and data.
Read data.data for the array. Each version includes: The current live object is synthesized into the list because it has no separate version row. Use its versionId, not the synthetic id, when calling version endpoints.
A missing file does not produce an HTTP 404 here. The controller returns HTTP 200 with data.status: 404 and an empty array. Check the inner status on list responses.

Download a version

This is a binary stream with the same headers as a current-file download. Use it for audit and recovery, not for routine reads. If the key envelope or user keys are incomplete, the request fails with a decryption error. That is a state problem, not a transient failure.

Restore a version

Optional body:
The request restores the selected version as the current object. Restoration promotes the version’s stored encrypted content as it is; the platform does not decrypt or re-encrypt during a restore, and each version carries its own key envelope. Restrictions:
  • restoring the already-current version returns an inner 400,
  • a missing file or version returns an inner 404,
  • an incomplete key envelope returns an inner 400,
  • permission failures throw normal HTTP errors.
Like the list, the service result is nested. A successful response has an inner 200 and a message such as “Version restored”.

Delete a version

Deleting a version permanently removes that archived object. It cannot delete the current live version: that returns an inner 400 with the instruction to delete the file instead. A missing file or version returns an inner 404. Permission and ownership checks can throw normal HTTP errors.
Version deletion is permanent and is not the same as deleting a file. Deleting the current content belongs to the file delete flow.

Version limits

The number of versions retained depends on the plan. maxVersions reports the cap when available. When a new version exceeds the cap, the platform retires older versions according to its retention policy. Do not assume that every upload keeps an eternal history. If you need immutable long-term copies, use retention or store an independent copy.
  1. Recovery UI — list versions, show timestamps and sizes, and require confirmation before restore.
  2. Audit — download the specific version and store its hash alongside the audit record.
  3. Cleanup — never delete the current version through the version endpoint; use the file delete endpoints.
  4. Error handling — decode the nested data.status before treating a response as a failure or success.

Example: decode the nested result