pi-hole/api

Version Endpoint

AzureMarker opened this issue · 0 comments

Provide the versions (and branches) of various Pi-hole components, including:

  • Core
  • Web
  • FTL
  • API

Possible format:

{
    "core": {
        "version": "v4.0",
        "branch": "master"
    },
    "web": {
        "version": "v1.0",
        "branch": "master"
    },
    "ftl": {
        "version": "v4.0",
        "branch": "master"
    },
    "api": {
        "version": "v1.0",
        "branch": "master"
    }
}

Pretty simple feature. Core at the moment is still based on git, so we will get the version from git. This is the way that the updatechecker.sh script currently gets the version:

git describe --long --dirty --tags

But there may be a more programmatic way to get this without running a raw git command.
Web's version will probably be encoded inside of the API, since web will be embedded inside of the production binary.
FTL can be gotten with the command >version sent through the FTL API socket.
And the way to get the API's own version is obvious.