Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

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.

0 votes



One answer

Permanent link

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.

1 vote

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/

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,943
× 17

Question asked: Nov 29 '17, 5:52 a.m.

Question was seen: 2,831 times

Last updated: Nov 29 '17, 8:21 a.m.

Confirmation Cancel Confirm