Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added calls per Patrick's list: Get Options, Get Resource Hierarchy, Get VLAN, Process Holding Tank

...

Get Scan Results

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

Initiates an asynchronous ping (ICMP) scan of the target block specified. Results of the scan can be checked with get

Returns

Examples:

SUCCESSFUL
{"success":1,"data":{"block":"8.8.8.0\/27","date":"07\/14\/2014 11:07:10",
"data":[{"address":"8.8.8.8","host":"google-public-dns-a.google.com","status":"Up"}],"status":"completed","hostsScanned":4,"activeHosts":4}}
ERROR{'success':0, 'message':'error message'}
Required Parameters
NameTypeExampleDescription
blockSTRING213.37.29.0/24CIDR block.
Optional Parameters

None

Example/api/v1/api.php?target=ipam&action=getScanResults&block=213.37.29.0/24

Get Options

URL

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

Description

Returns a list of options available for the block

Returns

Examples:

SUCCESSFUL{"success":1,"message":"Options for 14.0.0.0\/25 (125)","options":{"actions":["aggregate"],"templates":[{"name":"Auto Split","masks":[26,27,28,29,30,31,32]}]}}
ERROR{'success':0, 'message':'error message'}
Required Parameters
NameTypeExampleDescription
idINTEGER125ID of the IP block

Optional Parameters

None
Example URL/api/v1/api.php?target=ipam&action=getOptions&id=125

Get Resource Hierarchy

URL

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

Description

Returns the resource hierarchy for the block

Returns

Examples:

SUCCESSFUL{"success":"1","data":[{"id":"402","name":"6connect Labz"}]}
ERROR{'success':0, 'message':'error message'}
Required Parameters
NameTypeExampleDescription
idINTEGER125ID of the IP block

Optional Parameters

None
Example URL/api/v1/api.php?target=ipam&action=getResourceHierarchy&id=125

Get VLAN

URL

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

Description

Returns the VLAN for the block

Returns

Examples:

SUCCESSFUL{"success":1,"message":"Found VLAN 1002 (14.0.0.0\/25)","data":{"id":125,"type":"ipv4","top_aggregate":81532,"cidr":"14.0.0.0\/25","formatted_ip":"14.0.0.0\/25","address":"234881024","end_address":"234881151","mask":25,"netmask":"255.255.255.128","child1":null,"child2":null,"is_assigned":0,"is_swipped":0,"is_aggregate":1,"custid":402,"resource_id":402,"resource_name":"6connect Labz","last_updated_time":"2015-01-22 12:30:37","description":null,"parent":81532,"rir":"ARIN","lir_id":"1062","notes":"Test Notes","generic_code":"Datacenter2","code":"Datacenter2","region":"ATL","region_name":"Atlanta, GA","vlan":1002,"arin_net_id":null,"arin_cust_id":null,"org_id":null,"arin_swip_time":null,"assigned_time":"2015-01-14 10:30:31","asn":"143","allowSubAssignments":true,"permissions":{"permissionIPAMRead":"1","permissionIPAMUpdate":"1","permissionIPAMCreate":"1","permissionIPAMDelete":"1","permissionSWIP":"1","permissionAdmin":"1"},"range":"14.0.0.0 - 14.0.0.127","tags":["Customer"]}}
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

None
Example URL/api/v1/api.php?target=ipam&action=getVlan&id=125

Process Holding Tank

URL

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

Description

Processes the Holding Tank, returning held blocks to available status

Returns

Examples:

SUCCESSFUL{"success":1,"message":"1 IPv4 and 0 IPv6 blocks would be moved to the available pool. ","data":[{"id":77712,"type":"ipv4","top_aggregate":77552,"cidr":"23.92.0.64\/26","formatted_ip":"23.92.0.64\/26","address":"391905344","end_address":"391905407","mask":26,"netmask":"255.255.255.192","child1":null,"child2":null,"is_assigned":0,"is_swipped":0,"is_aggregate":1,"custid":188,"resource_id":188,"resource_name":"6connect holding","last_updated_time":"2014-10-29 11:25:41","description":null,"parent":77682,"rir":"ARIN","lir_id":"451","notes":null,"generic_code":null,"code":null,"region":"PHX","region_name":"Phoenix, AZ","vlan":null,"arin_net_id":null,"arin_cust_id":null,"org_id":null,"arin_swip_time":null,"assigned_time":"2014-10-29 11:20:34","asn":null,"allowSubAssignments":false,"permissions":{"permissionIPAMRead":"1","permissionIPAMUpdate":"1","permissionIPAMCreate":"1","permissionIPAMDelete":"1","permissionSWIP":"1","permissionAdmin":"1"},"range":"23.92.0.64 - 23.92.0.127","tags":["Customer","DSL"]}]}
ERROR{'success':0, 'message':'error message'}
Required ParametersNone
Optional Parameters
NameTypeExampleDescription

preview

BOOLtrue

Shows what is going to be removed from the holding tank.

Acceptable values: "true" or "false"

Example URL/api/v1/api.php?target=ipam&action=processHoldingTank&preview=true

IPAM API Calls Subject to Change:

...