[openstack-dev] [all][API WG] How does one best express a time interval as an API filtering query?

Kevin L. Mitchell klmitch at mit.edu
Thu Oct 6 15:30:30 UTC 2016


On Thu, 2016-10-06 at 10:59 -0400, Jay Pipes wrote:
> > Currently, we propose:
> >
> > ?finished_at=<ISOdate_a>/<ISOdate_b>&finished_at=<ISOdate_c>/<ISOdate_d>&...
> 
> The issue I have with the is that it uses a / character to delimit the a 
> and b dates.
> 
> In keeping with the style of the API-WG filter operators, I would 
> propose something like this:
> 
> ?finished_at=between:ISO_DATE_A:ISO_DATE_B&finished_at=between:ISO_DATE_C:ISO_DATE_D

Problem with that is that ':' is a valid character within an ISO date,
though I do like the 'between' prefix.  Now, '/' can be used if it's URL
encoded, but I agree that that is non-ideal.  How about a syntax
something like:

        ?finished_at=between:ISO_DATE_A at ISO_DATE_B&finished_at=between:ISO_DATE_C at ISO_DATE_D
-- 
Kevin L. Mitchell <klmitch at mit.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20161006/c442f0c4/attachment.pgp>


More information about the OpenStack-dev mailing list