Summary:
List IPAM networks, and create a new network.
URL:
http(s)://{server hostname}/api/ipam/network
Methods summary
- GET Method - returns a list of IPAM networks.
- POST Method - creates a new network.
GET Method detail
Returns a list of IPAM networks.
Response:
Name | Description |
---|---|
id | ID of the network. |
name | user-specified name of the network. |
ipRange | IP range of the network. |
role |
role of the network, one of the following:
|
zoneId |
zone ID if applicable. Note:
|
description | user-specified description of the network. |
dhcpServer | name of the DHCP server assigned to this network, if applicable. |
scans | which scans are being used for this network, if any. |
parentId | ID of the parent network, if applicable |
usageMedium | % threshold value in which the usage will be yellow, by default a global value. |
usageHigh | % threshold value in which the usage will be red, by default a global value. |
skipNetwork | if the network is to be skipped for scanning ('don't scan network/address broadcast' in the UI), either 'true' or 'false'. |
activeIps | number of scanned IPs that are active. |
totalIps | total number of IPs covered by the network range. |
conflict | names of other scopes that conflict with this one. |
conflictTimestamp | timestamp of the conflict. |
children | number of children of the network, if applicable. |
fullPath |
full path of IP range hierarchy to this network, useful for when networks have the same name but different parents, e.g. in the case of two networks both called 'test': parent 1/test parent 2/test |
exceedsUsage | if the activeIps % exceeds the 'usageHigh' threshold. |
Example:
INPUT
curl -u admin:admin https://localhost/api/ipam/network?media=json
OUTPUT
[ {
"id" : 1,
"name" : "test",
"ipRange" : "10.44.2.0/24",
"role" : 0,
"zoneId" : 0,
"description" : "",
"dhcpServer" : 0,
"scans" : 3,
"parentId" : 0,
"usageMedium" : 0,
"usageHigh" : 0,
"skipNetwork" : true,
"activeIps" : 124,
"totalIps" : 256,
"conflict" : null,
"conflictTimestamp" : 0,
"children" : [ ],
"fullPath" : "test",
"exceedsUsage" : false,
} ]
POST Method detail
Create a new network.
Request:
Same as 'GET Method - Response' above.
Response:
"OK" if successful.
Example:
INPUT
curl -u admin:admin https://localhost/api/ipam/network?media=json -X POST -H "content-type:application/json" -d \
'{
"name" : "test2",
"ipRange" : "10.44.3.0/24",
"role" : 0,
"zoneID" : 0,
"description" : "",
"dhcpServer" : 0,
"scans" : 0,
"parentID" : 0,
"usageMedium" : 0,
"usageHigh" : 0,
"skipNetwork" : true
}'
OUTPUT
{
"message" : "OK"
}
Comments
0 comments
Please sign in to leave a comment.