How to get the current version of Teamcity from the command line? (Linux, native)


I'd like to see what version of Teamcity-server we're running. (Linux, native install) - as part of our inventory version systems.

With similar programs I've been able to get this from a command --version, or from the service file, or from a config file (in the case of Youtrack), but I'm really struggling to extract it from Teamcity. 

Grepping for the current version, "2021.1.4" through all of the teamcity server and data partitions only show it appearing in logs, and parsing those seems like a very poor way to get this info. 

Does anyone know a way?

1 comment

(Answering own post to help any others after some help from Jetbrains' support)

The REST api offers this functionality:

# curl http://localhost:8111/app/rest/server/version
2021.1.4 (build 92954)


Please sign in to leave a comment.