Auto Light Dark
Auto Light Dark

API Module - IPAM

APIv1 - IPAM Module (IPv4 and IPv6)

ProVision's APIv1 system has been replaced by APIv2, and is now considered deprecated. 

IP Block Management

Get

URL

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

Description

Returns a list of IP blocks. Use optional parameters to filter the list.
If multiple parameters are specified, only blocks matching all parameters will be returned.

Returns

Examples:

SUCCESSFUL

{ "success": 1, "message": "1 blocks found. ", "data": [ { "id": 5890, "type": "ipv4", "top_aggregate": null, "cidr": "192.168.0.0\/24", "formatted_ip": "192.168.0.0\/24", "address": "3232235520", "end_address": "3232235775", "mask": 24, "child1": null, "child2": null, "is_assigned": 0, "is_swipped": 0, "is_aggregate": 1, "custid": 81, "resource_id": 81, "resource_name": "Available", "last_updated_time": null, "description": null, "parent": null, "rir": "1918", "lir_id": null, "notes": null, "generic_code": null, "code": null, "region": "SFO", "vlan": 100, "arin_net_id": null, "arin_cust_id": null, "org_id": null, "arin_swip_time": null, "assigned_time": null, "asn": null, "allowSubAssignments": false, "permissions": { "permissionIPAMRead": "1", "permissionIPAMUpdate": "1", "permissionIPAMCreate": "1", "permissionSWIP": "1", "permissionAdmin": "1" }, "range": "192.168.0.0 - 192.168.0.255", "tags": [ "Customer", "PTP" ] } ] }

ERROR

{'success':0, 'message':'error message'}

Required Parameters

None

Optional Parameters

Name

Type

Example

Description

address

INTEGER

1125449728

IP address of the block in decimal format

asn

INTEGER

1000

Filters blocks based on their ASN

allowSubAssignments

BOOL

true

Filters blocks based on wether they allow sub-assignments or not. Acceptable values: "true" or "false"

block

STRING

213.37.29.0/24

CIDR block description

code

STRING

Code X

User-defined block code as defined in Admin-IPAM settings: Generic Code Per Block Name

endAddress

INTEGER

1125453823

End IP address of the block in decimal format

id

INTEGER

1234

The ID of the block

includeAttributes

BOOL

true

Allows loading and display of the attributes for all of the blocks in the collection.

isAggregate

BOOL

true

Indicates if the block has been split into children or not. A value of 'true' will return blocks with no children.

isAssigned

BOOL

true

Acceptable values: "true" or "false"

isSwipped

BOOL

true

Acceptable values: "true" or "false"

lastUpdateTime

DATETIME

=2015-8-19 21:08:54 

SQL Datetime format, prefaced by an "=" for exact time updated, "=﹥" for blocks updated after the given time, or "=﹤" for blocks updated before the given time.

lirId

INTEGER

101

The numeric ID of an LIR resource the block should be linked to

mask

INTEGER

24

Integer bitmask

notes

STRING

note123

Returns blocks with exact matches in the notes field against the provided "notes" string.

region

STRING

SFO

The value from the list of name/value pairs which make up the list of available regions

resourceHolderId

STRING

cust-001

(Deprecated: Use resourceQuery instead)

A custom ID which can be used to link resources in the ProVision database back to your organization.

resourceId

INTEGER

1234

The ID of the resource the block is assigned to

resourceQuery

JSON


{"parent_id":15}


A JSON object representing a valid resource query. Any parameters that can be used for a Resource GET API call can be used. Use of the resourceQuery parameter will return blocks assigned to any of the resources returned by that query.

rir

STRING

ARIN

Acceptable values: ARIN, RIPE, APNIC, AfriNIC, LACNIC, 1918

search

STRING

192.168

If a search term is provided, all IPAM fields including assigned Resource Holder name will be checked with a LIKE comparison to find matching blocks

selectCount

INTEGER

50

# of blocks to get

selectOffset

INTEGER

25

