s-kostyuk / everpl

The Everthing Platfrom source code
https://everpl.readthedocs.io/
MIT License
0 stars 1 forks source link

Filtering for Things #19

Open s-kostyuk opened 6 years ago

s-kostyuk commented 6 years ago

Implement a support of filtering for Things (items in /things/ REST API endpoint).

Parameter-based filtering is proposed. To filter all things by their placement, the following request will be able to be used:

curl --request GET \
  --url 'http://dpl_host:dpl_port/things/?placement=R1' \
  --header 'Authorization: your_auth_token_here'

In support of filtering approach, based on query parameters, see the following descriptions and mentions:

s-kostyuk commented 6 years ago

But query parameter-based approach have its own issues. For example:

From this perspective, it's much easier to parse exactly one filter statement specified in single filter parameter (like in OData) than to parse all query parameters and to build some filtering expressions based on them.

s-kostyuk commented 6 years ago

Base support implemented in https://github.com/s-kostyuk/adpl/pull/20. If you need any additional filtering by other fields, updated_since filtering, pagination and complex search - please, let me know by endorsing this comment and/or by creating of a new comment in this issue.