Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added Calls: Add Region to List, Add Tag to List, Get Attribute List

...

Get Tags List

URL/api/v1/api.php?target=ipam&action=getTagList
DescriptionReturns a list of all valid IP Tags in the database.
Returns

Examples:

SUCCESSFUL{"success":1,"message":"Tags Retrieved.","data":[{"value":"IT","name":"IT"},{"value":"LTE","name":"LTE Mobile"},{"value":"PTP","name":"Point to Point"},{"value":"Prod","name":"Production"},{"value":"VM","name":"Virtual Machines"},{"value":"VOIP","name":"VOIP"},{"value":"ANY","name":"ANY"}]}
ERROR{'success':0, 'message':'error message'}
Get RIRs

Add Tag To List

URL

/api/v1/api.php?target=ipam&action=

getRIRList

addTagToList

DescriptionReturns

Adds a

list of all valid RIRs in the database.

tag to the IPAM tag list

Returns

Examples:

SUCCESSFUL

{"success":1,"message":"

RIRs Retrieved.","data":[{"value":"ARIN","name":"ARIN"},{"value":"1918","name":"1918"},{"value":"AfriNIC","name":"AfriNIC"},{"value":"APNIC","name":"APNIC"},{"value":"LACNIC","name":"LACNIC"},{"value":"RIPE","name":"RIPE"},{"value":"1918-SJC","name":"1918-SJC"}]}
ERROR{'success':0, 'message':'error message'}

Tag Added."}

ERROR{'success':0, 'message':'error message'}
Required Parameters
NameTypeExampleDescription

newTag

STRINGLoopback CThe value to add to the list of name/value pairs which make up the list of available regions

Optional Parameters

None
Example URL/api/v1/api.php?target=ipam&action=addTagToList&newTag=Loopback C

Get RIRs

Get Regions

List

URL/api/v1/api.php?target=ipam&action=getRegionListgetRIRList
DescriptionReturns a list of all valid Regions RIRs in the database.
Returns

Examples:

SUCCESSFUL{"success":1,"message":"Regions RIRs Retrieved.","data":[{"value":"ANYARIN","name":"Any RegionARIN"},{"value":"ASH11918","name":"Ashburn, VA1918"},{"value":"BOSAfriNIC","name":"Boston, MAAfriNIC"},{"value":"CHIAPNIC","name":"Chicago, ILAPNIC"},{"value":"DALLACNIC","name":"Dallas, TXLACNIC"},{"value":"DENRIPE","name":"Denver, CORIPE"},{"value":"FRKT1918-SJC","name":"1918-SJC"}]}
ERROR{'success':0, 'message':'error message'}

Get Regions List

URL/api/v1/api.php?target=ipam&action=getRegionList
DescriptionReturns a list of all valid Regions in the database.
Returns

Examples:

SUCCESSFUL{"success":1,"message":"Regions Retrieved.","data":[Frankfurt, DE"},{"value":"LON1","name":"London, UK"},{"value":"MIA","name":"Miami, FL"},{"value":"PARANY","name":"Paris, FRAny Region"},{"value":"SFOASH1","name":"San FranciscoAshburn, CAVA"},{"value":"SEABOS","name":"SeattleBoston, WAMA"},{"value":"TokyoCHI","name":"TokyoChicago, IL"},{"value":"SingaporeDAL","name":"Dallas, TX"},{"value":"DEN","name":"Denver, CO"},{"value":"FRKT","name":"Frankfurt, DE"},{"value":"LON1","name":"London, UK"},{"value":"MIA","name":"SingaporeMiami, FL"},{"value":"Jakarta","name":"Jakarta"}]}
ERROR{'success':0, 'message':'error message'}
PAR","name":"Paris, FR"},{"value":"SFO","name":"San Francisco, CA"},{"value":"SEA","name":"Seattle, WA"},{"value":"Tokyo","name":"Tokyo"},{"value":"Singapore","name":"Singapore"},{"value":"Jakarta","name":"Jakarta"}]}
ERROR{'success':0, 'message':'error message'}

Add Region To List

URL

/api/v1/api.php?target=ipam&action=addRegionToList

Description

Adds a region to the IPAM region list

Returns

Examples:

SUCCESSFUL

{"success":1,"message":"Region Added."}

ERROR{'success':0, 'message':'error message'}
Required Parameters
NameTypeExampleDescription
newRegionSTRINGSFOThe value to add to the list of name/value pairs which make up the list of available regions

Optional Parameters

None
Example URL/api/v1/api.php?target=ipam&action=addRegionToList&newRegion=SFO

Get Utilization

URL/api/v1/api.php?target=ipam&action=utilization
DescriptionGets the utilization percentages for a specific ip block or ip block and mask combination.
Returns

Examples:

SUCCESSFUL
{

"success": 1,

"totalBlocks": 1,

"totalHosts": "256",

"hostsAssigned": 0,

"hostsAllocated": "256",

"hostsAvailable": "256",

"hostsInHolding": 0,

"availablePercentage": "100.00",

"assignedPercentage": "0.00",

"allocatedPercentage": "100.00",

"inHoldingPercentage": "0.00",

"resources": [{

"id": 351,

"name": "Customer 1",

"type": "entry",

"hosts": "256",

"blocks": "1",

"percentage": "100.00"

}],

 

"blocksAssigned":0,

"blocksAllocated": 1,

"blocksAvailable": "1",

"blocksInHolding": null,

"blocksAssignedPercentage": "0.00",

"blocksAllocatedPercentage": "100.00",

"blocksAvailablePercentage": "100.00",

"blocksInHoldingPercentage": "0.00"

}
ERROR{'success':0, 'message':'error message'}
Required Parameters
NameTypeExampleDescription
block*STRING213.37.29.0/24CIDR block description
id*INTEGER125ID of the IP block
*Either block or id can be used, but only one must be provided
Optional Parameters
NameTypeExampleDescription
maskINTEGER24The specific mask size to retrieve utilization for. If using this parameter, the id parameter should be the id of the aggregate.
Example URL/api/v1/api.php?target=ipam&action=utilization&id=125
The specific mask size to retrieve utilization for. If using this parameter, the id parameter should be the id of the aggregate.

Get Host

Get

Utilization

URL/api/v1/api.php?target=ipam&action=utilizationgetHostUtilization
DescriptionGets the utilization percentages for a specific ip block or ip block and mask combinationhost utilization statistics with support for filters.
Returns

Examples:

SUCCESSFUL
{

"success": 1,"totalBlocks": 1,

"totalHosts": "256",

"hostsAssigned": 0,

"hostsAllocated": "256",

"hostsAvailable": "256",

"hostsInHolding": 0,

"availablePercentage": "100.00",

"assignedPercentage": "0.00",

"allocatedPercentage": "100.00",

"inHoldingPercentage": "0.00",

"resources": [{

"id": 351,

"name": "Customer 1",

"type": "entry",

"hosts": "256",

"blocks": "1",

"percentage": "100.00"

}
],

 

"blocksAssigned":0,

"blocksAllocated": 1,

"blocksAvailable": "1",

"blocksInHolding": null,

"blocksAssignedPercentage": "0.00",

"blocksAllocatedPercentage": "100.00",

"blocksAvailablePercentage": "100.00",

"blocksInHoldingPercentage": "0.00"
]

}

ERROR{'success':0, 'message':'error message'}
Required Parameters
NameTypeExampleDescription
typeSTRING"ipv4" or "ipv6"IP type
Optional Parameters
NameTypeExampleMultiple ValuesDescription
codeSTRING
block*STRING213.37.29.0/24CIDR block description
id*INTEGER125ID of the IP block
*Either block or id can be used, but only one must be provided
Optional Parameters
"code-1"YesUser-defined block code as defined in Admin-IPAM settings: Generic Code Per Block Name
regionSTRING"SFO"YesRegion to assign from
rirSTRINGARIN

No

Acceptable values: ARIN, RIPE, APNIC, AfriNIC, LACNIC, 1918
tagsSTRING"Customer"YesComma separated string of tags
vlanINTEGER1000YesVLAN designated to a given block

NOTE: to filter using multiple values, pass the values as a JSON-encoded string representation of an array.

For example, to get utilization data for multiple tags, you could use the following URL:

/api/v1/api.php?target=ipam&action=getHostUtilization&type=ipv4&tags=["Customer","PTP"]

NameTypeExampleDescription
maskINTEGER24
Example URL/api/v1/api.php?target=ipam&action=utilization&id=125=getHostUtilization&type=ipv4&tags=["Customer","PTP"]&region=SMF

Get Attribute List

Get Host Utilization

URL

/api/v1/api.php?target=ipam&action=

getHostUtilization

getAttributeLists

DescriptionGets the host utilization statistics with support for filters.

Returns a list of attributes

Returns

Examples:

SUCCESSFUL

{

"

success

asns":

1

[],

"

totalHosts

masks":["

256

24"],

"

hostsAssigned

rirs":

0,

["

hostsAllocated": "256",

"hostsAvailable": "256",

"hostsInHolding": 0,

"availablePercentage": "100.00",

"assignedPercentage": "0.00",

"allocatedPercentage": "100.00",

"inHoldingPercentage": "0.00",

1918"],"lirs":[],"tags":["DHCP"],"codes":[],"vlans":[],"regions":["Quito"],"resources":[{

"id":

351

"1302",

"name":"

Customer

Quito Lab 1",

"

type

slug":"

entry

quito-lab-1",

"

hosts

type":"

256

dhcp_pool",

"

blocks

parent_id":

"1",

"percentage": "100.00"

}]

}

ERROR{'success':0, 'message':'error message'}
Required Parameters
NameTypeExampleDescription
typeSTRING"ipv4" or "ipv6"IP type

"1","category_id":null,"attr":{"_dhcp_type":"subnet","_dhcp_pool_attributes":"{\"mac\":\"\",\"rangeStart\":\"10.8.0.0\",\"rangeEnd\":\"10.8.0.255\",\"freeLines\":0}","_dhcp_ip_id":"125"}}]}

