Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 8.0.0

Table of Contents

IP Address Management (IPv4 and IPv6)

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

Table of Contents

IP Block Management

Examples:

Get

URL/api/v1/api.php?target=ipam&action=get
DescriptionReturns 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 ParametersNone
Optional Parameters


NameTypeExampleDescription
addressINTEGER1125449728IP address of the block in decimal format
asnINTEGER1000Filters blocks based on their ASN
allowSubAssignmentsBOOLtrueFilters blocks based on wether they allow sub-assignments or not. Acceptable values: "true" or "false"
blockSTRING213.37.29.0/24CIDR block description
codeSTRING Code XUser-defined block code as defined in Admin-IPAM settings: Generic Code Per Block Name
endAddressINTEGER1125453823End IP address of the block in decimal format
idINTEGER1234The ID of the block
includeAttributesBOOLtrueAllows loading and display of the attributes for all of the blocks in the collection.
isAggregateBOOLtrueIndicates if the block has been split into children or not. A value of 'true' will return blocks with no children.
isAssignedBOOLtrueAcceptable values: "true" or "false"
isSwippedBOOLtrueAcceptable values: "true" or "false"mask
lastUpdateTimeINTEGER24Integer bitmask
regionSTRINGSFOThe value from the list of name/value pairs which make up the list of available regions
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.
lirIdINTEGER101The numeric ID of an LIR resource the block should be linked to
maskINTEGER24Integer bitmask
notesSTRINGnote123Returns blocks with exact matches in the notes field against the provided "notes" string.
regionSTRINGSFOThe value from the list of name/value pairs which make up the list of available regions
resourceHolderIdSTRING
cust-001

(Deprecated: Use resourceQuery instead)

A custom ID which can be used to link resources

resourceHolderIdSTRING6c-1234The 20 character resource holder ID. This is an internal short identifier for the customer, and should be used to link resource holder details

in the 6Connect database back to your organization.

Consider using internal customer numbers or department numbers for this field depending on your use case. Example: Customer-001 or 000213.

resourceIdINTEGER1234resourceIdINTEGER The ID of the resource the block is assigned to
resourceQueryJSON 


{"

custom

parent_id":

"cust-001"} 

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.
rirSTRINGARINAcceptable values: ARIN, RIPE, APNIC, AfriNIC, LACNIC, 1918
searchSTRING192.168If a search term is provided, all IPAM fields including assigned Resource Holder name will be checked with a LIKE comparison to find matching blocks
selectCountINTEGER50# of blocks to get
selectOffsetINTEGER25Offset for results set; useful for paging (e.g. selectCount = 50, selectOffset = 100 would return the 3rd page of 50 results)
sortFieldSTRINGcidrAttribute to sort blocks by. Accepable values: cidr, mask, rir, vlan, code, updateTime
sortOrderINTEGERASCASC or DESC
tagsSTRINGcustomer,vpnComma-separated list of tags
topAggregateIdINTEGER1234The ID of the aggregate block to which the block belongs
vlanINTEGER123VLAN 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
DescriptionAdds an IPv4 or IPv6 block
Returns
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" }
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.
tagsModeSTRING"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".

topAggregateIdINTEGER1234The ID of the aggregate block to which the block belongs
typeSTRING"ipv4" or "ipv6"IP type
vlanINTEGER123VLAN 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
DescriptionAdds 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


NameTypeExampleDescription
blockSTRING213.37.29.0/24CIDR block description
rirSTRINGARINAcceptable values: ARIN, RIPE, APNIC, AfriNIC, LACNIC, 1918


Optional Parameters


NameTypeExampleDescription
allowDuplicateBOOLtrueAllow the creation of duplicate blocks. The default behavior is to reject duplicates.
allowSubAssignmentsBOOLtrueDoes 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"
asnINTEGER1000ASN for the block
codeSTRINGCode XUser-defined block code as defined in Admin-IPAM settings: Generic Code Per Block Name
regionSTRINGSFOThe value from the list of name/value pairs which make up the list of available regions
resourceIdINTEGER1234The ID of the resource the block is assigned to
tagsSTRINGcustomer,vpnComma-separated list of tags
vlanINTEGER123VLAN for the block


