How to check sonarqube version in rhel server using command

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
  • what are you trying to achieve
  • what have you tried so far to achieve this
    *command to find sonarqube version in server

Welcome :slight_smile:

use the web api api/server/version
see internal docs http(s)://yoursonarhost/web_api/api/server

Gilbert

I used- curl -ku acess token:password "http(s)://yoursonarhost/web_api/api/server"
but i am not getting proper response , i am getting info like sonar server is UP and all but not the server / sonarqube version .

The url .../web_api/api/server is the link to the internal web api docs that ships with Sonarqube
If you want to use the web api to get the response with the Sonarqube version you have to use
https://nameofyoursonarhost/api/server/version

Another way to get the version is to use the file name of
$SONARQUBE_HOME/lib/sonar-application-x.x.x.xxxxx.jar where x.x.x.xxxxx has the version

i.e. sonar-application-8.9.2.46101.jar or sonar-application-9.1.0.47736.jar

Yes i am using curl -ku accesstoken:pwd “https://(mysonarurl…).net/web_api/api/server/version”

but not getting response . Can anyone suggest plz .

means use
curl -ku accesstoken:pwd https://(mysonarurl…).net/api/server/version

use the browser to test

api_get_version

or alternatively use the filename of the application.jar

1 Like