How to get the history of a work Item by oslc?
![]()
Hi,
I try to get the complete history of a work Item by oslc. There are dcterms:modified and rtc_cm:modifiedBy to get the information when and who modified the work Item. Is there a possibility to get the complete history like displayed in the history tab? Best regards |
Accepted answer
![]()
A call to the reportable REST API such as this will give you the full history of a workitem (change the id=7 parameter to the id of the wi you need):
https://server:9443/ccm/rpt/repository/workitem?size=10&fields=workitem/workItem[id=7]/(itemHistory/*) If you must use OSLC, you can append a state identifier to the Location URI you are calling to retrieve a particular version of a wi. Its likely you use a URI such as this to retrieve the details of a wi: https://server:9443/ccm/resource/itemOid/com.ibm.team.workitem.WorkItem/itemId Changing it to this will return the wi details as it existed in that revision: https://server:9443/ccm/resource/itemOid/com.ibm.team.workitem.WorkItem/itemId/stateId I don't have an easy suggestion on how to retrieve the stateId's other than using the reportable REST API: https://server:9443/ccm/rpt/repository/workitem?size=10&fields=workitem/workItem[id=7]/(itemHistory/stateId) Melanie Finke selected this answer as the correct answer
|
Comments
Someone from Jazz Developers should have responded to this. It's a basic question.