[openstack-dev] [all][API WG] How does one best express a time interval as an API filtering query?
Jeremy Stanley
fungi at yuggoth.org
Thu Oct 6 15:43:13 UTC 2016
On 2016-10-06 10:30:30 -0500 (-0500), Kevin L. Mitchell wrote:
[...]
> 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
I'll admit I'm not up on the intricacies of URL expectations for
APIs, but why not just use a comma? That's not an unusual meaning
for it as punctuation (at least in English), and has the property
that it's not overloading a typical field separator within either
8601 or HTTP encodings. (Now I've fulfilled my bikeshed quota for
the month.)
--
Jeremy Stanley
More information about the OpenStack-dev
mailing list