Getting iteration information using API REST
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>
</customAttributes>
<uniqueId>
</uniqueId>
5618fb2f687dyy6a51dcc4b866a2418b
<stateId>
</stateId>
_QfmLVI5eEeOj9II5tUZk1A
<itemId>_QfmLVI5eEeOj9II5tUZk1A</itemId>
<contextId>
</contextId>
_orD0sH53EeO5FpW9mYtaag
<modified>
</modified>
2014-01-05T13:08:43.619+0100
<identifier>ca_
</identifier>
source_iteration
<attributeType>
</attributeType>
interval
<builtIn>
</builtIn>
false
<modifiedBy />
<projectArea />
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
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
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
Comments
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.
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
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.
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,