Can I get all available-ips from different Lan in API ? #1683

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

Originally created by @gitblessk on GitHub (Apr 19, 2018).

Hello,

First, thanks the amazing tool.

I would like to know if I can get all available-ips from different Lan by roles or site or something else in API ?

example:

I have 3 lans:
10.10.10.0/24
10.10.10.1/24
10.10.10.2/24

These are the same purpose, user get available ips form one of these 3 lans.
if one of them run out of available ip, I would like to get it from other lan in these big pools.

Now I get ip from API by:
http://netbox/api/ipam/prefixes/$ID/available-ips/

I know this is not auto, I have to change the url ($ID need to be changed when this lan's ip is not enough anymore)

I try to list the ip by role or by site, it just didn't work out.

Hence, is there a smart way to get available ip from a big pool (maybe with diff lans) ?

Thanks.

Issue type

[ ] Feature request
[ ] Bug report
[ ] Documentation

Environment

  • Python version: 3.5
  • NetBox version: 2.3.2

Description

Originally created by @gitblessk on GitHub (Apr 19, 2018). Hello, First, thanks the amazing tool. I would like to know if I can get all available-ips from different Lan by roles or site or something else in API ? example: I have 3 lans: 10.10.10.0/24 10.10.10.1/24 10.10.10.2/24 These are the same purpose, user get available ips form one of these 3 lans. if one of them run out of available ip, I would like to get it from other lan in these big pools. Now I get ip from API by: http://netbox/api/ipam/prefixes/$ID/available-ips/ I know this is not auto, I have to change the url ($ID need to be changed when this lan's ip is not enough anymore) I try to list the ip by role or by site, it just didn't work out. Hence, is there a smart way to get available ip from a big pool (maybe with diff lans) ? Thanks. <!-- Before opening a new issue, please search through the existing issues to see if your topic has already been addressed. Note that you may need to remove the "is:open" filter from the search bar to include closed issues. Check the appropriate type for your issue below by placing an x between the brackets. For assistance with installation issues, or for any other issues other than those listed below, please raise your topic for discussion on our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please note that issues which do not fall under any of the below categories will be closed. Due to an excessive backlog of feature requests, we are not currently accepting any proposals which extend NetBox's feature scope. Do not prepend any sort of tag to your issue's title. An administrator will review your issue and assign labels as appropriate. ---> ### Issue type [ ] Feature request <!-- An enhancement of existing functionality --> [ ] Bug report <!-- Unexpected or erroneous behavior --> [ ] Documentation <!-- A modification to the 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: 3.5 <!-- 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
adam closed this issue 2025-12-29 16:34:23 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 19, 2018):

Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using the template provided here. For general discussion, questions, or assistance with installation issues, please post to our mailing list.

@jeremystretch commented on GitHub (Apr 19, 2018): Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using the template provided [here](https://raw.githubusercontent.com/digitalocean/netbox/develop/.github/ISSUE_TEMPLATE.md). For general discussion, questions, or assistance with installation issues, please post to our [mailing list](https://groups.google.com/forum/#!forum/netbox-discuss).
Author
Owner

@gitblessk commented on GitHub (Apr 20, 2018):

thanks

@gitblessk commented on GitHub (Apr 20, 2018): thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1683