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

Filtering for SM #94

Closed
ayaleloehr opened this issue Sep 14, 2016 · 3 comments
Closed

Filtering for SM #94

ayaleloehr opened this issue Sep 14, 2016 · 3 comments
Assignees

Comments

@ayaleloehr
Copy link
Contributor

ayaleloehr commented Sep 14, 2016

Marc and I drew this up on the board yesterday and he will provide more details on how filtering will work in the API documentation he is writing in #87

@saneshark
Copy link
Contributor

saneshark commented Sep 30, 2016

?filter[[some_attribute][some_operation]]=some_value&filter[[same_attribute][some_other_operation]]=some_other_value

Where some_operation and some_other_operation is one of

  • eq
  • not_eq
  • gteq
  • lteq

For example a date range could be:

http://api.vets.gov/v0/health/messaging/folders/0/messages?filter[[date_sent][gteq]]=2015-01-01&filter[[date_sent][lteq]]=2015-12-31

@saneshark
Copy link
Contributor

saneshark commented Sep 30, 2016

We can add additional operations for regex matches, but those will need special sanitization so are currently not supported.

We could also look at implementing eq_any which would be OR operations, but that just increases complexity. Prefer to have all operations that are changed be an implicit AND

@ayaleloehr
Copy link
Contributor Author

still to implement matches for subject line and from.

first to push up a PR for filtering. has to fix submodule problem.

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

No branches or pull requests

3 participants