Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

RQM API - querying for records updated in a given range

The RQM API has a great function called modifiedSince. It'll let you specify a dateTime and return all records modified since that date.

What if I only want to return artifacts from a given date range? Something like, return all recirds updated between 2014-08-01T00:00:00 and 2014-09-01T00:00:00?

The modifiedSince function says to consider using fields instead, and this implies that the functionality I want is possible. But unfortunately, the greater than and less than operators don't appear to work with a filter on updated.

This works:
executionresult?fields=/feed/entry/content/executionresult[updated='2014-08-03T00:27:24.612Z']

This does not:
executionresult?fields=/feed/entry/content/executionresult[updated>='2014-08-03T00:27:24.612Z']
(it returns all results)

Here's the documentation for modifiedSince. Am I missing something? Why would I use fields filtering if I had to know the milliseconds I was looking for?

modifiedSince

<feedUrl> only.

Value Meaning
<XML dateTime> Resources modified after (or greater than) the date time.

In addition, see note 15 on the labresource resource.

As an alternative, use fields filtering.


0 votes


Accepted answer

Permanent link
Hi Ken,

You could use a field filter like:

?fields=feed/entry/content/executionresult[updated>= '2014-08-03T00:00:00.000Z' and updated<= '2014-08-04T00 :00:00.000 Z'] ]/*

For more information, see https://jazz.net/wiki/bin/view/Main/RqmApi#fields.

If the inequality operators are not working, please open a RQM defect.
Kevin Murphy selected this answer as the correct answer

0 votes

Comments

Hey Paul,

Thank you for your response. I wasn't trying to use the "and" operator. I knew to do that, but didn't state so specifically. What I was trying to show was that the inequality operators don't appear to work, so of course, an and operation using them won't work.

I was hoping I was just missing something. I guess I'll open a defect.

Kevin

Get this -- I messed with Paul's suggestion while entering the defect (but before submitting it) and it worked! I am not sure what was not working yesterday.

This got me what I wanted:

/executionresult?fields=feed/entry/content/executionresult[updated>='2014-08-01T00:00:00.000Z' and updated<'2014-08-31T00:00:00.000Z']/*

I'm not sure why this wasn't working yesterday but I hope this helps someone else!

Kevin, the only difference appears to be < versus <= operators.  Can you try the <= operator?

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Sep 16 '14, 6:32 p.m.

Question was seen: 3,066 times

Last updated: Sep 17 '14, 2:30 p.m.

Confirmation Cancel Confirm