What is the end point rest api for getting the jenkins version

what is the end point rest api for getting the jenkins version

1 Like

Check for the X-Jenkins response header. It returns the Jenkins version the instance uses.

1 Like

Hello @mahesh1 and welcome to this community :wave:

I have searched for quite some time for the answer using the API, but I failed. :person_shrugging:
I don’t know if the missing information is deliberate (for security reasons) or just an oversight. :thinking:
In the later case, feel free to raise an issue or file a PR. :+1:

In the meantime, here is a one-liner to retrieve the version in the HTTP headers, as mentioned by Alex:

 curl -sI http://localhost:8080 | grep -i 'X-Jenkins' | grep -v 'Session' | awk '{print $2}'

thanks for the reply but it didn’t work

yes definitely i will rise a PR

What doesn’t work about it? How did you check the header?

1 Like