API improvements for filter project and declarative raw syntax #438
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Several updates to the server to get our recent api refactor useable, plus endpoint adjustments that are needed by our map view.
/api/raw/<tablename>
and removes the existing raw endpoint that provided duplicative data.results_per_page
query parameter to get a specific number (default is 100). This means that when using this for the 'projects' endpoint, we will need to ask for a higher default (we currently have 500+ projects, but should set this at a very high number so we don't accidentally miss any as our dataset grows).This version of the code has been deployed to the Code for DC server. The Code for DC RDS database has also been updated with the most recent copy of dev load_data.py, which means that it has the calculated_zone facts table so that the api adjustments in this code works correctly. You can see it here:
http://housinginsights.us-east-1.elasticbeanstalk.com/api/project/
http://housinginsights.us-east-1.elasticbeanstalk.com/api/project/NL000055
http://housinginsights.us-east-1.elasticbeanstalk.com/api/filter
http://housinginsights.us-east-1.elasticbeanstalk.com/api/raw/project?results_per_page=5
Next up I will be fixing front end code to match.