Get Version
Version History
Get Version
Retrieve a specific version of a document
GET
Get Version
Retrieves the complete document data for a specific version number. The system reconstructs the document state as it existed at that version.
When retrieving a diff-mode version, the system:
Endpoint
Path Parameters
The name of the collection containing the document
The unique identifier of the document
The version number to retrieve (must be >= 1)
Authentication
Requires valid authentication. The user must haveread permission on the collection and access to the specific document.
Response
Returns the document data at the specified version along with metadata.Example Request
Example Response
Version Reconstruction
The system uses two storage modes to efficiently manage versions:Full Mode
Stores a complete snapshot of the document. Version 1 is always stored in full mode to serve as the base version.Diff Mode
Stores only the changes from the previous version. This reduces storage space for large documents with small changes.- Starts with the base version (version 1)
- Applies all changes sequentially up to the requested version
- Returns the reconstructed document state
Field Operations
The diff mode supports two operations:set: Field was added or modifiedunset: Field was removed
address.city).
Error Responses
Bad Request - Invalid parameters
Unauthorized - Authentication required
Forbidden - Insufficient permissions
Not Found - Collection, document, or version not found
Internal Server Error - Failed to reconstruct version data
Not Implemented - Versioning is not enabled
Notes
- Field-level policies apply to the returned data
- Masked fields (e.g., email, phone) are masked according to user permissions
- Denied fields are automatically removed from the response
- The
_versionfield is automatically added to the data object - The document reflects the state at the time the version was created