Rational ClearQuest Http request to find defects that have been updated since a specific time?
So far I have been able to get a list of all defects from a particular defect family that I'm interested in with the following request (I'm using a sample base URL here):
http://localhost:8080/oslc/cqrest/repo/7.0.0/db/SAMPL/record/?oslc_cm.query=Found_in_Product_Family="MyDefectFamily"&rcm.type=Defect
I also was able to put together an http request that returned a complete timestamp history for a single defect like so:
http://localhost:8080/oslc/cqrest/repo/7.0.0/db/SAMPL/record/16777241-38577895?oslc_cm.properties=id,dbid,history{action_timestamp}
I can show sample xml response for both of those requests if anyone thinks it can be helpful here.
I can't seem to figure out how to write a request that will return a list of defects (id, dbid, timestamp) that contain a timestamp later than say 01/01/2014 00:00:00. Or at least a request that would return all defects where each defect entry would contain the last timestamp in it's history. I think I can get a list of all defects with all timestamps for each defect but I would like just the last timestamp. Taking the last node in the timestamp history doesn't work. Timestamp history doesn't seem to be ordered. Some sort of max function seems to be necessary for such a request.
Can anyone point me in the right direction or tell if what I want is impossible with ClearQuest OSLC CM REST API?
One answer
Comments
Jackie, at the time I gave up on trying to figure out how to make the API to return only the defects that I wanted and I moved forward with using the API to return all the defects from a particular family with all of their timestamps and then I sifted through them in my C# code to separate out only the ones I was interested in based on the timestamp history.
Some time later Josh Brown suggested a possible solution to my problem here and it looked very promising; however, I haven't had any time to come back to this issue and test his solution for myself. You might find his answer helpful as well.