Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Add

URL/api/v1/api.php?target=ipam&action=add
DescriptionAdds an IPv4 or IPv6 block
Returns

Examples:

SUCCESSFUL
:
{
'
"success
'
":1,
'id':'12345'}
"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" }

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

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":"Update Successful."}"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" ERROR{'success':0, 'message':'error message' }
Required Parameters
NameTypeExampleAllow MultipleDescription
idINTEGER125YesID of the IP block. Multiple block IDs can be specified in a comma-separated list.
blockSTRING192.0.0.0/24YesCIDR or the block. Multiple CIDRs can be specified in a comma-separated list.
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 Arbitrary user-defined block code
lirIdINTEGER The numeric ID of an LIR resource the block should be linked to
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.", "data":{ "id":12345, "cidr":192.168.0.0/24", ...} }
ERROR{ '"success'":0, '"message'":'"error message'" }
Required Parameters
NameTypeExampleDescription
idINTEGER125125ID of the block
blockSTRING192.0.0.0/24CIDR ID of the block
*Either block or id can be used, but only one must be provided
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.", "data":{ "id":12345, "cidr":192.168.0.0/24", ...} }
ERROR{ '"success'":0, '"message'":'"error message'" }
Required Parameters
NameTypeExampleDescriptionDescription
idINTEGER125ID of the block
blockSTRING192.0.0.0/24CIDR idINTEGER125ID of the block
*Either block or id can be used, but only one must be provided
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.
Returns

Examples:

SUCCESSFUL
: {'success':1, 'id':'12345'}
ERROR: {'success':0, 'message':'Unable to assign block'}
{ "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 ParametersRequired Parameters24
*Either resourceHolderId or resourceId can be used, but only one must be provided
NameTypeExampleDescription
codeSTRINGCode XArbitrary user-defined block code
maskINTEGER The size of the block to be assigned
rirSTRINGARINAcceptable values: ARIN, RIPE, APNIC, AfriNIC
resourceId*INTEGER Integer 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.
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.
typeSTRING"IPv4" or "IPv6"The type of block to assignto assign
Optional Parameters
NameTypeExampleDescription
tagsSTRINGcustomer,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

Examples:

 

SUCCESSFUL
: {'success'
SINGLE BLOCK{ "success":1,
'
"message
':'213.37.29SUCCESSFUL Multiple Assignments:
":"Assigned 192.168.0.0/24
assigned to SJS-0031', 'id':'12345'}
to Resource (1234)", "id":12345, "data":{ "id":12345, "cidr":192.168.0.0/24", ...} }
SUCCESSFULMULTIPLE BLOCKS
{ "success":1,"message":"Assigned
3
5 blocks to
Worcester Telegram & Gazette
Resource (1234) via Direct Assign", "data":{ "ids":[
10001
12345, 12346,
10021
12347,
10031
...] } }
ERROR
:
 {
'
"success
'
":0,
'
"message
':'Unable to assign block'
":"error message" }


Required Parameters
*Either resourceHolderId or resourceId can be used, but only one must be provided
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
'
":
'213
"192.
37
168.
29
0.0/24 unassigned
', 'id':'12345'}
ERROR: {'success':0, 'message':'213.37.29.0/24 was not found'
", "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
Example URL/api/v1/api.php?target=ipam&action=unassign&block=213.37.29.0/24

...

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.
Example URLshttps://ops.6connect.com/qa-4.1/api/v1/api.php?target=ipam&action=utilization&id=23131
Returns

Examples:

SUCCESSFUL
{
"success":1,
"message":"",
"totalHosts":"256",
"hostsAssigned":"144",
"hostsAvailable":"112",
"availablePercentage":"43.7",
"assignedPercentage":"56.2",
"allocatedPercentage":"56.2"
}
ERROR{'success':0, 'message':'error message'}
Required Parameters
NameTypeExampleDescription
block*STRING213.37.29.0/24CIDR block description
id*intINTEGER125ID 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.

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
idint125ID of the IP block.
Optional Parameters
NameTypeExampleDescription
maskint24Auto aggregate the block back to this mask size. Note all blocks up this mask size must be Available or call will fail.
block*STRING213.37.29.0/24CIDR block. Only the block id OR the block CIDR can be specified. Not both.

...