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

Compare with Current View Page History

« Previous Version 2 Next »

IP Address Management (IPv4 and IPv6)

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 block found', 'data': [{"id":"14035", "oct1":"67", "oct2":"221", "oct3":"241", "oct4":"0", "mask":"24", "child1":null, "child2":null, "is_assigned":"1", "is_swipped":null, "is_aggregate":"1", "custid":"1024", "last_updated_time":"2012-04-19 16:45:01", "description":null, "parent":1034, "rir":"ARIN", "notes":null, "generic_code":"Code X", "region":"SFO", "vlan":100, "arin_net_id":null, "arin_cust_id":null, "arin_swip_time":"2012-04-13 17:49:27", "assigned_time":"2012-04-19 16:45:01"}]}
ERROR{'success':0, 'message':'error message'}
Required Parameters
NameTypeExampleDescription
typeSTRINGIPAcceptable values are "IP" or "IPv6"
Optional Parameters
NameTypeExampleDescription
allowSubAssignmentsBOOLtrueFilters blocks based on wether they allow sub-assignments or not. Acceptable values: "true" or "false"
blockSTRING213.37.29.0/24CIDR block description
codeSTRING User-defined block code as defined in Admin-IPAM settings: Generic Code Per Block Name
idINTEGER1234The ID of the block
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"
maskINTEGER24Integer bitmask
regionSTRINGSFOThe value from the list of name/value pairs which make up the list of available regions
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.
resourceIdINTEGER The ID of the resource the block is assigned to
rirSTRINGARINAcceptable values: ARIN, RIPE, APNIC, AfriNIC
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
ReturnsExamples:
SUCCESSFUL: {'success':1, 'id':'12345'}
ERROR: {'success':0, 'message':'unable to add block'}>
Required Parameters
NameTypeExampleDescription
blockSTRING213.37.29.0/24CIDR block description
rirSTRINGARINAcceptable values: ARIN, RIPE, APNIC, AfriNIC
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"
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=ARIN
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:

SUCCESSFUL{"success":1,"message":"Update Successful."}
ERROR{'success':0, 'message':'error message'}
Required Parameters
NameTypeExampleDescription
idint125ID of the IP block
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"
codeSTRING Arbitrary user-defined block code
notesSTRINGWordsMisc. Notes
regionSTRINGChicago, ILThe region this IP block is assigned to.
rirSTRINGARINThe RIR
vlanNUMERIC50000 
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."}
ERROR{'success':0, 'message':'error message'}
Required Parameters
NameTypeExampleDescription
idint125ID of the block
tagSTRINGCustomerThe tag to add
Delete Tag
URL/api/v1/api.php?target=ipam&action=deleteTag&id=13420&tag=Prod
DescriptionRemoves a tag from an IP block.
Returns

Examples:

SUCCESSFUL{"success":1,"message":"Tag Removed."}
ERROR{'success':0, 'message':'error message'}
Required Parameters
NameTypeExampleDescription
idint125ID of the block
tagSTRINGCustomerThe tag to delete
Smart Assign
URL/api/v1/api.php?target=ipam&action=smartAssign
DescriptionSelects a block based on supplied parameters (rir, tags, etc.) and assigns to an Resource Holder.
ReturnsExamples:
SUCCESSFUL: {'success':1, 'id':'12345'}
ERROR: {'success':0, 'message':'Unable to assign block'}
Required Parameters

24

NameTypeExampleDescription
maskINTEGER The size of the block to be assigned
rirSTRINGARINAcceptable values: ARIN, RIPE, APNIC, AfriNIC
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
typeSTRING"IPv4" or "IPv6"The type of block to assign
*Either resourceHolderId or resourceId can be used, but only one must be provided
Optional Parameters
NameTypeExampleDescription
tagsSTRINGcustomer,vpnComma separated string of tags
regionSTRINGAshburnRegion to assign from
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
ReturnsExamples:
SUCCESSFUL: {'success':1, 'message':'213.37.29.0/24 assigned to SJS-0031', 'id':'12345'}
ERROR: {'success':0, 'message':'Unable to assign block'}
Required Parameters
NameTypeExampleDescription
block*STRING213.37.29.0/24CIDR block description
id*int125ID of the IP block
*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
*Either resourceHolderId or resourceId can be used, but only one must be provided
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
ReturnsExamples:
SUCCESSFUL: {'success':1, 'message':'213.37.29.0/24 unassigned', 'id':'12345'}
ERROR: {'success':0, 'message':'213.37.29.0/24 was not found'}
Required Parameters
NameTypeExampleDescription
block*STRING213.37.29.0/24CIDR block description
id*int125ID of the IP block
*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
getTagList
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'}
getRIRList
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'}
getRegionList
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":[{"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'}
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,"message":"","totalHosts":"88","hostsAssigned":"16","hostsAvailable":"72","availablePercentage":81.8,"assignedPercentage":18.2,"allocatedPercentage":18.2,"totalBlocks":11,"blocksAssigned":2,"blocksAvailable":9}
ERROR{'success':0, 'message':'error message'}
Required Parameters
NameTypeExampleDescription
idint125ID of the IP block.
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.
    
  • No labels