Adding child prefixes using API is outdated with a lot of objects set to required compared to the Webui #1700

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

Originally created by @JSystem1 on GitHub (Apr 25, 2018).

Issue type

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

Environment

  • Python version: 2.7.12
  • NetBox version: 2.3.2

Description

I am trying to post child prefixes using the API at /api/ipam/prefixes/{id}/available-prefixes/ there seems to be a lot of required fields with using the API and other features not there compared to the webui when adding a child prefix.

Currently site,vrf,tenant and other fields are set to required while using the API. There is also no option to attach to a VLAN group when adding a child prefix through the API.

As I have a global VLANs defined I am running into a roadblock while trying to use the API to import my data into netbox.

Originally created by @JSystem1 on GitHub (Apr 25, 2018). ### Issue type [ ] Feature request <!-- An enhancement of existing functionality --> [X ] Bug report <!-- Unexpected or erroneous behavior --> [ ] Documentation <!-- Please describe the environment in which you are running NetBox. (Be sure to verify that you are running the latest stable release of NetBox before submitting a bug report.) If you are submitting a bug report and have made any changes to the code base, please first validate that your bug can be recreated while running an official release. --> ### Environment * Python version: 2.7.12 <!-- Example: 3.5.4 --> * NetBox version: 2.3.2 <!-- Example: 2.1.3 --> <!-- BUG REPORTS must include: * A list of the steps needed for someone else to reproduce the bug * A description of the expected and observed 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 I am trying to post child prefixes using the API at `/api/ipam/prefixes/{id}/available-prefixes/` there seems to be a lot of required fields with using the API and other features not there compared to the webui when adding a child prefix. Currently site,vrf,tenant and other fields are set to required while using the API. There is also no option to attach to a VLAN group when adding a child prefix through the API. As I have a global VLANs defined I am running into a roadblock while trying to use the API to import my data into netbox.
adam closed this issue 2025-12-29 16:34:32 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jul 18, 2018):

The only required parameter is prefix_length. This may have been addressed in a more recent release.

@jeremystretch commented on GitHub (Jul 18, 2018): The only required parameter is `prefix_length`. This may have been addressed in a more recent release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1700