How To
Summary
How to collect version information for Control Hub from CLI?
Objective
The need of collecting the version information may arise for Control Hub on-premises installations, following steps may guide you through the process
Steps
Version information can be collected using the RESTful API
Generate the auth token for Control Hub API
# login to Control Hub security app
curl -X POST -d '{"userName":"<DPMUserID>", "password": "<DPMUserPassword>"}' https://<CONTROLHUB_HOST>:<CONTROLHUB_PORT>/security/public-rest/v1/authentication/login --header "Content-Type:application/json" --header "X-Requested-By:SCH" -c cookie.txt
# generate auth token from security app
sessionToken=$(cat cookie.txt | grep SSO | rev | grep -o '^\S*' | rev)
echo "Generated session token : $sessionToken"
Running the REST API for version information
curl -X GET https://<CONTROLHUB_HOST>:<CONTROLHUB_PORT>/rest/v1/server/info --header "Content-Type:application/json" --header "X-Requested-By:SCH" --header "X-SS-REST-CALL:true" --header "X-SS-User-Auth-Token:$sessionToken" -i
Note: Change the following parameters as per the environment
<DPMUserID>:- Username for Control Hub<DPMUserPassword>:- Password of the User<CONTROLHUB_HOST>:- Hostname of the Control Hub<CONTROLHUB_PORT>:- Port number for Control Hub
Results
The sample output may look like following
{"info":{"version":"3.56.0","built.date":"2024-01-23T11:52:04+0000","build.number":"2","built.repo.sha":"569038015bec1e4f0dd0a4edff300979b7453fa5","http://built.by ":""},"buildNumber":"2","version":"3.56.0","builtBy":"","sourceMd5Checksum":"?","scalaBinaryVersion":"?","builtDate":"2024-01-23T11:52:04+0000","builtRepoSha":"569038015bec1e4f0dd0a4edff300979b7453fa5"}%
Document Location
Worldwide
Was this topic helpful?
Document Information
Modified date:
16 March 2025
UID
ibm17186337