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
Comments
The calls aren't expensive and the system sets a default page size that will ensure decent performance (by default it's 50), but the usual parameter used in ELM calls is "size" so you could try that
The calls aren't expensive and the system sets a default page size that will ensure decent performance (by default it's 50), but the usual parameter used in ELM calls is "size" so you could try that