setting limit=0 param in api request still returns paginated results #5314

Closed
opened 2025-12-29 19:26:34 +01:00 by adam · 3 comments
Owner

Originally created by @michaeldialpad on GitHub (Sep 3, 2021).

NetBox version

v3.0.1

Python version

3.7

Steps to Reproduce

  1. navigate to https:///api/circuits/circuits/?limit=0
  2. results are still paginated

Expected Behavior

results returned should not be paginated when passed limit=0

Observed Behavior

results are still paginated

Originally created by @michaeldialpad on GitHub (Sep 3, 2021). ### NetBox version v3.0.1 ### Python version 3.7 ### Steps to Reproduce 1. navigate to https://<netbox server>/api/circuits/circuits/?limit=0 2. results are still paginated 3. ### Expected Behavior results returned should not be paginated when passed limit=0 ### Observed Behavior results are still paginated
adam closed this issue 2025-12-29 19:26:34 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 3, 2021):

This behavior is intended when MAX_PAGE_SIZE is non-zero. NetBox will only return the lesser of either the limit query parameter or the configured maximum page size. Please see the MAX_PAGE_SIZE configuration parameter.

@jeremystretch commented on GitHub (Sep 3, 2021): This behavior is intended when `MAX_PAGE_SIZE` is non-zero. NetBox will only return the lesser of either the `limit` query parameter or the configured maximum page size. Please see the [`MAX_PAGE_SIZE`](https://netbox.readthedocs.io/en/stable/configuration/optional-settings/#max_page_size) configuration parameter.
Author
Owner

@michaeldialpad commented on GitHub (Sep 3, 2021):

I have tried seting MAX_PAGE_SIZE to None and to 0 in configuration.py and restarted netbox service and still the same result

@michaeldialpad commented on GitHub (Sep 3, 2021): I have tried seting MAX_PAGE_SIZE to None and to 0 in configuration.py and restarted netbox service and still the same result
Author
Owner

@michaeldialpad commented on GitHub (Sep 3, 2021):

I now set PAGINATE_COUNT to an obscenely high number which prevented pagination but not sure if this is intended.

@michaeldialpad commented on GitHub (Sep 3, 2021): I now set PAGINATE_COUNT to an obscenely high number which prevented pagination but not sure if this is intended.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5314