REST query for the components in a stream and one for the baselines in a component
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
https://jazz.net/forum/questions/205358/how-to-access-the-streams-from-project-area-using-oslc-rest-api
Comments
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 .
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?
Note that the RTC REST API is documented, but the info may be a little bit out of date: -
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.