Is it possible in RTC to get the history of an wotrkitem with all the attributes changed that are recorded in history via REST?
I am trying to get use a REST API to get the history of an workitem with all the attributes that are recorded as changed in the hostory. I am using "https://server/ccm/rpt/repository/workitem?size=10&fields=workitem/workItem[id=123]/(itemHistory/*)" to do so but I am not getting all the attributes. It only gives me datemodified, descriptiona an summary. But what I am after is to get any changes recorded. Is there possiblility to do that via REST in RTC?
2 answers
First of all, EWM has many APIs. The API you use above is referred to as reportable REST API.
This is the only public REST APIs that allow access to the history off a work item that I am aware of.
To get the history:
- itemHistory (type: com.ibm.team.workitem.WorkItem, maxOccurs: unbounded). A collection of zero or more WorkItem elements, representing the entire history of the work item. Each state the work item has ever been in is reflected in this history list.
This gives you results as described in https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI#workItem_type_com_ibm_team_worki
The correct syntax is
That returns all work item states with all the attributes that are set.
Hi Ralph Schoon
Thanks for the reply. I tried the api you suggested but still I am not getting all the attribute. Moreover, I can see the xml response with lots of
<category/>
<customAttributes/>
<customAttributes/>
<customAttributes/>
<customAttributes/>
<customAttributes/>
<customAttributes/>
<customAttributes/>
<customAttributes/>
<customAttributes/>
<customAttributes/>
and no display value for them. Is that because this fields could be custom field and not out of box field
Comments
No value means that there is no value set.
"not getting all the attribute" - if you are interested in help here on the forum, provide details
I have answered what I can. If I wanted to know more, especially custom attributes, I would make sure I understand what values the work item actually has and try to set all attributes and then check what the reportable REST API provides.