Actions
Feature #11223
closedMake subnets/freeip available through the API
Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Description
When I update a hosts interface to reflect that it is now in the build subnet for a given smart-proxy node I would like to be able to query out a freeIP address to assign to it via the API.
I can do this via the GUI by going to the host and setting the subnet and then having it suggest a free IP address but I'm using the API to configure hosts.
something like this would be nice (ignoring the lack of AUTH)
curl -k "https://FOREMANURL/api/subnets/freeip" --data "subnet_id=1&host_mac=44:1e:a1:6f:25:6c&taken_ips=1.1.1.1"
returns: {"ip":"10.240.4.25"}
Actions