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.
|
Accepted answer
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
Comments
Donald Nong
commented Mar 27 '16, 9:07 p.m.
Basically, all Jazz products provide the same URI for the version information.
Jeff Ong
commented Mar 28 '16, 4:09 a.m.
Hi Joao/Donald,
Donald Nong
commented Mar 29 '16, 12:10 a.m.
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.
|
One other answer
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)
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. |
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.