List and addition of Headers #1221

Closed
opened 2025-12-29 16:30:10 +01:00 by adam · 2 comments
Owner

Originally created by @dirtycajunrice on GitHub (Sep 13, 2017).

Issue type

[X] Feature request
[ ] Bug report
[X] Documentation

Description

Could we get a documented list of headers allowed? The use case i have right now is writing a python script for pulling data and ?limit= is... well... ugly haha. Tried a few "Pagination: 1000" "limit: 1000" "Max_page_size: 1000" nothing seemed to respond to larger page sizes other than appending ?limit= to the end as implemented in: #1237 .

Originally created by @dirtycajunrice on GitHub (Sep 13, 2017). ### Issue type [X] Feature request <!-- Requesting the implementation of a new feature --> [ ] Bug report <!-- Reporting unexpected or erroneous behavior --> [X] Documentation <!-- Proposing a modification to the documentation --> <!-- BUG REPORTS must include: * A list of the steps needed to reproduce the bug * A description of the expected behavior * Any relevant error messages (screenshots may also help) FEATURE REQUESTS must include: * A detailed description of the proposed functionality * A use case for the new feature * A rough description of any necessary changes to the database schema * Any relevant third-party libraries which would be needed --> ### Description Could we get a documented list of headers allowed? The use case i have right now is writing a python script for pulling data and ?limit= is... well... ugly haha. Tried a few "Pagination: 1000" "limit: 1000" "Max_page_size: 1000" nothing seemed to respond to larger page sizes other than appending ?limit= to the end as implemented in: #1237 .
adam closed this issue 2025-12-29 16:30:10 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 13, 2017):

API pagination is controlled using the limit and offset query parameters. NetBox does not support paging through the use of HTTP headers. Query parameters were chosen because this approach allows for linking to a specific page of results (e.g. in the browsable API).

@jeremystretch commented on GitHub (Sep 13, 2017): API pagination is controlled using the `limit` and `offset` query parameters. NetBox does not support paging through the use of HTTP headers. Query parameters were chosen because this approach allows for linking to a specific page of results (e.g. in the browsable API).
Author
Owner

@nickzxcv commented on GitHub (Apr 22, 2018):

How about http://docs.python-requests.org/en/master/user/advanced/#link-headers then? I think it would be compatible with the query parameter approach.

@nickzxcv commented on GitHub (Apr 22, 2018): How about http://docs.python-requests.org/en/master/user/advanced/#link-headers then? I think it would be compatible with the query parameter approach.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1221