Documents

Immutable versions

Tie every content-sensitive feature to the exact version it concerns.

The version rule

A change to the content creates a new version. Existing versions never change, so links, annotations, form submissions, analytics and workflow decisions always point at the exact content they concerned.

What to record

  • Keep the input and output version IDs apart.
  • Record the operation (inputVersionId and outputVersionId) or upload that produced each version.
  • Keep the checksum, content type and size from GET /api/v2/documents/{documentId}/versions/{versionId}.
  • Use public IDs in your records and API paths.

What happens when a new version arrives

FeatureDefault behaviour
Secure linkKeeps serving its version until you move it to another one
Viewer sessionStays on its version
AnnotationStays where it was until a move is proposed and reviewed
FormKeeps the version its definition and submissions belong to
AnalyticsAttribute events to the version that was shown
Workflow runKeeps the input version it started with

Do not rewrite history

  • Do not move old links to a new version without a deliberate action.
  • Do not move resolved annotations automatically.
  • Do not combine analytics from different versions unless your report says so.
  • Do not treat an approval of one version as covering a later one.