It's all about the answers!

Ask a question

How to programmatically obtain snapshot details from respective Build Results?

Arun Batra (14612326) | asked Jun 30 '15, 12:19 p.m.
We wanted to programmatically compare snapshots by providing the build IDs to which they are respectively attached.

To compare the snapshots we can use the RTC Command Line Interface.
But what do we use to get the snapshot ids from the build ids.

Obviously for this we would first need to populate a list of build results for a particular definition. This can be achieved using the REST API. (/jazz/resource/virtual/build/results)
However we are not able to find the id of the snapshot in the detail provided by the response above.

Are we missing something here or is this not possible by using REST API?
If not possible? How do we get the snapshot from the build id? Are there other ways?


3 answers

permanent link
Krishna Kishore (50112) | answered Jul 01 '15, 1:08 a.m.

If you have the build result uuid then you can retrieve the build snapshot by getting the build contributions, following rest call should get the data 

<url>/resource/virtual/build/result/<build result uuid>/contributions?type=buildSnapshot
the result in JSON format would be like 

            "label":"snapshot rtc.601_20150630-2158",

permanent link
Nick Edgar (6.5k711) | answered Jul 06 '15, 2:43 p.m.
You can also use the generateChangeLog Ant task:!/SSYMRC_5.0.2/

permanent link
Carlos Maciel (3112) | answered Jan 20 '16, 5:52 p.m.
Is there a way to obtain the snapshot information having the BuildResult (or BuildDefinition object) using Java Plain API?

Your answer

Register or to post your answer.