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,"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
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

...

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,"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
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 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

...

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

totalBlocks":

""

1,

"totalHosts": "256",

"hostsAssigned": 0,

"hostsAllocated": "

144

256",

"hostsAvailable": "

112"

256",

"hostsInHolding": 0,

"availablePercentage": "

43

100.

7

00",

"assignedPercentage": "

56

0.

2

00",

"allocatedPercentage": "

56

100.

2

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

...