Example URL/api/v1/api
Required Parameters
NameTypeExampleDescription
blockSTRING213.37.29.0/24CIDR block description
rirSTRINGARINAcceptable values: ARIN, RIPE, APNIC, AfriNIC
Optional Parameters
NameTypeExampleDescription
allowDuplicateBOOLtrueAllow the creation of duplicate blocks. The default behavior is to reject duplicates.
allowSubAssignmentsBOOLtrueDoes 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"
asnINTEGER1000ASN for the block
codeSTRING User-defined block code as defined in Admin-IPAM settings: Generic Code Per Block Name
notesSTRING Notes or description for the block
regionSTRINGSFOThe value from the list of name/value pairs which make up the list of available regions
tagsSTRINGcustomer,vpnComma-separated list of tags
vlanINTEGER123VLAN for the block
Example URL/api/v1/api.php?target=ipam&action=add&rir=block=213.37.29.0/24&rir=ARIN


delete

Update

URL/api/v1/api.php?target=ipam&action=update&type=IP&ipid=13420&rir=RIPE
DescriptionUpdates detail data about an IP block.
Returns

Examples:

SUCCESSFULSINGLE BLOCK{"success":1,"message":"Block 192.168.0.0/24 (12345) updated", "data":{ "id":12345, "cidr":192.168.0.0/24", ...} }
SUCCESSFULMULTIPLE 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


NameTypeExampleAllow MultipleDescription
id*INTEGER125YesID of the IP block. Multiple block IDs can be specified in a comma-separated list.
block*STRING192.0.0.0/24YesCIDR 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


NameTypeExampleDescription
allowSubAssignmentsBOOLtrueDoes 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"
asnINTEGER1000ASN for the block
codeSTRING Code XArbitrary user-defined block code
lirIdINTEGER 101The numeric ID of an LIR resource the block should be linked to
notesSTRINGWordsMisc. Notes
regionSTRINGChicago, ILThe region this IP block is assigned to.
propagateBOOLtruePropagates all attribute values to any smaller child blocks of the block being updated. Available in version 5.1.0
rirSTRINGARINThe RIR
vlanNUMERIC50000 

Delete

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

Customer, vpn

Comma-separated list of tags

tags_actionSTRINGreplaceWhat 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
vlanNUMERIC123VLAN 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
id=12345DescriptionDeletes 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


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


Delete TagdeleteTag13420Prod

Add Tag

URL/api/v1/api.php?target=ipam&action=addTag&id=13420&tag=Infra
DescriptionAdds 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


NameTypeExampleDescription
id*INTEGER125ID of the block
block*STRING192.0.0.0/24CIDR of the block
*Either block or id can be used, but only one must be provided
tagSTRINGCustomerThe tag to add


Optional ParametersNone
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
DescriptionRemoves a DescriptionRemoves 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


NameTypeExampleDescription
id*INTEGER125ID of the block
block*STRING192.0.0.0/24CIDR of the block
*Either block or id can be used, but only one must be provided
tagSTRINGCustomerThe tag to delete


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


Examples:

 

Smart Assign

URL/api/v1/api.php?target=ipam&action=smartAssign
DescriptionSelects a block based on supplied parameters (rir, tags, mask size, etc.) and assigns it to an 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


Arbitrary user-defined block codeThe ID of an LIR resource  
NameTypeExampleDescriptioncodeSTRINGCode X
maskINTEGER 24The size of the block to be assignedlirIdINTEGER 
rirSTRINGARINAcceptable values: ARIN, RIPE, APNIC, AfriNIC, LACNIC, 1918
resourceId*INTEGER 1234Integer ID of the resource to assign the block to
resourceHolderIdSTRING6c-1234The 20 character resource holder ID. This is an internal short identifier for the customer, and should be used to link resource holder details in the 6Connect database back to your organization. Consider using internal customer numbers or department numbers for this field depending on your use case. Example: Customer-001 or 000213.
resourceQuery*JSONresourceQueryJSON


{"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
resourceHolderIdSTRING
cust-001

(Deprecated: Use resourceQuery instead)

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

typeSTRING"IPv4typeSTRING"IPv4" or "IPv6"The type of block to assign


Optional Parameters*


tags
NameTypeExampleDescription
assignedResourceIdSTRINGcustomer,vpnComma separated string of tags
regionSTRINGAshburnRegion to assign from
assignedToResourceINTEGER1234Used to Smart Assign out of a block which is already assigned to another resource and allows sub assignment
Example URL/api/v1/api.php?target=ipam&action=smartAssign&mask=24&resourceHolderId=SJS-0031&rir=ARIN&tags=customer,vpn

Direct Assign

URL/api/v1/api.php?target=ipam&action=directAssign
DescriptionAssigns a block to an Resource Holder
Returns
SUCCESSFULSINGLE BLOCK{ "success":1,"message":"Assigned 192.168.0.0/24 to Resource (1234)", "id":12345, "data":{ "id":12345, "cidr":192.168.0.0/24", ...} }
SUCCESSFULMULTIPLE BLOCKS{ "success":1,"message":"Assigned 5 blocks to Resource (1234) via Direct Assign", "data":{ "ids":[12345, 12346, 12347, ...] } }
ERROR  { "success":0, "message":"error message" }
"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.
codeSTRINGCode XArbitrary user-defined block code
lirIdINTEGER101The ID of an LIR resource
regionSTRINGAshburnRegion to assign from
tagsSTRINGcustomer,vpnComma separated string of tags. Matches blocks which have at least the set of tag specified by this parameter
tagsModeSTRING"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".

vlanINTEGER1023VLAN 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
DescriptionAssigns a block to an Resource Holder
Returns

Examples:


SUCCESSFULSINGLE BLOCK{ "success":1,"message":"Assigned 192.168.0.0/24 to Resource (1234)
Required Parameters
NameTypeExampleDescription
block*STRING213.37.29.0/24CIDR block description
id*INTEGER125ID 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 The 20 character resource holder ID. This is an internal short identifier for the customer, and should be used to link resource holder details in the 6Connect database back to your organization. Consider using internal customer numbers or department numbers for this field depending on your use case. Example: Customer-001 or 000213.
resourceId*INTEGER Integer ID of the resource to assign the block to
resourceQueryJSON

 

{"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.
Example URL/api/v1/api.php?target=ipam&action=directAssign&block=213.37.29.0/24&resourceHolderId=SJS-0031

Unassign

URL/api/v1/api.php?target=ipam&action=unassign
DescriptionReclaims 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", ...} }
SUCCESSFULERRORMULTIPLE BLOCKS{ "success":01,"message":"error message" }"Assigned 5 blocks to Resource (1234) via Direct Assign", "data":{ "ids":[12345, 12346, 12347, ...] } }
ERROR
{ "success":0, "message":"error message" }


Required Parameters


NameTypeExampleDescription
block*STRING213.37.29.0/24CIDR block description
id*INTEGER125ID 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
Example URL/api/v1/api.php?target=ipam&action=unassign&block=213.37.29.0/24

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 List

URL/api/v1/api.php?target=ipam&action=getRIRList
DescriptionReturns 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'}
resourceHolderId**STRING
cust-001

(Deprecated: Use resourceQuery instead)

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

resourceId**INTEGER1234Integer 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*


NameTypeExampleDescription
codeSTRINGCode XArbitrary user-defined block code
lirIdINTEGER101The ID of an LIR resource
regionSTRINGAshburnRegion to assign from
rirSTRINGARIN

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

tagsSTRINGcustomer,vpnComma separated string of tags. Matches blocks which have at least the set of tag specified by this parameter
tagsModeSTRING"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".

vlanINTEGER1023VLAN 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
DescriptionReclaims 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


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
skipHoldingBOOLtrue

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

Get Regions List

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

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

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


utilization

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


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
autoSplitToMaskINTEGER24Auto aggregate the block back to this mask size. Note all blocks up this mask size must be Available or call will fail.
autoSplitLimitINTEGER4A number the power of 2 (^2).


Example

Get Utilization

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


https://ops.6connect.com/qa-4.1utilization&id=23131

Scan Block

URLExample URLs/api/v1/api.php?target=ipam&action=
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'}
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


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/api/v1/api.php?target=ipam&action=scanBlock&block=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
maskint24The specific mask size to retrieve utilization for. If using this parameter, the id parameter should be the id of the aggregate.

Get Host Utilization

URL/api/v1/api.php?target=ipam&action=getHostUtilization
DescriptionGets the host utilization statistics with support for filters.
Example URLshttps://ops.6connect.com/qa-4.1/api/v1/api.php?target=ipam&action=getHostUtilizaiton&tags=["Customer","PTP"]&region=SMF


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

Get Host Utilization

URL/api/v1/api.php?target=ipam&action=getHostUtilization
DescriptionGets the host utilization statistics with support for filters.
Example URLs/api/v1/api.php?target=ipam&action=getHostUtilizaiton&tags=["Customer","PTP"]&region=SMF
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
NameTypeExampleDescription
typeSTRING"ipv4" or "ipv6"IP type
Optional Parameters
NameTypeExampleMultiple Values
codeSTRING"code-1"Yes
regionSTRING"SFO"Yes
tagsSTRING"Customer"Yes
vlanINT1000Yes

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=getHostUtilizationgetOptions&type=ipv4&tags=["Customer","PTP"]id=125