Only first 50 VLANs retrieved through /api/ipam/vlans/ #2020

Closed
opened 2025-12-29 17:21:32 +01:00 by adam · 1 comment
Owner

Originally created by @ghost on GitHub (Sep 21, 2018).

Environment

  • Python version:
  • NetBox version:

Python version: 3.4.3
NetBox version: v2.4.3

Steps to Reproduce

auth_token = 'Token abcdefghijklmnopqrstuvwxyz'
url = 'http://netbox/api/ipam/vlans/'

payload = requests.get(
    url = url, 
    headers={
        'Authorization': auth_token, 
        'accept': 'application/json'
    }
)
payload = payload.json()
results = payload['results']
print(results)

Expected Behavior

Retrieve all VLANs within the IPAM database

Observed Behavior

Only first 50 vlans are retrieved, all others are missing

Originally created by @ghost on GitHub (Sep 21, 2018). <!-- NOTE: This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: <!-- Example: 3.5.4 --> * NetBox version: <!-- Example: 2.3.6 --> Python version: 3.4.3 NetBox version: v2.4.3 <!-- Describe in detail the steps that someone else can take to reproduce this bug using the current stable release of NetBox (or the current beta release where applicable). --> ### Steps to Reproduce ``` auth_token = 'Token abcdefghijklmnopqrstuvwxyz' url = 'http://netbox/api/ipam/vlans/' payload = requests.get( url = url, headers={ 'Authorization': auth_token, 'accept': 'application/json' } ) payload = payload.json() results = payload['results'] print(results) ``` <!-- What did you expect to happen? --> ### Expected Behavior Retrieve all VLANs within the IPAM database <!-- What happened instead? --> ### Observed Behavior Only first 50 vlans are retrieved, all others are missing
adam closed this issue 2025-12-29 17:21:32 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 21, 2018):

Please see the API documentation.

@jeremystretch commented on GitHub (Sep 21, 2018): Please see [the API documentation](https://netbox.readthedocs.io/en/stable/api/overview/#pagination).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2020