It's all about the answers!

Ask a question

How to get the Snapshot URI details from a given Snapshot name using Java APIs


Jazzuser user (681050) | asked Nov 29 '17, 5:52 a.m.

Hello All,

I need to get the Snapshot URI from the given snapshot name using API.
URI like : serverURL/ccm/resource/itemOid/com.ibm.team.scm.BaselineSet/_4Y9XDMqIEeedneab198iEA

Request you to assist on this.

One answer



permanent link
Ralph Schoon (63.7k33648) | answered Nov 29 '17, 8:19 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I don't know, but I woould assume you have to cunstruct it somehow. Parts of the URI can be taken from the teamrepository/origin. The end part is the Snapsuot UUID. I would search the SDK.

For a work item, I think I did something like this:

Location location = Location.namedLocation(workItem,    ((ITeamRepository) workItem.getOrigin()).publicUriRoot());

To get the base URI for the repository.

The com.ibm.team.links.common.factory.IReferenceFactory has different ways to create references. Dependent on them, the links are created differently.

that is all I can hint at.


Comments
Ralph Schoon commented Nov 29 '17, 8:21 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You can look at some of that code in the Work Item Command Line: https://rsjazz.wordpress.com/2017/03/29/the-work-item-command-line-is-now-open-source/

Your answer


Register or 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.