API: retrieve a prefix by prefix #1959

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

Originally created by @ebusto on GitHub (Aug 21, 2018).

Environment

  • Python version: 3.5.4
  • NetBox version: 2.4.3

Proposed Functionality

Modify the ipam filter to allow retrieving a single prefix by name, /api/ipam/prefixes/?prefix=10.0.0.0/8.

Use Case

This allows anyone using the API (either directly, or indirectly by using pynetbox et al) to unambiguously retrieve the prefix record, which can then be displayed, updated, etc.

Database Changes

None.

External Dependencies

None.

Originally created by @ebusto on GitHub (Aug 21, 2018). ### Environment * Python version: 3.5.4 * NetBox version: 2.4.3 ### Proposed Functionality Modify the ipam filter to allow retrieving a single prefix by name, `/api/ipam/prefixes/?prefix=10.0.0.0/8`. ### Use Case This allows anyone using the API (either directly, or indirectly by using `pynetbox` et al) to unambiguously retrieve the prefix record, which can then be displayed, updated, etc. ### Database Changes None. ### External Dependencies None.
adam closed this issue 2025-12-29 17:20:56 +01:00
Author
Owner

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

It's a perfectly valid use case to have multiple instances of 10.0.0.0/8. The prefix alone cannot be employed as a unique identifier.

@jeremystretch commented on GitHub (Aug 21, 2018): It's a perfectly valid use case to have multiple instances of 10.0.0.0/8. The prefix alone cannot be employed as a unique identifier.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1959