Table of Contents
DHCPv2 Module
...
get all DHCP-enabled resources | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Finds all resources from section 'dhcp_module,' which indicates that their parents are DHCP-enabled. Adding in other Resource-Get API parameters can filter this list further. | ||||||||||||||||||||||||||||||||||||||||
URL | /api/v1/api.php?target=resource&action=get&type=dhcp_module | ||||||||||||||||||||||||||||||||||||||||
Returns | Examples:
Return Detail:
Attributes:
|
create a new DHCP-enabled resource | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | A resource becomes a DHCP-enabled by adding a special "dhcp_module" resource as a child. This action is identical to a normal Resource Create command. | |||||||||||||||||||||||||
URL | /api/v1/api.php?target=resource&action=add&meta[type]=dhcp_module&meta[name]=2163 DHCP Module&meta[parent_id]=2163 | |||||||||||||||||||||||||
Returns | Examples:
Return Detail:
|
update a DHCP-enabled resource with new configuration info | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Modifying an existing dhcp_module uses the identical commands as all other Resource-Update actions. An example of configuring a DHCP server is given below. | |||||||||||||||||||||||||||||||
URL | /api/v1/api.php?target=resource&action=update&meta[id]=2178 &meta[type]=dhcp_module&fields[_dhcp_attributes][]={"type":"ISC","notes":"notes go here","username":"username","port":"port","config_test":"/etc/init.d/dhcpd configtest","server_stop":"/etc/init.d/dhcpd stop","server_start":"/etc/init.d/dhcpd start","config_path":"/tmp/dhcpd.conf","option_routers":"192.168.0.0","option_domain_name_servers":"ns1.6connect.com","option_domain_name":"6connect.com","authoritative":"1","default_lease_time":"600","max_lease_time":"7200","local_port":"67","log_facility":"local7","password":"password","server_ip":"192.168.0.1","freeLines":3,"freeLine1":"free line 1","freeLine2":"free line 2","freeLine3":"free line 3"} | |||||||||||||||||||||||||||||||
Returns | Examples:
Return Detail:
Attributes:
|
Data Attributes
remove DHCP functionality from a resource | |||||
---|---|---|---|---|---|
Description | To remove DHCP functionality, delete the dhcp_module child resource. This operation uses general Resource->Delete functionality. | ||||
URL | /api/v1/api.php?target=resource&action=delete&id=2166 | ||||
Returns | Examples:
|
get all DHCP Pools | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | As with the dhcp_module commands, the API endpoints governing DHCP IP Pools use the general Resource system. All the modifiers that can be applied to a Resource-Get can be used to filter this query. | |||||||||||||||||||||||||||||||||||||||||||
URL | /api/v1/api.php?target=resource&action=get&type=dhcp_pool | |||||||||||||||||||||||||||||||||||||||||||
Returns | Examples:
Return Detail:
Attributes:
|
create a new DHCP Pool resource | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | Uses the general Resource-Add endpoint to create a DHCP Pool resource. | |||||||||||||||||||||||||
URL | /api/v1/api.php?target=resource& action=add& meta[type]=dhcp_pool& meta[name]=New Subnet& fields[_dhcp_type][]=host& fields[_dhcp_pool_attributes][]={"mac":"aa:bb:cc:dd:ee:ff", "rangeStart":"", "rangeEnd":"", "freeLines":3, "freeLine1":"Free Line 1", "freeLine2":"Free Line 2", "freeLine3":"Free Line 3"} | |||||||||||||||||||||||||
Returns | Examples:
Return Detail:
|
Data Attributes
_dhcp_attributes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | The _dhcp_attributes data attribute holds the specific settings used to generate a DHCP configuration file, place it on a server via SCP, and restart that server via a SSH session. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example: | {"type":"ISC", "notes":"notes here", "username":"username", "port":"22", "config_test":"/etc/init.d/dhcpd configtest", "server_stop":"/etc/init.d/dhcpd stop", "server_start":"/etc/init.d/dhcpd start", "config_path":"/tmp/dhcpd.conf", "option_routers":"", "option_domain_name_servers":"", "option_domain_name":"", "authoritative":"1", "default_lease_time":"600", "max_lease_time":"7200", "local_port":"67", "log_facility":"local7", "password":"", "server_ip":"10.0.0.0", "freeLines":0} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Data Description
|
_dhcp_pool_attributes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description | A JSON-encoded string containing all the specific configuration parameters which govern this DHCP Pool. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example: | {"mac":"ab:cc:de:ff:aa:bc","rangeStart":"13.0.0.0","rangeEnd":"13.0.0.255","freeLines":1,"freeLines1":"free line"} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Data Description
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
_dhcp_attributes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description | The _dhcp_attributes data attribute holds the specific settings used to generate a DHCP configuration file, place it on a server via SCP, and restart that server via a SSH session. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Example: | {"type":"ISC", "notes":"notes here", "username":"username", "port":"22", "config_test":"/etc/init.d/dhcpd configtest", "server_stop":"/etc/init.d/dhcpd stop", "server_start":"/etc/init.d/dhcpd start", "config_path":"/tmp/dhcpd.conf", "option_routers":"", "option_domain_name_servers":"", "option_domain_name":"", "authoritative":"1", "default_lease_time":"600", "max_lease_time":"7200", "local_port":"67", "log_facility":"local7", "password":"", "server_ip":"10.0.0.0", "freeLines":0} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Data Description
|
Children Display