How to find the version of Java a Contrast agent is running on

  • Updated

Objective

Identify the version of Java which is running on servers instrumented by the Contrast agent.

Process

While this information is not readily available within the Contrast UI, it is available via the Contrast API.

The server properties API call returns this information in its serverProperties.language_version JSON property.

Contrast’s full RESTful API Documentation can be found here. On the left, users can navigate to “API”, then “Servers”, then browse the list of API paths to find /ng/{orgUuid}/servers/{serverId}/properties.

Example:

GET https://app.contrastsecurity.com/Contrast/api/ng/{orgUuid}/servers/{serverId}/properties
<auth headers omitted>

<response headers omitted>
{
"success": true,
"messages": [
"Server properties loaded successfully"
],
"serverProperties": {
"server_id": 16770,
"language_version": "1.8.0_281",
"app_server_version": "",
"custom": null,
"os_name": "Linux",
"cpu_architecture": null
}
}


Users who want to gather this information for all of their Contrast instrumented Java servers may submit a ticket for help with automating this information gathering.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request