Versions Compared

Key

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

...

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,

"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
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 URLs/api/v1/api.php?target=ipam&action=getHostUtilizaitongetHostUtilization&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=getHostUtilization&type=ipv4&tags=["Customer","PTP"]

...