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

API filtering improvements #4285

Merged
merged 1 commit into from Jun 21, 2018

Conversation

Projects
None yet
2 participants
@davidfischer
Contributor

davidfischer commented Jun 20, 2018

This allows the API to be filtered in order to make it more usable. For example:

/api/v2/project/?slug=pip               # retrieve just the Pip project (matches slug exactly or not at all)
/api/v2/version/?project__slug=pip      # retrieve versions for Pip
/api/v2/build/?project__slug=pip        # retrieve builds for Pip

This is built on top of #4274 which documents the API. Only commits starting with e93d9ed need to be reviewed separately.

This reverses the changes in #2635 and #2903 and re-introduces django-filter. It uses some very limited filters where there are definitely indexes (slug) so performance should be decent.

Make the API actually usable with filtering
- Filter projects by slug
- Filter builds by project
- Filter versions by project

@davidfischer davidfischer requested a review from rtfd/core Jun 20, 2018

@ericholscher ericholscher changed the base branch from master to 2452-pw-reset-email Jun 21, 2018

@ericholscher ericholscher changed the base branch from 2452-pw-reset-email to master Jun 21, 2018

@ericholscher

Easy enough. Makes it much more useful though!

@ericholscher ericholscher merged commit 303d3a4 into master Jun 21, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@humitos humitos deleted the davidfischer/api-v2-small-improvements branch Jun 22, 2018

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