Get the last entry in the History section of a Testplan
Hallo,
i am able to fetch the complete history of a Testplan with this REST-API-call:
https://<my_server>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/history?resourceId=resources/<my_project>/testplan/urn:com.ibm.rqm:testplan:2
I am looking for a possibility to make a request with filter option, which only retreives the last entry of the history-section.
How can this be done with REST-API or OSLC call?
3 answers
The historyUrl is defined as a feed URL, so that means you can use the sort parameter to sort the history in date order. You could then use
https://<my_server>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/history?resourceId=resources/<my_project>/testplan/urn:com.ibm.rqm:testplan:2&sort=descending
and take the first entry. You may even be able to specify the page size in the URL and make it less than the default set on the server