Summary:
List details of a specified network, modify the settings of a specified network, and delete a specified network.
URL:
http(s)://{server hostname}/api/ipam/network/{id}
Methods summary
- GET Method - returns details of a specified network.
- PUT Method - modifies a specified network.
- DELETE Method - delete a specified network.
GET Method detail
Returns details about a specified network.
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/6?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,
}
PUT Method detail
Modifies the settings of a specified network.
Request:
Same as 'GET Method - Request' above.
Response:
Updated network settings.
Example:
INPUT
curl -u admin:admin https://localhost/api/ipam/network/6?media=json -X PUT -H "content-type:application/json" -d \
'{
"name" : "test",
"ipRange" : "10.44.2.0/26",
"role" : 0,
"zoneID" : 0,
"description" : "",
"dhcpServer" : 0,
"scans" : 3,
"parentID" : 0,
"usageMedium" : 0,
"usageHigh" : 0,
"skipNetwork" : true
}'
OUTPUT
{
"id" : 1,
"name" : "test",
"ipRange" : "10.44.2.0/26",
"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,
}
DELETE Method detail
Deletes the specified network.
Response:
'OK' if successful.
Example:
INPUT
curl -u admin:admin https://localhost/api/ipam/network/6?media=json -X DELETE
OUTPUT
{
"message" : "OK"
}
Comments
0 comments
Please sign in to leave a comment.