Offset for results set; useful for paging (e.g. selectCount = 50, selectOffset = 100 would return the 3rd page of 50 results)

sortField

STRING

cidr

Attribute to sort blocks by. Accepable values: cidr, mask, rir, vlan, code, updateTime

sortOrder

INTEGER

ASC

ASC or DESC

tags

STRING

customer,vpn

Comma-separated list of tags to filter by. If used in conjunction with 'search', performs the search operation and then filters results by the provided tag. Use with tagsMode to specify filter approach.

tagsMode

STRING

"strict","exclude", "intersection", or "union".

Denotes how the "tags" parameter is handled:

"strict" - matches only blocks that have the exact set of tags of specified.

"exclude" - matches only blocks which are note tagged with any of the blocks specified.

"intersection" - matches any blocks which has all of the tags. 

"union" - matches all blocks which has any one of the tags. 

If not otherwise specified, tagsMode defaults to "intersection".

topAggregateId

INTEGER

1234

The ID of the aggregate block to which the block belongs

type

STRING

"ipv4" or "ipv6"

IP type

vlan

INTEGER

123

VLAN for the block

Example URL

/api/v1/api.php?target=ipam&action=get&rir=ARIN&tags=customer,vpn

Add

URL

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

Description

Adds an IPv4 or IPv6 block

Returns

Examples:

SUCCESSFUL

