inveniosoftware / invenio-records-rest

Invenio records REST API module.
https://invenio-records-rest.readthedocs.io
MIT License
4 stars 62 forks source link

view: introduce `max_result_page` config variable for the endpoints #188

Open egabancho opened 6 years ago

egabancho commented 6 years ago

As it is now one can go and request a page size of max_result_window. It might be nice to allow the page size to be configurable:

RECORDS_REST_ENDPOINTS = dict(
    recid=dict(
        ...
        list_route='/records/',
        item_route='/records/<pid(recid):pid_value>',
        default_media_type='application/json',
        max_result_page=1000,
        max_result_window=10000,
        error_handlers=dict(),
    ),
)