Summary:
List information about, modify, or delete a specific DHCP server.
URL:
http(s)://{server hostname}/api/ipam/dhcp/{serverId}
Methods summary
- GET Method - returns information about the specified DHCP server.
- PUT Method - modifies DCHP server.
- DELETE Method - deletes DHCP server.
GET Method detail
Returns information about the specified DHCP server.
Response:
Name | Description |
---|---|
id | unique ID of the DHCP server. |
name | user-specified name of the DHCP server. |
ipAddress | IP address of the DHCP server. |
zoneID | zone of the DHCP server, if applicable. This column is hidden if there are no zones. |
type | type of DHCP server, either 0 (Windows (WinRM)) or 1 (ISC (SSH)). |
credId | ID of the shared credential set used for the DHCP server. |
port | port used to connect to the DHCP server. |
lastScanned | timestamp of the last scan on the DHCP server. |
status |
current status of the connection to the server, one of the following:
|
(scope) name | name of the IP range. |
ipRange | IP range of the scope. |
active | if the IP range is active, either 'true' or 'false'. |
Example:
INPUT
curl -u admin:admin https://localhost/api/ipam/dhcp/6?media=json
OUTPUT
{
"id" : 1,
"name" : "testServer",
"ipAddress" : "10.44.2.49",
"zoneID" : 0,
"type" : 1,
"credID" : 1,
"port" : 0,
"lastScanned" : 0,
"status" : 0,
"scopes" : [
"name" : "testScope",
"ipRange" : "10.44.1.0-10.44.1.255",
"active" : true
]
}
PUT Method detail
Modifies details of the specified DHCP server.
Request:
Name | Description |
---|---|
id | unique ID of the DHCP server. |
name | user-specified name of the DHCP server. |
ipAddress | IP address of the DHCP server. |
zoneID | zone of the DHCP server, if applicable. This column is hidden if there are no zones. |
type | type of DHCP server, either 0 (Windows (WinRM)) or 1 (ISC (SSH)). |
credId | ID of the shared credential set used for the DHCP server. |
port | port used to connect to the DHCP server. |
Response:
Detailed information about the DHCP server after changes, as the 'GET Method' above would return it.
Example:
INPUT
curl -u admin:admin https://localhost/api/ipam/dhcp/6?media=json -X PUT -H "content-type:application/json" -d \
'{
"id" : 1,
"name" : "testServer2",
"ipAddress" : "10.44.2.49",
"zoneID" : 0,
"type" : 1,
"credID" : 1,
"port" : 0
}'
OUTPUT
{
"id" : 1,
"name" : "testServer2",
"ipAddress" : "10.44.2.49",
"zoneID" : 0,
"credID" : 1,
"port" : 0,
"lastScanned" : 0,
"status" : 0,
"scopes" : [
"name" : "testScope",
"ipRange" : "10.44.1.0-10.44.1.255",
"active" : true
]
}
DELETE Method detail
Deletes the specified DHCP server.
Response:
'OK' if successful.
Example:
INPUT
curl -u admin:admin https://localhost/api/ipam/dhcp/6?media=json -X DELETE
OUTPUT
{
"message" : "OK"
}
Comments
0 comments
Please sign in to leave a comment.