ERROR{'success':0, 'message':'error message'}
Required Parameters
NameTypeExampleDescription
idINTEGER125ID of the IP block

Optional Parameters

NoneOptional Parameters
NameTypeExampleMultiple ValuesDescription
codeSTRING"code-1"YesUser-defined block code as defined in Admin-IPAM settings: Generic Code Per Block Name
regionSTRING"SFO"YesRegion to assign from
rirSTRINGARIN

No

Acceptable values: ARIN, RIPE, APNIC, AfriNIC, LACNIC, 1918
tagsSTRING"Customer"YesComma separated string of tags
vlanINTEGER1000YesVLAN designated to a given block

NOTE: to filter using multiple values, pass the values as a JSON-encoded string representation of an array.

For example, to get utilization data for multiple tags, you could use the following URL:

/api/v1/api.php?target=ipam&action=getHostUtilization&type=ipv4&tags=["Customer","PTP"]Example URL/api/v1/api.php?target=ipam&action=getHostUtilizationgetAttributeLists&type=ipv4&tags=["Customer","PTP"]&region=SMF id=125

Aggregate

URL/api/v1/api.php?target=ipam&action=aggregate

Description

Aggregates a selected block to the mask specified. If no mask specified, re-aggregates blocks to next parent. IE. calling aggregate on a /25 will aggregate both children back to the parent /24. All child blocks must be Available for aggregation to succeed.

Returns

Examples:

SUCCESSFUL
                    {"success":1,"message":"10.2.0.128\/25 aggregated into 10.2.0.0\/24","id":16326}
                  
ERROR{'success':0, 'message':'error message'}
Required Parameters
NameTypeExampleDescription
id*INTEGER125ID of the IP block.
block*STRING213.37.29.0/24CIDR block.
*Either block or id can be used, but only one must be provided
Optional Parameters
NameTypeExampleDescription
autoAggregateToMaskINTEGER24

All blocks and IPs smaller than this netmask will be aggregated.

ignoreAssignments

BOOLTRUE

If the ignoreAssignment flag is not set the aggregation operation will fail if any children beneath the supplied autoAggregateToMask are assigned or otherwise unavailable.  If this option is set, it will unassign blocks prior to reaggregation.

Example URL/api/v1/api.php?target=ipam&action=aggregate&id=125&autoAggregateToMask=24

...