It's all about the answers!

Ask a question

Getting iteration information using API REST


Daniel Garcia (491013) | asked Jun 05 '14, 4:58 a.m.
 Good morning,

I'm trying to retrieve some information from workitems using Rational Insight. Some of the data I need is located in a custom attribute, which maps an iteration (custom attribute type = Iteration).

The workitem editor shows the name of the iteration as it's supposed to do, but when we try to retrieve data from workitems using REST API, we only get the following information about the custom attribute:

https://server:port/jazz/rpt/repository/workitem?fields=workitem/workItem[id='1256']/customAttributes/*

This request provides the following output:

<workItem>
<customAttributes>
<uniqueId>
5618fb2f687dyy6a51dcc4b866a2418b
</uniqueId>
<stateId>
_QfmLVI5eEeOj9II5tUZk1A
</stateId>
<itemId>_QfmLVI5eEeOj9II5tUZk1A</itemId>
<contextId>
_orD0sH53EeO5FpW9mYtaag
</contextId>
<modified>
2014-01-05T13:08:43.619+0100
</modified>
<identifier>ca_
source_iteration
</identifier>
<attributeType>
interval
</attributeType>
<builtIn>
false
</builtIn>
<modifiedBy />
<projectArea />
 </customAttributes>

The custom attribute type is "interval", but we can't get more information about it. Does anyone know if there is any way to retrieve more specific data about an iteration mapped by a custom attribute (at least, iteration name)? If don't, is there any way to retrieve that using Rational Insight to do so?

Thank you very much for your help.

Kind regards,

      Daniel G. Garcia.

Accepted answer


permanent link
Brian Fleming (1.6k11828) | answered Jun 05 '14, 6:24 a.m.
Try
https://server:port/jazz/rpt/repository/workitem?fields=workitem/workItem[id=1256]/allExtensions/*

The REST API documentation can be found here:
https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI
Daniel Garcia selected this answer as the correct answer

Comments
Daniel Garcia commented Jun 05 '14, 6:30 a.m.

 Hi, Brian,


I've tried with that, but no luck. The custom attribute isn't even present in the data retrieved by this query. I've dived into REST API documentation, and I haven't had luck finding information related with this particular case (iteration type custom attribute).

Thank you for your answer.


      Daniel G. Garcia. 


Brian Fleming commented Jun 05 '14, 6:42 a.m.

Hi Daniel

What version are you running?  I believe "complex" custom attributes (such as iteration or contributor) were not included in the REST API until 4.0.3


Daniel Garcia commented Jun 05 '14, 10:12 a.m.
Hi, Brian,

Maybe that could be the reason. We're currently running CLM version 4.0.1 with Insight 1.1.1.


Is version 4.0.3 able to retrieve this kind of data?

Thank you very much for your help.

    Daniel G. Garcia.



Daniel Garcia commented Jun 09 '14, 3:26 a.m.

You are right, Brian. Thank you very much for your help.


Meanwhile, as a workaround for this particular case, we have created a new string custom attribute which is populated with the iteration information using a script.

Kind regards,

    Daniel G. Garcia. 

Your answer


Register or to post your answer.