feat: Raise the default for pagination limit at the projects endpoint to 100 (DEV-4095) #242
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.
The old dsp-meta-svc did not paginate when the
_limit
and_page
pagination parameters where not provided and returned all projects.The new implementation provides default values for the
_limit=10
and_page=1
. This was done because APIs that return large datasets or perform unbounded queries without pagination can lead to high memory, network and CPU usage. Hence commonly pagination works with default values for the pagination params.This PR solves the problem for the time being by raising the limit to be higher than the current number of projects (100>55).
Should the number of projects reach more than 100 the clients would have to get the next page. The PR should give them enough time to adopt.