Check out the paging sample from the documentation.
In order for the paging parameters to be included in your API, you'll need to explicitly include them in your method:
@Brand.query_method(query_fields=('limit', 'pageToken'),
path='brand',
http_method='GET',
name='brand.list')
def brand_list(self, query):
"""Exposes an API endpoint to query for brands for the current user"""
return query.order(Brand.name)
The default value of the query limit is 10
. You can change it but you should set a reasonable limit
. It is the limit_default
field in query_method
.