Skip to content

Instantly share code, notes, and snippets.

@guyjacks
Created September 21, 2018 17:47
Show Gist options
  • Save guyjacks/ce2ab237d8008548caec90203a338d10 to your computer and use it in GitHub Desktop.
Save guyjacks/ce2ab237d8008548caec90203a338d10 to your computer and use it in GitHub Desktop.
"""
# /filters/?q=thrap3
- GET
- Return the trait filters matching the search
- also return a count of rules matching each possible filter
# /queries/
- POST
- Apply a filter and return the new query
- PUT /queries/<id>/
- Update the query json body
# /queries/<id>/results
- GET
- Return the rules that match the query
- also return a count of rules that would match the intersection or union of
- applied traits
- also return a count of rules matching each applied filter
# /queries/<id>/rules/
- GET
- returns the rules that have been excluded or included for this query
- must prevent duplicates
- POST /queries/<id>/rules/
- Body { rule: <id>, excluded: <bool> }
- Need to support bulk [{ rule: <id>, excluded: <bool> }, {}, {}]
- Install django extensions for this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment