You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

 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...

I unassigned an IP address and now it's in the Holding Tank. Now I want to assign an IP from the Holding Tank. I don't want to unassign an IP randomly, in case it is allocated to a Resource. 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:

/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:

/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:

/api/v1/api.php?target=ipam&action=unassign&block=1.2.3.4/32

 


 

  • No labels