Summary:
List information about DHCP servers, and add a new DHCP server.
URL:
http(s)://{server hostname}/api/ipam/dhcp
Methods summary
- GET Method - lists DHCP servers.
- POST Method - creates a new DHCP server.
GET Method detail
Returns a list of DHCP servers.
Response:
Response includes a list of DHCP servers. Each server has following attributes.
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. |
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?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" : null
} ]
POST Method detail
Adds a new DHCP server.
Request:
Name | Description |
---|---|
name | user-specified name of the DHCP server. |
ipAddress | IP address of the DHCP server. |
zoneId | zone of the DHCP server, if applicable. |
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:
'OK' if successful.
Example:
INPUT
curl -u admin:admin https://localhost/api/ipam/dhcp?media=json -X POST -H "content-type:application/json" -d \
{
"name" : "testServer2",
"ipAddress" : "10.44.2.37",
"zoneId" : 0,
"type" : 2,
"credId" : 2,
"port" : 0
}
OUTPUT
{
"message" : "OK"
}
Comments
0 comments
Please sign in to leave a comment.