How to get the Appium server version

I want to determine the Appium server version from within my tests but can’t seem to find a way to determine this. What’s the recommended way to find this, assuming its possible with the current implementation?

Make an HTTP GET request to your Appium server’s /wd/hub/status endpoint. If the server is running, you should receive a JSON response with build details about the server.

Example response from my Appium server (listening at localhost:4723, GET request sent to localhost:4723/wd/hub/status):

{"status": ​0,
 "value": {
    "build": 
        {
            "version": "1.5.1",
            "revision": "8150b4f3a64a9eb74d447552d3384aa192407eeb"
        }
    },
    "sessionId": null

}

Perfect…exactly what I was looking for. Thanks!