{"success":1,"message":"Block 192.168.0.0/24 (12345) added", "id":12345, "data":{ "id":12345, "cidr":192.168.0.0/24", ...} }

ERROR

{ "success":0, "message":"error message" }

Required Parameters

Name

Type

Example

Description

block

STRING

213.37.29.0/24

CIDR block description

rir

STRING

ARIN

Acceptable values: ARIN, RIPE, APNIC, AfriNIC, LACNIC, 1918

Optional Parameters

Name

Type

Example

Description

allowDuplicate

BOOL

true

Allow the creation of duplicate blocks. The default behavior is to reject duplicates.

allowSubAssignments

BOOL

true

Does the block allow sub-assignments? If the block is assigned and allowSubAssignments is "true", children split from this block will be able to be assigned to different resources.
Acceptable values: "true" or "false"

asn

INTEGER

1000

ASN for the block

code

STRING

Code X

User-defined block code as defined in Admin-IPAM settings: Generic Code Per Block Name

region

STRING

SFO

The value from the list of name/value pairs which make up the list of available regions

resourceId

INTEGER

1234

The ID of the resource the block is assigned to

tags

STRING

customer,vpn

Comma-separated list of tags

vlan

INTEGER

123

VLAN for the block

Example URL

/api/v1/api.php?target=ipam&action=add&block=213.37.29.0/24&rir=ARIN

Update

URL

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

Description

Updates detail data about an IP block.

Returns

Examples:

SUCCESSFUL

SINGLE BLOCK

{"success":1,"message":"Block 192.168.0.0/24 (12345) updated", "data":{ "id":12345, "cidr":192.168.0.0/24", ...} }

SUCCESSFUL

MULTIPLE BLOCKS

{"success":1,"message":"3 blocks updated", "data":[ { "id":12345, "cidr":192.168.0.0/24", ...}, {"id":12346, "cidr", "192.168.0.1/32", ...} ] }

ERROR


{ "success":0, "message":"error message" }



Required Parameters

Name

Type

Example

Allow Multiple

Description

id*

INTEGER

125

Yes

ID of the IP block. Multiple block IDs can be specified in a comma-separated list.

block*

STRING

192.0.0.0/24

Yes

CIDR or the block. Multiple CIDRs can be specified in a comma-separated list.

*Either block or id can be used, but only one must be provided

Optional Parameters

Name

Type

Example

Description

allowSubAssignments

BOOL

true

Does the block allow sub-assignments? If the block is assigned and allowSubAssignments is "true", children split from this block will be able to be assigned to different resources.
Acceptable values: "true" or "false"

asn

INTEGER

1000

ASN for the block

code

STRING

Code X

Arbitrary user-defined block code

lirId

INTEGER

101

The numeric ID of an LIR resource the block should be linked to

notes

STRING

Words

Misc. Notes

region

STRING

Chicago, IL

The region this IP block is assigned to.

propagate

BOOL

true

Propagates all attribute values to any smaller child blocks of the block being updated. Available in version 5.1.0

rir

STRING

ARIN

Acceptable values: ARIN, RIPE, APNIC, AfriNIC, LACNIC, 1918

tags

STRING

Customer, vpn

Comma-separated list of tags

tags_action

STRING

replace

What action to take on the supplied tags.  This action must be taken in conjunction with the tags parameter.  Valid settings for tags_action are:  replace, add, delete.  When tags_action is set to 'replace', all tags on an IP block are replaced with those

vlan

NUMERIC

123

VLAN for the block

Example URL

/api/v1/api.php?target=ipam&action=update&block=192.0.0.0/24&notes=Notes_here

Delete

URL

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

Description

Deletes an aggregate block

Returns

Examples

SUCCESSFUL

{"success":1,"message":"Aggregate deleted: 192.168.0.0/24", "data":{ "id":12345, "cidr":192.168.0.0/24", ...} }

ERROR

{ "success":0, "message":"error message" }

Required Parameters

Name

Type

Example

Description

block*

STRING

213.37.29.0/24

CIDR block description

id*

INTEGER

125

ID of the IP block

*Either block or id can be used, but only one must be provided

Optional Parameters

Name

Type

Example

Description

force

BOOL

true

Forces the aggregate block to be deleted even if the block is split or contains sub blocks which are assigned. The default behavior is to reject attempts to delete blocks which have been split or are assigned.

Example URL

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

Add Tag

URL

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

Description

Adds a tag to an IP block.

Returns

Examples:

SUCCESSFUL

{ "success":1,"message":"Tag Added.", "data":{ "id":12345, "cidr":192.168.0.0/24", ...} }

ERROR

{ "success":0, "message":"error message" }

Required Parameters

Name

Type

Example

Description

id*

INTEGER

125

ID of the block

block*

STRING

192.0.0.0/24

CIDR of the block

*Either block or id can be used, but only one must be provided

tag

STRING

Customer

The tag to add

Optional Parameters

None

Example URL

/api/v1/api.php?target=ipam&action=addTag&id=125&tag=Customer

Delete Tag

URL

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

Description

Removes a tag from an IP block.

Returns

Examples:

SUCCESSFUL

{ "success":1,"message":"Tag Removed.", "data":{ "id":12345, "cidr":192.168.0.0/24", ...} }

ERROR

{ "success":0, "message":"error message" }

Required Parameters

Name

Type

Example

Description

id*

INTEGER

125

ID of the block

block*

STRING

192.0.0.0/24

CIDR of the block

*Either block or id can be used, but only one must be provided

tag

STRING

Customer

The tag to delete

Optional Parameters

None

Example URL

/api/v1/api.php?target=ipam&action=deleteTag&id=125&tag=Customer

Smart Assign

URL

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

Description

Selects a block based on supplied parameters (rir, tags, mask size, etc.) and assigns it to a Resource Holder.

Returns

Examples:

SUCCESSFUL

{ "success":1,"message":"Assigned 192.168.0.0/24 to Resource (1234) via Smart Assign", "id":12345, "data":{ "id":12345, "cidr":192.168.0.0/24", ...} }

ERROR

{ "success":0, "message":"error message" }

Required Parameters

Name

Type

Example

Description

mask

INTEGER

24

The size of the block to be assigned

rir

STRING

ARIN

Acceptable values: ARIN, RIPE, APNIC, AfriNIC, LACNIC, 1918

resourceId*

INTEGER

1234

Integer ID of the resource to assign the block to

resourceQuery*

JSON


{"custom_id":"cust-001"}


A JSON object representing a valid resource query. Any parameters that can be used for a Resource GET API call can be used. Use of the resourceQuery parameter will return blocks assigned to any of the resources returned by that query.

*Either resourceId or resourceQuery can be used, but only one must be provided

resourceHolderId

STRING

cust-001

(Deprecated: Use resourceQuery instead)

A custom ID which can be used to link resources in the ProVision database back to your organization.

type

STRING

"IPv4" or "IPv6"

The type of block to assign

Optional Parameters*

Name

Type

Example

Description

assignedResourceId

STRING

"123" or "ignore"

The ID of the resource the block is assigned to, or the string "ignore". If assignedResourceId is set to "ignore", then a matching IP block is selected from the Available pool or any sub-assignable block on any resource.

code

STRING

Code X

Arbitrary user-defined block code

lirId

INTEGER

101

The ID of an LIR resource

region

STRING

Ashburn

Region to assign from

tags

STRING

customer,vpn

Comma separated string of tags. Matches blocks which have at least the set of tag specified by this parameter

tagsMode

STRING

"strict","exclude", "intersection", or "union".

Denotes how the "tags" parameter is handled:

"strict" - matches only blocks that have the exact set of tags of specified.

"exclude" - matches only blocks which are note tagged with any of the blocks specified.

"intersection" - matches any blocks which has all of the tags. 

"union" - matches all blocks which has any one of the tags. 

If not otherwise specified, tagsMode defaults to "intersection".

vlan

INTEGER

1023

VLAN designated to a given block

*Additional or fewer "optional" parameters may be required in order to result in a successful assignment, depending on the attributes of available blocks.

Example URL

/api/v1/api.php?target=ipam&action=smartAssign&mask=24&type=IPv4&resourceId=250&rir=ARIN

Direct Assign

URL

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

Description

Assigns a block to an Resource Holder

Returns

Examples:


SUCCESSFUL

SINGLE BLOCK

{ "success":1,"message":"Assigned 192.168.0.0/24 to Resource (1234)", "id":12345, "data":{ "id":12345, "cidr":192.168.0.0/24", ...} }

SUCCESSFUL

MULTIPLE BLOCKS

{ "success":1,"message":"Assigned 5 blocks to Resource (1234) via Direct Assign", "data":{ "ids":[12345, 12346, 12347, ...] } }

ERROR


{ "success":0, "message":"error message" }

Required Parameters

Name

Type

Example

Description

block*

STRING

213.37.29.0/24

CIDR block description

id*

INTEGER

125

ID of the IP block, comma separated list of ids, or json encoded array of ids

*Either block or id can be used, but only one must be provided

resourceHolderId**

STRING

cust-001

(Deprecated: Use resourceQuery instead)

A custom ID which can be used to link resources in the ProVision database back to your organization.

resourceId**

INTEGER

1234

Integer ID of the resource to assign the block to

resourceQuery**

JSON


{"custom_id":"cust-001"}


A JSON object representing a valid resource query. Any parameters that can be used for a Resource GET API call can be used. Use of the resourceQuery parameter will return blocks assigned to any of the resources returned by that query.

**Either resourceId, resourceQuery, or resourceHolderId can be used, but only one must be provided

Optional Parameters*

Name

Type

Example

Description

code

STRING

Code X

Arbitrary user-defined block code

lirId

INTEGER

101

The ID of an LIR resource

region

STRING

Ashburn

Region to assign from

rir

STRING

ARIN

Acceptable values: ARIN, RIPE, APNIC, AfriNIC, LACNIC, 1918

tags

STRING

customer,vpn

Comma separated string of tags. Matches blocks which have at least the set of tag specified by this parameter

tagsMode

STRING

"strict","exclude", "intersection", or "union".

Denotes how the "tags" parameter is handled:

"strict" - matches only blocks that have the exact set of tags of specified.

"exclude" - matches only blocks which are note tagged with any of the blocks specified.

"intersection" - matches any blocks which has all of the tags. 

"union" - matches all blocks which has any one of the tags. 

If not otherwise specified, tagsMode defaults to "intersection".

vlan

INTEGER

1023

VLAN designated to a given block

*Additional or fewer "optional" parameters may be required in order to result in a successful assignment, depending on the attributes of available blocks.

Example URL

/api/v1/api.php?target=ipam&action=directAssign&block=213.37.29.0/24&resourceId=1234

Unassign

URL

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

Description

Reclaims the specified block to be reassigned in the future

Returns

Examples:

SUCCESSFUL

{ "success":1,"message":"192.168.0.0/24 unassigned", "id":12345,  "data":{ "id":12345, "cidr":192.168.0.0/24", ...} }

ERROR

{ "success":0, "message":"error message" }

Required Parameters

Name

Type

Example

Description

block*

STRING

213.37.29.0/24

CIDR block description

id*

INTEGER

125

ID of the IP block

*Either block or id can be used, but only one must be provided

Optional Parameters

Name

Type

Example

Description

skipHolding

BOOL

true

If set to true (skipHolding=true) then the holding tank is skipped. If set to false, or not included, normal holding tank rules apply.

Acceptable values: "true" or "false"

Example URL

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

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

Name

Type

Example

Description

id*

INTEGER

125

ID of the IP block.

block*

STRING

213.37.29.0/24

CIDR block.

*Either block or id can be used, but only one must be provided

Optional Parameters

Name

Type

Example

Description

autoAggregateToMask

INTEGER

24

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

ignoreAssignments

BOOL

TRUE

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

Split

URL

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

Description

Splits a selected block to the mask specified. If no mask specified, it split blocks to next child. IE. calling aggregate on a /24 will split both parent to the child /25s. All parent blocks must be Available, or have Allow Sub Assignments on for a split to succeed.

Returns

Examples:

SUCCESSFUL

{"success":1,"message":"10.1.0.0\/24 split into 10.1.0.0\/25 and 10.1.0.128\/25","data":{"child1":23441,"child2":23451}}

ERROR

{'success':0, 'message':'error message'}

Required Parameters

Name

Type

Example

Description

id*

INTEGER

125

ID of the IP block.

block*

STRING

213.37.29.0/24

CIDR block.

*Either block or id can be used, but only one must be provided

Optional Parameters

Name

Type

Example

Description

autoSplitToMask

INTEGER

24

Auto aggregate the block back to this mask size. Note all blocks up this mask size must be Available or call will fail.

autoSplitLimit

INTEGER

4

A number the power of 2 (^2).

Example URL

/api/v1/api.php?target=ipam&action=split&block=213.37.29.0/24&autoSplitLimit=4

Scan Block

URL

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

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,"message":"Ping scan started for 8.8.8.0\/27"}

ERROR

{'success':0, 'message':'error message'}

Required Parameters

Name

Type

Example

Description

id*

INTEGER

125

ID of the IP block.

block*

STRING

213.37.29.0/24

CIDR block.

*Either block or id can be used, but only one must be provided

Optional Parameters

None

Example

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

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

Name

Type

Example

Description

block

STRING

213.37.29.0/24

CIDR 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

Name

Type

Example

Description

id

INTEGER

125

ID of the IP block

Optional Parameters

None

Example URL

/api/v1/api.php?target=ipam&action=getOptions&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":"SomeCo 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

Name

Type

Example

Description

id*

INTEGER

125

ID of the IP block

block*

STRING

213.37.29.0/24

CIDR 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

Get Resource Hierarchy

URL

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

Description

Returns the Parent Resource and Parent Resource id for the provided block.

Returns

Examples:

SUCCESSFUL

{"success":"1","data":[{"id":"4208","name":"aSomeCoEntry"}]}

ERROR

{'success':0, 'message':'error message'}

Required Parameters

Name

Type

Example

Description

id

INTEGER

125

ID of the IP block

Optional Parameters

None

Example URL

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

IP Subnets List

Get Subnet List

URL

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

Description

Returns the IPv4 or IPv6 Subnet Lists

Returns

Examples:

SUCCESSFUL

{"success":1,"message":"Lookup was successful","data":["36","48","56","64","126","127","128"]}

ERROR

{'success':0, 'message':'error message'}

Required Parameters

Name

Type

Example

Description

size

INTEGER

"4" or "6"

The IP Subnet list to return - "4" for IPv4 subnets, or "6" for IPv6 subnets.

Optional Parameters

None

Example URL

/api/v1/api.php?target=ipam&action=getSizes&size=6

IP Tag List

Get Tags List

URL

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

Description

Returns a list of all valid IP Tags in the database.

Returns

Examples:

SUCCESSFUL

{"success":1,"message":"Tags Retrieved. ","data":["ActiveE DIA","Colo DIA","Customer","DSL","Fiber DIA","GPON DIA","Infra","Inhouse","LAN","LBIntf","POP","PTP","Prod","VPN","WEBHOST","Cable","Internal"]}

ERROR

{'success':0, 'message':'error message'}

Add Tag To List

URL

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

Description

Adds a tag to the IPAM tag list

Returns

Examples:

SUCCESSFUL

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

ERROR

{'success':0, 'message':'error message'}

Required Parameters

Name

Type

Example

Description

newTag

STRING

Loopback C

The 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

Delete Tag From List

URL

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

Description

Deletes a tag from the IPAM tag list

Returns

Examples:

SUCCESSFUL

{"success":1,"message":"Tag Deleted."}

ERROR

{'success':0, 'message':'error message'}

Required Parameters

Name

Type

Example

Description

tag

STRING

tag123

The name of the tag to be deleted.

Optional Parameters

None

Example URL

/api/v1/api.php?target=ipam&action=deleteTagFromList&tag=tag123

IP Regions List

Get Regions List

URL

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

Description

Returns a list of all valid Regions in the database.

Returns

Examples:

SUCCESSFUL

{"success":1,"message":"Regions Retrieved.","data":[{"value":"ANY","name":"Any Region"},{"value":"ASH1","name":"Ashburn, VA"},{"value":"BOS","name":"Boston, MA"},{"value":"CHI","name":"Chicago, IL"},{"value":"DAL","name":"Dallas, TX"},{"value":"DEN","name":"Denver, CO"},{"value":"FRKT","name":"Frankfurt, DE"},{"value":"LON1","name":"London, UK"},{"value":"MIA","name":"Miami, FL"},{"value":"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

Name

Type

Example

Description

newRegion

STRING

SFO

The 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


Utilization

Get Utilization

URL

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

Description

Gets 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

Name

Type

Example

Description

block*

STRING

213.37.29.0/24

CIDR block description

id*

INTEGER

125

ID of the IP block

*Either block or id can be used, but only one must be provided

Optional Parameters

Name

Type

Example

Description

mask

INTEGER

24

The 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

Get Host Utilization

URL

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

Description

Gets the host utilization statistics with support for filters.

Returns

Examples:

SUCCESSFUL

{

"success": 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"

}]

}

ERROR

{'success':0, 'message':'error message'}

Required Parameters

Name

Type

Example

Description

type

STRING

"ipv4" or "ipv6"

IP type

Optional Parameters

Name

Type

Example

Multiple Values

Description

code

STRING

"code-1"

Yes

User-defined block code as defined in Admin-IPAM settings: Generic Code Per Block Name

region

STRING

"SFO"

Yes

Region to assign from

rir

STRING

ARIN

No

Acceptable values: ARIN, RIPE, APNIC, AfriNIC, LACNIC, 1918

tags

STRING

"Customer"

Yes

Comma separated string of tags

vlan

INTEGER

1000

Yes

VLAN 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=getHostUtilization&type=ipv4&tags=["Customer","PTP"]&region=SMF


Holding Tank

Override Holding

URL

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

Description

Overrides holding for a specific block, returning the block to available status

Returns

Examples:

SUCCESSFUL

{"success":1,"message":"15.15.15.128\/30 unassigned and returned to resource aSomeCoEntry","id":79134,"data":{"id":79134,"type":"ipv4","top_aggregate":79121,"cidr":"15.15.15.128\/30","formatted_ip":"15.15.15.128\/30","address":"252645248","end_address":"252645251","mask":30,"netmask":"255.255.255.252","child1":null,"child2":null,"is_assigned":0,"is_swipped":0,"is_aggregate":1,"custid":4208,"resource_id":4208,"resource_name":"aSomeCoEntry","last_updated_time":"2017-11-20 12:35:08","description":null,"parent":79132,"rir":"ARIN","lir_id":null,"notes":null,"generic_code":null,"code":null,"region":"STL","region_name":"St. Louis","vlan":null,"arin_net_id":null,"arin_cust_id":null,"org_id":null,"arin_swip_time":null,"assigned_time":"2017-11-20 12:35:08","asn":null,"allowSubAssignments":true,"permissions":{"permissionIPAMRead":"1","permissionIPAMUpdate":"1","permissionIPAMCreate":"1","permissionIPAMDelete":"1","permissionSWIP":"1","permissionAdmin":"1"},"range":"15.15.15.128 - 15.15.15.131","tags":[],"attributes":{"custody_chain":"[]"}}}

ERROR

{'success':0, 'message':'error message'}

Required Parameters

Name

Type

Example

Description

block*

STRING

213.37.29.0/24

CIDR block description

id*

INTEGER

125

ID of the IP 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=overrideHolding&block=213.37.29.0/24&preview=true

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":"SomeCo 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 Parameters

None

Optional Parameters

Name

Type

Example

Description

preview

BOOL

true

Acceptable values: "true" or "false"

If set to "true", returns a list of blocks that would be removed from the holding tank, but does not complete the process holding tank action.

If set to "false", processes the holding tank and returns a list of blocks returned to available status.

Example URL

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


Reports

Mask Report

URL

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

Description

Returns a JSON report breakdown of by-mask use statistics

Returns

Examples:

SUCCESSFUL

{"success":1,"data":{"IPv4":{"total":576,"available":21,"assigned":555,"holding":0,"allocated":446,"prefixes":{"32":{"assigned_percentage":91.666666,"holding_percentage":0,"available_percentage":8.333333,"allocated_percentage":0,"total":12,"available":1,"assigned":11,"holding":0,"allocated":0},"31":{"assigned_percentage":100,"holding_percentage":0,"available_percentage":0,"allocated_percentage":30,"total":20,"available":0,"assigned":20,"holding":0,"allocated":6},"30":{"assigned_percentage":50,"holding_percentage":0,"available_percentage":50,"allocated_percentage":0,"total":8,"available":4,"assigned":4,"holding":0,"allocated":0},"29":{"assigned_percentage":100,"holding_percentage":0,"available_percentage":0,"allocated_percentage":20,"total":40,"available":0,"assigned":40,"holding":0,"allocated":8},"28":{"assigned_percentage":66.666666,"holding_percentage":0,"available_percentage":33.333333,"allocated_percentage":33.333333,"total":48,"available":16,"assigned":32,"holding":0,"allocated":16},"27":{"assigned_percentage":100,"holding_percentage":0,"available_percentage":0,"allocated_percentage":50,"total":64,"available":0,"assigned":64,"holding":0,"allocated":32},"26":{"assigned_percentage":100,"holding_percentage":0,"available_percentage":0,"allocated_percentage":100,"total":128,"available":0,"assigned":128,"holding":0,"allocated":128},"25":{"assigned_percentage":100,"holding_percentage":0,"available_percentage":0,"allocated_percentage":100,"total":256,"available":0,"assigned":256,"holding":0,"allocated":256}},"assigned_percentage":96.354166,"holding_percentage":0,"available_percentage":3.645833,"allocated_percentage":77.430555},"IPv6":{"total":16777216,"available":0,"assigned":16777216,"holding":0,"allocated":0,"prefixes":{"41":{"assigned_percentage":100,"holding_percentage":0,"available_percentage":0,"allocated_percentage":0,"total":16777216,"available":0,"assigned":16777216,"holding":0,"allocated":0}},"assigned_percentage":100,"holding_percentage":0,"available_percentage":0,"allocated_percentage":0}}}

ERROR

{ "success":0, "message":"error message" }

Required Parameters

None

Optional Parameters

Name

Type

Example

Description

resource_id

INTEGER

1234

Integer value of a Resource ID. If provided, the system will display an IPAM Mask Usage report limited to blocks associated with a single resource.

tags

STRING

"Customer"

Comma separated list of tags. If provided, limits the IPAM Mask Usage report to certain tags (standard tag mode).

regions

STRING

"DEN"

Comma separated list of regions. If provided, limits the IPAM Mask Usage Report to blocks associated with the provided region(s).

Example URL

/api/v1/api.php?target=ipam&action=maskReport&regions=DEN

IPAM SWIP

Deassign

URL

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

Description

Performs a SWIP deassignment for the indicated IPAM block. 

Returns

Examples:

SUCCESSFUL

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

ERROR

{ "success":0, "message":"error message" }

Required Parameters

Name

Type

Example

Description

blockId

INTEGER

1234

ID of the block to deassign

block

STRING

67.221.241.0/24

the CIDR of the block being de-assigned

resourceId

INTEGER

1234

ID of resource representing the customer to deassign

lirId

INTEGER

1234

The ProVision id of the LIR which is performing the de-assignment

entityHandle

STRING

CONNE-81

The Org ID for the LIR.

Optional Parameters

Name

Type

Example

Description

netName

STRING

6CONN-67-221-241-0-24

Optional name for the network to override the default. The default net name will be created using the Net Name Prefix and IP address for the block.

Example URL

/api/v1/api.php?target=ipam&action=deassign&resourceId=1234&blockId=1234&lirId=1234&entityHandle=CONNE-81&block=67.221.241.0/24&netName=6CONN-67-221-241-0-24

Get RIR List

URL

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

Description

Returns a list of all valid RIRs in the database.

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'}

Simple Reassign

URL

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

Description

ARIN SWIP - simple reassign. Creates an ARIN customer record for the assigned resource and reassigns the block to the ARIN customer record.

Returns

Examples:

SUCCESSFUL

{ "success":1,"message":"Sent ARIN SWIP with action simpleReassign for 67.221.244.0/28 for Acme, Message: Success" }

ERROR

{ "success":0, "message":"error message" }

Required Parameters

Name

Type

Example

Description

blockId

INTEGER

1234

ID of the block to reassign

resourceId

INTEGER

1234

ID of resource representing the customer to reassign to

lirId

INTEGER

1234

The ProVision id of the LIR to use for reassignment

entityHandle

STRING

CONNE-81

The Org ID for the LIR.

Optional Parameters

Name

Type

Example

Description

netName

STRING

NET-ACME-67-221-244-0-28

Optional name for the network to override the default. The default net name will be created using the Net Name Prefix and IP address for the block.

Example URL

/api/v1/api.php?target=ipam&action=simpleReassign&resourceId=121&blockId=31559&lirId=95&entityHandle=CONNE-81&&netName=NET-ACME-67-221-244-0-28

 

IPAM API Calls Subject to Change

Calls below this point are subject to change, and are not recommended for use in production code. 


Get Attribute List

URL

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

Description

Returns a list of attributes

Returns

Examples:

SUCCESSFUL

{"asns":[],"masks":["24"],"rirs":["1918"],"lirs":[],"tags":["DHCP"],"codes":[],"vlans":[],"regions":["Quito"],"resources":[{"id":"1302","name":"Quito Lab 1","slug":"quito-lab-1","type":"dhcp_pool","parent_id":"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

Name

Type

Example

Description

id

INTEGER

125

ID of the IP block

Optional Parameters

None

Example URL

/api/v1/api.php?target=ipam&action=getAttributeLists&id=125