It's all about the answers!

Ask a question

Rational ClearQuest Http request to find defects that have been updated since a specific time?


Elise Anders (1612) | asked Apr 03 '14, 2:37 p.m.
I am trying to use ClearQuest OSLC CM REST API to write an http request to accomplish the following. I want to get a list (in the XML format) of ClearQuest defects that have been updated since a specified 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



permanent link
Jackie Albert (1.6k14947) | answered May 29 '15, 11:31 a.m.
This is an old question, but did you ever figure out the answer to this?  I'm trying to do the same thing without much luck.

Comments
Elise Anders commented May 29 '15, 4:15 p.m.

 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. 

Your answer


Register or to post 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.