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

API filtering improvements #4285

Merged
merged 1 commit into from
Jun 21, 2018

Conversation

davidfischer
Copy link
Contributor

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.

- Filter projects by slug
- Filter builds by project
- Filter versions by project
@davidfischer davidfischer requested a review from a team June 20, 2018 23:50
@ericholscher ericholscher changed the base branch from master to 2452-pw-reset-email June 21, 2018 10:11
@ericholscher ericholscher changed the base branch from 2452-pw-reset-email to master June 21, 2018 10:11
Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Easy enough. Makes it much more useful though!

@ericholscher ericholscher merged commit 303d3a4 into master Jun 21, 2018
@humitos humitos deleted the davidfischer/api-v2-small-improvements branch June 22, 2018 13:40
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

Successfully merging this pull request may close these issues.

2 participants