It's all about the answers!

Ask a question

REST query for the components in a stream and one for the baselines in a component


Richard Good (57427) | asked Mar 08 '16, 10:43 a.m.

Hello,

I'm using RTC 5.0.2, and am looking for an RTC REST query to list the components in a particular stream, then the baselines in the component. I imagined the SCM schema would be the right one, but doesn't look like it. Can someone please tell me how to query for the aforementioned information? Thanks

Richard

One answer



permanent link
Donald Nong (14.3k213) | answered Mar 08 '16, 7:22 p.m.
I don't think SCM OSLC/REST API is officially published and supported, and it remains "internal use only". If you do network tracing, you may find out some particular URLs to get some related information. But that's about it - no documents. Similar discussion in the below post.
https://jazz.net/forum/questions/205358/how-to-access-the-streams-from-project-area-using-oslc-rest-api

Comments
Richard Good commented Mar 09 '16, 6:37 a.m.

I imagine that RPE should be able to help here, using schema discovery on things like

https://server:port/ccm/rpt/repository/scm?metadata=schema

seems initially encouraging, but I find no entries for baselines and snapshots, however there are components and changes attached to components in modified elements. Your answer is a little cryptic, are you telling me to investigate relationships by dumping various urls in a browser and seeing if I can find the relationships I want, but warning me that this interface will change without note because it is unpublished. Not sure I care if this breaks in future versions as I am just into issuing a few xpath queries and parsing the results, just a bit amazed that the data appears to go only so far. Thanks for the pointers, I have written a migration utility using the java api so could go the way mentioned in the linked article, but want something lightweight for reporting admin tasks. REST API and powershell would seem like a good combination for that sort of requirement .


Richard Good commented Mar 09 '16, 9:22 a.m. | edited Mar 09 '16, 10:05 a.m.

odd, if you use the following schema you get a lot more elements along with some extra scm items

https://server:port/ccm/rpt/repository/generic?metadata=schema

I'm going to use the xsd/ schema it with RPE and have an experiment...

It seems that you can hack together a schema from a combination of the scm and the generic, by adding complex types to the top of the file, seems like a bit of a hack, but you would imagine that the information I want exists in the database and would be available to query via REST somehow, it's just that IBM have chosen to hide it? Why? Vulnerability?


Richard Good commented Mar 09 '16, 10:09 a.m.

Note that the RTC REST API is documented, but the info may be a little bit out of date: -

https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI


Donald Nong commented Mar 09 '16, 8:12 p.m.

My bad. I recently saw quite a few unsupported use cases in this forum and took for granted yours is among them. Note that the reportable REST API (that you linked above) is for reporting purpose only. If it suites your need, by all means use it. If you're going to manipulate any SCM data, it would not work.

Your answer


Register or to post your answer.