Due to size of query sets (returned data) I have turned on pagination for the larger endpoints, mostly those returning the incident data.
Incidents use:
class StandardResultsSetPagination(PageNumberPagination):
page_size = 50
page_size_query_param = 'page_size'
max_page_size = 100
Meaning:
default return is 50 results, user is able to override up to 100
Due to size of query sets (returned data) I have turned on pagination for the larger endpoints, mostly those returning the incident data.
Incidents use: class StandardResultsSetPagination(PageNumberPagination): page_size = 50 page_size_query_param = 'page_size' max_page_size = 100 Meaning: default return is 50 results, user is able to override up to 100
Other endpoints with smaller models will have:
class LargeResultsSetPagination(PageNumberPagination): page_size = 500 page_size_query_param = 'page_size' max_page_size = 1000
Meaning: default return is 500 results, user is able to override up to 1000
These probably could be tweeked a bit, is this an appropriate return for the frontend