You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 2
Next »
DHCPv2 Module
The DHCPv2 system is built upon the Resource API, so actions relating to DHCP tasks are largely expressed in terms of Resource actions.
This section describes common DHCP tasks and how they are accomplished via the DHCPv2 system.
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: SUCCESSFUL: | {"success":1,"message":"Search successful","data":[{"id":"1432", "name":"1392 DHCP Module" ,"slug":"1392-dhcp-module", "type":"dhcp_module", "parent_id":"1392", "category_id":null, "attr":{"_dhcp_attributes":"{\"type\":\"ISC\", \"notes\":\"\", \"username\":\"\", \"port\":\"\", \"config_test\":\"\/etc\/init.d\/dhcpd configtest\", \"server_stop\":\"\/etc\/init.d\/dhcpd stop\", \"server_start\":\"\/etc\/init.d\/dhcpd start\", \"config_path\":\"\", \"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}", "_dhcp_config_id":"33"}}], "result_count":1, "found_count":1} | ERROR: | {"success":0, "message":"error message"} |
Data Detail:
Name | Type | Description |
---|
id | INTEGER | ID of the dhcp_module resource | name | STRING | The name of the dhcp_module | slug | STRING | The unique reference string for this resource | type | STRING | Always 'dhcp_module | parent_id | INTEGER | The resource to which the dhcp_module is attached | category_id | INTEGER | The category to which this dhcp_module is associated |
Attributes: Key | Type | Description |
---|
id | INTEGER | ID of the dhcp_module resource |
|