How to get the Snapshot URI details from a given Snapshot name using Java APIs
One answer
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
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/