Versioned Read (vread)
History & Versioning
Versioned Read (vread)
Read a specific version of a resource
GET
Versioned Read (vread)
Versioned Read (vread)
Retrieve a specific version of a resource by its version ID.The FHIR resource type (e.g.,
Patient, Observation, Encounter)The logical ID of the resource
The version ID of the resource
Endpoint
Example Request
Response
Success (200 OK)
Returns the resource at the specified version:Not Found (404)
Returns an error if the resource or version doesn’t exist:HEAD Request
UseHEAD to check if a specific version exists without retrieving its body:
200 OK if the version exists, 404 Not Found otherwise. No response body is returned.
Use Cases
Versioned read is useful for:- Audit Trail: Viewing what a resource looked like at a specific point in time
- Rollback: Comparing versions before reverting changes
- Compliance: Retrieving historical versions for regulatory requirements
- Debugging: Understanding how a resource changed over time
Getting Version IDs
You can get version IDs from:- Resource metadata: The
meta.versionIdfield in any resource - History endpoint: The
_historyendpoint lists all versions - ETag header: The
ETagheader in responses (format:W/"versionId")
Example Workflow
-
Read current version:
-
Read previous version:
- Compare versions to see what changed
Notes
- Version IDs are sequential integers starting from 1
- Version 1 is always the original creation
- Deleted resources can still be read by version ID
- Version IDs are immutable - they never change
- Use vread to access historical versions for audit or compliance purposes
Authorizations
Bearer token authentication
Path Parameters
The FHIR resource type (e.g., Patient, Observation, Encounter)
The logical ID of the resource
The version ID