It's all about the answers!

Ask a question

Best practices discovering resources with REST API for CCM

Dmitry A. Lesin (23413065) | asked Apr 28 '14, 1:48 a.m.
edited Apr 28 '14, 1:53 a.m.
We are developing an external integration to Jazz CLM, if to be more clear just to CCM solution. We are hardly following to diverse recommendations from IBM documentations and articles (for instance, to this one: For example, to update a work item of a single project area of Rational Team Concert, we get the information about this work item like next:

1. We do HTTP GET request in the way like next:

Accept: application/x-oslc-cm-change-request+xml

2. We parse the response and change the values of the response to new ones

3. We do HTTP PUT request using the updated work item presentation and change the actual data in RTC

This way helps us to find all RDF resources for most of the used fields. But in this way, we are constrainted if we need to create a new item if especially there is no items in the project area still (to use an existing work item as a template for change). The next limitation that if a work item fields is empty then we don't have any RDF resources in the work item's presentation!
And the question is related to the assumption that may be we goes a wrong way? What is a best practice to get the information about values of the complex fields where enumerations and other referenced resources are used?

Thank you in advance!

One answer

permanent link
Aradhya K (1.4k44345) | answered Apr 28 '14, 5:03 a.m.
In the service.xml there are different uri's as part of the element, oslc_cm:factory one for each type of the work item type defined in the project area. this will get you the empty XML you are looking for.

Dmitry A. Lesin commented Apr 29 '14, 8:00 a.m. | edited Apr 29 '14, 8:05 a.m.

Yes, thank you! I know about this resource, and we really use it in development. But it doesn't seem to be very flexible because there are next constraints:

1. To get the required resources, we have to have at least one work item of a predefined type.

But we'd like to discover the resources in run-time when we'd like to be sure that there are no empty fields in a work item (may be they aren't set still). Another problem is if somebody added a new custom work item type, and we know nothing about the internal structure of this work item beforehand.

2. I can not find any information about cutom fields based on custom enumerations in services.xml.

I can see only standard fields like to priority, severity, and so on.

So the question about the best practices how use it in the most effective manner with full accordance to Jazz architecture principles is still open.
In my opinion, the most appropriate way could be in getting a list of all resources for enumerations in the one point of entrance independently from any work items. May be it's defined somewhere already but we can not find it, is it true?

Your answer

Register or to post your answer.