Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to query the version of CCM, QM and RM remotely

We have several instances of CCM, QM and RM and we would like to keep track of their versions.  Is there a way of querying their versions remotely.

0 votes


Accepted answer

Permanent link
You can see the version of RQM using the following URL in REST API:
https://jazz.net/sandbox02-qm/application-about

The XML has the node named jfs:version
Jeff Ong selected this answer as the correct answer

1 vote

Comments

Basically, all Jazz products provide the same URI for the version information.
https://<host>:<port>/<app-context-root>/application-about

Hi Joao/Donald,

Thanks that's what I've been looking for.  Now, I just have to figure out what to use to parse the REST API results.

Are these REST APIs documented somewhere ?  We would now like to find out what iFix is installed.

I'm not aware any documents specifically mentioning about the "application-about" resource. It is revealed in the root services document, which is the very first document you need to get if you want to use OSLC.
https://jazz.net/library/article/1001

But if you are trying to find out the iFix version, unfortunately it does not help, as it is "static". To find the iFix version, you may have to use the internal API. Simply click on the "About this Application" link in the Web GUI and monitor the network traffic (with Firebug or Chrome) and you will find it out.


One other answer

Permanent link
 One can also parse the RootServices XML that each Jazz application exposes at URLs like https://some.jazz.com:9443/rm/rootservices.

Therein, you can find snippets like:
	<oslc_rm:rmServiceProviders rdf:resource="https://some.jazz.com:9443/rm/oslc_rm/catalog" />
	<oslc_rm:majorVersion>6</oslc_rm:majorVersion>
	<oslc_rm:version>6.0.1.0</oslc_rm:version>
	<oslc_rm:buildVersion>6.0.1</oslc_rm:buildVersion>
If you want to parse the XML you get back in your HTTP GETs, use existing libraries for DOM and XPath. (Please don't write your own from scratch).

In Node.js, you can "npm install xpath;npm install xmldom" and then pick out what you want with Xpath queries. Here's the snippet from xpath.js' site for how to deal with namespaced content.
var xml = "<book xmlns:bookml='http://example.com/book'><bookml:title>Harry Potter</bookml:title></book>"
var doc = new dom().parseFromString(xml)
var select = xpath.useNamespaces({"bookml": "http://example.com/book"});

console.log(select('//bookml:title/text()', doc)[0].nodeValue);
You can do similar parsing in Java, C++, or etc using the Xerces or Saxon parsers.
You could pluck out the particular element value with a simple regex -- but if you are going to try to find more than one string in the XML reliably, then using a library for XML parsing and XPath querying will pay off in the long run.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,019
× 7,494
× 1,700

Question asked: Mar 26 '16, 3:29 a.m.

Question was seen: 4,214 times

Last updated: Jul 13 '16, 5:21 a.m.

Confirmation Cancel Confirm