You can retrieve the version of Preview Server, along with additional information (for example, build number, git commit ref, etc.), by sending a GET request to <hostname>:<port>/version.

An example is shown below using PowerShell:

(Invoke-WebRequest http://localhost:21098/version).Content

This returns a JSON object:

{
"version": "5.0.0",
"commit_ref": "1d3a7fc25aa1e1f2d4daa350878ba0a862ec0764",
"build_date": "21/03/2025",
"build_time": "11:38:10 (UTC)",
"build_number": "3324"
}