Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 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
titleMy next (and hopefully last) problem deals with the Holding area. I'm trying I unassigned an IP address and now it's in the Holding Tank. Now I want to assign an IP that is in from the Holding areaTank. 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 itResource. What are my options?

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

{
  id:1234,
  cidr:"1.2.3.4",
  ...
  resource_name:"Holding"
}


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

...