It's all about the answers!

Ask a question

URL for selecting a defect from project area through client Java API

Gidi Gal (962056) | asked Jun 06 '19, 1:29 p.m.
I would like to get the URL for selecting a defect from project area.
How do I do it using client Java API ?

The requested URL can be found through web API by querying https://<server_name>:<port>/ccm/rootervices, then querying the value of oslc_cm:cmServiceProviders, which yields a catalog file. Querying the catalog file for the value of oslc_disc:services for a specific project area will yield services.xml file which contains the requested URL.

The scenario I'm trying to solve:
An external application is communicating with RTC client. RTC client will supply this application a list of managed project areas and their "select defect" URLs. This application should display the user the managed project areas in the client and once the user selects one of them it will open the appropriate URL, which will allow the user to select a defect.

I'll be grateful for your help on this issue.

Ralph Schoon commented Jun 07 '19, 7:22 a.m.

Gidi, I don't get what you are asking for. 

Gidi Gal commented Jun 10 '19, 11:46 a.m. | edited Jun 10 '19, 12:11 p.m.
Hi Ralph, thanks for looking into this issue.

If you look into services.xml file I mentioned in my initial post you'll see URLs which allow you select work items from the relevant project area. For example, if you look for this string:
You'll find a URL for selecting defects from project area.

Is it possible to reach this URL string from client API ?

Given an ITeamRepository instance, I want to locate its project areas (I already know how to reach this list) and for each project area - I want to find its "Select Defect" URL (this is the part I'm missing)

The reason I need this functionality: I want to select a work item from another application, then pass its URL to RTC client and create a link between this work-item and a change-set (I already know how to find the change-set I need).

One answer

permanent link
Ralph Schoon (63.1k33646) | answered Jun 11 '19, 2:26 a.m.

 Hi Gidi,

the RTC plain Java Client Libraries provide supported means to query work items. This involves using expressions and queries. This is done using a Java API that hides the HTTP nature of the underlying REST APIs. You can use it against any RTC repository, provided you are logged in. You can use multiple instances of ITeamRepository each for one repository.


For many of the questions you ask, I have examples on my blog. See some of them above. You do not have to use any URIs for this.

If you want to work against a pure REST interface in the RTC Client API, shows how to access the internal REST interface. You will have to perform all the marshalling and unmarshalling as well.

How to discover the required URIs for this is hard to answer. I would search for the OSLC API, however that has become a mess when everything was migrated to

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.