Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow clients to specify time ranges in data queries #80

Open
ssfrr opened this issue May 8, 2017 · 0 comments
Open

Allow clients to specify time ranges in data queries #80

ssfrr opened this issue May 8, 2017 · 0 comments

Comments

@ssfrr
Copy link
Member

ssfrr commented May 8, 2017

We currently only support going through sensor data page-by-page with the prev, next, first, and last links. We should add official support for user-specified ranges with query parameters and templated links. Currently the data link looks like:

http://chain-api.media.mit.edu/scalar_data/?sensor_id=3689

The proposed new link would be:

http://chain-api.media.mit.edu/scalar_data/?sensor_id=3689{&timestamp__gte,timestamp__lt}

This conforms to the IETF RFC for templated URIs.

If a client requests the URI with the {&timestamp__gte,timestamp__lt} part present, we'd just ignore everything in the braces, so non-template-aware clients can continue to treat the link as an opaque string.

We'll also want to add support to chainclient.py: ssfrr/chainclient.py#4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant