Is it possible in RTC to get the history of an wotrkitem with all the attributes changed that are recorded in history via REST?
Yogesh Ranjitkar (15●4)
| asked Jan 17 '22, 8:59 p.m.
edited Jan 18 '22, 2:49 a.m. by Ralph Schoon (63.5k●3●36●46) 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
Ralph Schoon (63.5k●3●36●46)
| answered Jan 18 '22, 2:32 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jan 18 '22, 2:45 a.m. 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:
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.
Comments
Ralph Schoon
commented Jan 18 '22, 2:46 a.m.
| edited Jan 18 '22, 2:48 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I edited the answer providing the correct syntax. The correction would not work in a comment for whatever reason.
Use (itemHistory/(*))
|
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.
|
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.