This came up on the form recently. It is interesting, because in several areas, including the web UI the URL is what is exposed and not an item ID.
I basically browsed the RTC SDK (using my standard setup described here) and searched for java.net.URI as parameter.
I finally found com.ibm.team.repository.common.Location being used for this purpose. You can basically create a location from an URI and get to the object. There are several methods to get at the item handle. For example Location.itemOidUriToHandle(). See Arne’s answer to his own question for details how he does the trick in an example. To be able to find it in searches, here the code:
URI snapUri= URI.create(snapshotIdentifier.replaceAll(" ", "%20")); Location snapLoc = Location.location(snapUri); IBaselineSet snapshotItem = (IBaselineSet) teamRepository.itemManager().fetchCompleteItem(snapLoc,IItemManager.DEFAULT, monitor);
I used Location also in this post to create links with back links between items.
Just Starting With Extending RTC?
If you just get started with extending Rational Team Concert, or create API based automation, start with the post Learning To Fly: Getting Started with the RTC Java API’s and follow the linked resources.
You should be able to use the following code in this environment and get your own automation or extension working.