How to access the Bonita Version?

Hello,

How can I access, in the JAVA API, the Bonita Version where the code is running?

I see this information is available in the PlatformAPI, but to get this object, it's mandatory to have a PlatformSession ( :-( )

In the MonitoringAPI, there are information on the JVM, but not Bonita itself.

And in the portal, Setting : you have it! I saw a REST API here, but the version is not in the return (it's seem the version in in the HTML only? Strange).

Any type? Any file on the server that I can open and read as a workaround (Hum, I can have a look in a file in <tomcat>/webapps/bonita/WEB-INF/lib/bonita-web-extensions-7.8.4.jar)

Any better idea?

1 Like

Hi Pierre-Yves,

The file named server/webapps/bonita/VERSION also contains the version.

For example, call this URL localhost:8080/bonita/VERSION and you'll get:
7.8.4
Bonitasoft © 2019

You just need the bonita application server to be started to access this information, you don't need to have a session.

I hope this helps? 

Hi Pierre-Yves,

can you give a bit more details on your use case? Why do you need to access Bonita version? Thx

Hello Dephine,

For a Custom page, I need to access this information in JAVA. 

The goal of this page will be to download a patch from a Patch Library server. So, the local server needs to know it's Bonita version to asks the Patch Library server all patches for its version, and only its version.

 

Excellent!

Good workaround.