Version
Base: /api/version
Here you find out which Hytale version the server is running. This helps if you have mods or tools that only fit certain versions, if you label a status page with the version, or if your panel should check after a Hytale update whether the server has already switched. The endpoint returns the version, the build revision, the patchline and the protocol version. It changes nothing on the server and only needs the X-Admin-Token header.
Handler: VersionHandler
GET
/api/version
Get version
Returns version (the version number of the server), revision (build identifier), patchline (release branch) as well as protocolVersion and protocolBuild of the network protocol.
Response Example
{
"version": "0.7.0",
"revision": "648ebf375a034beabf119d7d790cd11d4f665ff4",
"patchline": "release",
"protocolVersion": 3,
"protocolBuild": 258
}
cURL
curl -X GET 'http://localhost:5550/api/version' \
-H 'X-Admin-Token: YOUR_TOKEN'
The fields version, revision and patchline are read one by one. If the server cannot deliver one of them, that field is null and the rest of the response stays valid, so check for null before you process the values. If reading the protocol information fails, protocolVersion and protocolBuild are missing entirely. Unlike the other endpoints, this one answers methods other than GET with 404 instead of 405. A missing or wrong token gives 403 as everywhere. Typical use: call the endpoint once after every restart and compare version and protocolVersion with the last known state. If one of the values changes, the server has received an update, and you can check mods, scripts or an announcement in Discord. The status endpoint also returns version, but without revision, patchline and protocol.
Internal Behavior
Reads the data from the manifest of the server file and the protocol settings of Hytale, without touching worlds. The value only changes after a server update, so you can safely cache the response, for example until the next restart.