How to get results for itemHistory via the REST API
![]()
Is it possible to specify a parameter that would return work items with HISTORY containing any elements that match the criteria? For example:
https://SERVER:PORT/jazz/rpt/repository/workitem?fields=workitem/workItem[type/id="task" and itemHistory/timeSpent="3600000"]/* returns the error: "CRRED0135E: Illegal filter. The field 'workitem/itemHistory/timeSpent' may not be used in a filter because it returns multiple values." because there are multiple entries for itemHistory/timeSpent. Is there a way to specify work items in which ANY itemHistory/timeSpent matches the parameter, and what is the syntax for that? |
One answer
![]()
I suggest you filter the item history directly since it is "flat" here for the intended filters. So it looks like
https://SERVER:PORT/jazz/rpt/repository/workitem?fields=workitem/workItem/itemHistory[type/id="task" and timeSpent=3600000]/* It may not meet your requirement perfectly since some fields that you want may not be in the item history, and you may get duplicate copies of the work item itself. |
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.