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

Specify a date range with REST API? Proper date format?

I need to return work items created and modified between a specific date range via the REST API. It looks like I can use < and > to specify a range, but any date syntax I try returns an invalid date error. My REST API string is as follows:

https://SERVER:PORT/jazz/rpt/repository/workitem?fields=workitem/workItem[type/id="task" and creationDate>DATESPECNEEDED]/*

Sample Errors:
CRRED0106E: Invalid date value: 2014-10-12
CRRED0106E: Invalid date value: 2014-10-12T18:16:59.831
CRRED0106E: Invalid date value: 2014-10-12T18:16:59.831 0000

I have tried ISO 8601, Julian, epoch, and various combinations of month day and year, with and without time, and with and without quotes. Any idea what format it needs?


0 votes


Accepted answer

Permanent link
After some experimentation I got the following to work:
https://server:port/ccm/rpt/repository/workitem?fields=workitem/workItem[type/id="task" and creationDate>2012-12-17T09:30:16.427-0500]/(id|summary|creationDate)

It would appear that the time zone needs to be abutted to the rest of the date with a +/- (you may need to substitute %2b for + to get the parser to accept positive time zone adjustments)

See also https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI#Examples
Mike Shkolnik selected this answer as the correct answer

1 vote

Comments

You are correct! changing the "+" to "-" did the trick. Thanks much.

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
× 480

Question asked: Nov 05 '14, 1:59 p.m.

Question was seen: 6,649 times

Last updated: Nov 05 '14, 8:29 p.m.

Confirmation Cancel Confirm