If you want to get a jumpstart on common API use cases, you came to the right place! Expand the text areas below for walkthroughs and code samples of API calls...
...
Expand |
---|
title | My next (and hopefully last) problem deals with the Holding area. I'm trying to assign an IP that is in the Holding area. I don't want to unassign an IP randomly, in case it is allocated to a server. How do I know it is in the holding area so that I can unassign it? |
---|
|
There are 3 options:
1) If you know the specific IP, you can use use the ipam-get api call to determine if it is in Holding: Code Block |
---|
/api/v1/api.php?target=ipam&action=get&cidr=1.2.3.4/32 |
{
2) If you want to show all blocks/IPs in Holding, you can use the following ipam-get API call:
Code Block |
---|
/api/v1/api.php?target=ipam&action=get&resourceQuery={"name":"Holding"} |
3) If you know the block is in Holding, you can issue another ipam-unassign API call to move it from Holding to Available:
Code Block |
---|
/api/v1/api.php?target=ipam&action=unassign&block=1.2.3.4/32 |
|