You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 4
Next »
DHCP Server Control
get |
---|
URL | /api/v1/api.php?target=DHCPServer&action=get |
Description | Accepts search criteria to retrieve a list of all matching DHCP Servers. |
Returns | Examples: SUCCESSFUL: | {"success":1,"message":"Search Successful.","data":[{"DHCPId":"1","DHCPServer": "trace.foo.com","DHCPPort":"22","DHCPUsername":"benner","DHCPPassword": "h}kc))jwqhgd","DHCPType":"ISC","DHCPConfigPath":"\/usr\/local\/dhcp\/etc \/dhcpd.conf","DHCPServerStop":"sudo kill -9 `cat \/var\/run\/dhcpd.pid`", "DHCPServerStart":"sudo \/usr\/local\/dhcp\/sbin\/dhcpd -p 75","DHCPDefaultLease" :null,"DHCPMaxLease":null,"DHCPAuthoritative":"1","DHCPLogFacility":"local7", "DHCPDomainName":null,"DHCPNameServers":null,"DHCPUseText":"0","DHCPConfigText":null}]} | ERROR: | {"success":0, "message":"error message"} |
Data Detail:
Name | Type | Description |
---|
DHCPId | INT | The ID of the DHCP Server entry. | DHCPServer | STRING | The address of the DHCP Server | DHCPPort | INT | The port the DHCP Server can be reached on. | DHCPUsername | STRING | The user name required to access the DHCP Server | DHCPPassword | STRING | The password required to access the DHCP Server | DHCPType | STRING | The type of DHCP Server | DHCPConfigPath | STRING | Path to DHCP Configuration file | DHCPServerStop | STRING | Commandto stop the DHCP Server | DHCPServerStart | STRING | Command to start the DHCP Server | DHCPDefaultLease | STRING | Default lease time for this server | DHCPMaxLease | STRING | Maximum lease time for this server | DHCPAuthoritative | BOOL | Whether or not this server is authoritative | DHCPLogFacility | STRING | Logging facility for this server | DHCPDomainName | STRING | Domain names servers used by this server | DHCPNameServers | STRING | Name servers used by this server | DHCPUseText | BOOL | Whether or not to use the entry builder or a config text file | DHCPConfigText | STRING | The text of the config text file |
|
Optional Parameters | Name | Type | Example | Description |
---|
likeFlag | BOOL | 1 | When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used. | generalFlag | BOOL | 1 | When 1, searches over the provided parameters using OR. If 0 or omitted, uses AND. |
Name | Type | Example | Description |
---|
DHCPId | INT | 123 | The DHCP Server ID to search for. | DHCPServer | STRING | IP/domain | The Server Name to search for. | DHCPPort | STRING | 43 | The Port to search for. | DHCPUsername | STRING | kjennings | The Username to search for. | DHCPType | STRING | MSDHCP | The DHCP Server Type to search for. | DHCPConfigPath | STRING | /where/is/it/ | The Config Path to search for. | DHCPServerStop | STRING | /path/to/server/stop | Search by server stop command. | DHCPServerStart | STRING | /path/to/server/start | Search by server start command. | DHCPDefaultLease | INT | 64000 | Search by default lease. | DHCPMaxLease | INT | 128000 | Search by max lease. | DHCPAuthoritative | BOOL | 1 | Search by whether the server is authoritative. | DHCPLogFacility | STRING | local7 | Search by logging facility. | DHCPDomainName | STRING | domain.name.server | Search by domain name servers. | DHCPNameServers | STRING | ns.domain.com | Search by name servers. | DHCPUseText | BOOL | 1 | Search by using text configs or not. | DHCPConfigText | STRING | Text File | Search by text file contents. |
|
Example URL | /api/v1/api.php?target=DHCPServer&action=get&likeFlag=1&DHCPUsername=kjenn |
update |
---|
URL | /api/v1/api.php?target=DHCPServer&action=update |
Description | First performs a search based on the submitted DHCP Server criteria, then performs an Update across those entries based on new values. |
Returns | Examples: SUCCESSFUL: | {"success":1,"message":"Update Successful."} | ERROR: | {"success":0, "message":"error message"} |
|
Optional Parameters | Name | Type | Example | Description |
---|
likeFlag | BOOL | 1 | When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used. |
Name | Type | Example | Description |
---|
SearchId | INT | 123 | The DHCP Server ID to search for. | SearchServer | STRING | IP/domain | The Server Name to search for. | SearchPort | STRING | 43 | The Port to search for. | SearchUsername | STRING | kjennings | The Username to search for. | SearchType | STRING | MSDHCP | The DHCP Server Type to search for. | SearchConfigPath | STRING | /where/is/it/ | The Config Path to search for. | SearchServerStop | STRING | /path/to/server/stop | Search by server stop command. | SearchServerStart | STRING | /path/to/server/start | Search by server start command. | SearchDefaultLease | INT | 64000 | Search by default lease. | SearchMaxLease | INT | 128000 | Search by max lease. | SearchAuthoritative | BOOL | 1 | Search by whether the server is authoritative. | SearchLogFacility | STRING | local7 | Search by logging facility. | SearchDomainName | STRING | domain.name.server | Search by domain name servers. | SearchNameServers | STRING | ns.domain.com | Search by name servers. | SearchUseText | BOOL | 1 | Search by using text configs or not. | SearchConfigText | STRING | Text File | Search by text file contents. |
Name | Type | Example | Description |
---|
UpdateServer | STRING | IP/domain | The new server address. | UpdatePort | STRING | 43 | The new port. | UpdateUsername | STRING | kjennings | The new username. | UpdatePassword | STRING | ******** | The new password. | UpdateType | STRING | ISC | The new server type. | UpdateConfigPath | STRING | /where/is/it/ | The new config path. | UpdateServerStop | STRING | /path/to/server/stop | The new server stop command. | UpdateServerStart | STRING | /path/to/server/start | The new server start command. | UpdateDefaultLease | INT | 64000 | The new default lease. | UpdateMaxLease | INT | 128000 | The new max lease. | UpdateAuthoritative | BOOL | 1 | The new Authoritative status. | UpdateLogFacility | STRING | local7 | The new logging facility. | UpdateDomainName | STRING | domain.name.server | The new domain name servers. | UpdateNameServers | STRING | ns.domain.com | The new name servers. | UpdateUseText | BOOL | 1 | The new use text file setting. | UpdateConfigText | STRING | Text File | The new use text file content. |
|
Example URL | /api/v1/api.php?target=DHCPServer&action=update&SearchPort=43&UpdatePort=48 |
add |
---|
URL | /api/v1/api.php?target=DHCPServer&action=add |
Description | Adds a new DHCP Server. |
Returns | Examples: SUCCESSFUL: | {"success":1,"message":"Add Successful.","data":123} | ERROR: | {"success":0, "message":"error message"} |
Data Detail:
Name | Type | Description |
---|
data | INT | The ID of the new DHCP Server. |
|
Required Parameters | Name | Type | Example | Description |
---|
DHCPServer | STRING | IP/domain | The new server address. | DHCPPort | STRING | 43 | The new port. | DHCPUsername | STRING | kjennings | The new username. | DHCPPassword | STRING | ******** | The new password. | DHCPType | STRING | ISC | The new server type. |
|
Optional Parameters | Name | Type | Example | Description |
---|
DHCPConfigPath | STRING | /where/is/it/ | The new config path. | DHCPServerStop | STRING | /path/to/server/stop | The new server stop command. | DHCPServerStart | STRING | /path/to/server/start | The new server start command. | DHCPDefaultLease | INT | 64000 | The new default lease. | DHCPMaxLease | INT | 128000 | The new max lease. | DHCPAuthoritative | BOOL | 1 | The new Authoritative status. | DHCPLogFacility | STRING | local7 | The new logging facility. | DHCPDomainName | STRING | domain.name.server | The new domain name servers. | DHCPNameServers | STRING | ns.domain.com | The new name servers. | DHCPUseText | BOOL | 1 | The new use text file setting. | DHCPConfigText | STRING | Text File | The new use text file content. |
|
delete |
---|
URL | /api/v1/api.php?target=DHCPServer&action=delete |
Description | Performs a search over the DHCP Servers dataset and deletes all found matches. |
Returns | Examples: SUCCESSFUL: | {"success":1,"message":"DHCPServer(s) Deleted."} | ERROR: | {"success":0, "message":"error message"} |
|
Optional Parameters | Name | Type | Example | Description |
---|
likeFlag | BOOL | 1 | When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used. | generalFlag | BOOL | 1 | When 1, searches over the provided paramenters using OR. If 0 or omitted, uses AND. |
Name | Type | Example | Description |
---|
DHCPId | INT | 123 | The DHCP Server ID to search for. | DHCPServer | STRING | IP/domain | The Server Name to search for. | DHCPPort | STRING | 43 | The Port to search for. | DHCPUsername | STRING | kjennings | The Username to search for. | DHCPType | STRING | MSDHCP | The DHCP Server Type to search for. | DHCPConfigPath | STRING | /where/is/it/ | The Config Path to search for. | DHCPServerStop | STRING | /path/to/server/stop | Search by server stop command. | DHCPServerStart | STRING | /path/to/server/start | Search by server start command. | DHCPDefaultLease | INT | 64000 | Search by default lease. | DHCPMaxLease | INT | 128000 | Search by max lease. | DHCPAuthoritative | BOOL | 1 | Search by whether the server is authoritative. | DHCPLogFacility | STRING | local7 | Search by logging facility. | DHCPDomainName | STRING | domain.name.server | Search by domain name servers. | DHCPNameServers | STRING | ns.domain.com | Search by name servers. | DHCPUseText | BOOL | 1 | Search by using text configs or not. | DHCPConfigText | STRING | Text File | Search by text file contents. |
|
testConnection |
---|
URL | /api/v1/api.php?target=DHCPServer&action=testConnection |
Description | Performs a search over the DHCP Servers dataset and tests the login/password combo for each one returned. Returns a status array with three elements: a 1 or 0 for success/failure, the server in question, and the failure/success message. |
Returns | Examples: SUCCESSFUL: | {"success":1,"message":"Pushes Attempted.","data":[[1,"foo.fun.com", "Successfully authenticated on DHCP Server 'foo.fun.com'."],[0,"foo.fun .com","Could not authenticate on server 'foo.fun.com'. Connection refused."] ,[0,"28.39.106.129","Could not connect to server '28.39.106.129'. Connection refused."]]} | ERROR: | {"success":0, "message":"error message"} |
|
Optional Parameters | Name | Type | Example | Description |
---|
likeFlag | BOOL | 1 | When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used. | generalFlag | BOOL | 1 | When 1, searches over the provided paramenters using OR. If 0 or omitted, uses AND. |
Name | Type | Example | Description |
---|
DHCPId | INT | 123 | The DHCP Server ID to search for. | DHCPServer | STRING | IP/domain | The Server Name to search for. | DHCPPort | STRING | 43 | The Port to search for. | DHCPUsername | STRING | kjennings | The Username to search for. | DHCPType | STRING | MSDHCP | The DHCP Server Type to search for. | DHCPConfigPath | STRING | /where/is/it/ | The Config Path to search for. | DHCPServerStop | STRING | /path/to/server/stop | Search by server stop command. | DHCPServerStart | STRING | /path/to/server/start | Search by server start command. | DHCPDefaultLease | INT | 64000 | Search by default lease. | DHCPMaxLease | INT | 128000 | Search by max lease. | DHCPAuthoritative | BOOL | 1 | Search by whether the server is authoritative. | DHCPLogFacility | STRING | local7 | Search by logging facility. | DHCPDomainName | STRING | domain.name.server | Search by domain name servers. | DHCPNameServers | STRING | ns.domain.com | Search by name servers. | DHCPUseText | BOOL | 1 | Search by using text configs or not. | DHCPConfigText | STRING | Text File | Search by text file contents. |
|
push |
---|
URL | /api/v1/api.php?target=DHCPServer&action=push |
Description | Performs a search over the DHCP Servers dataset and pushes the current config file before restarting the servers. Returns a status array with three elements: a 1 or 0 for success/failure, the server in question, and the failure/success message. A response code of '2' indicates that the push went smoothly, but the configuration file itself contains errors. In this case the error return will be the actual error output from the DHCP server. |
Returns | Examples: SUCCESSFUL: | {"success":1,"message":"Pushes Attempted.","data":[[1,"trace.bind.com", "Successfully pushed DHCP Config to server 'trace.bind.com'. Server Restarted."] ,[0,"trace.bind.com","Could not authenticate on server 'trace.bind.com'. Connection refused. "],[0,"208.39.106.169","Could not connect to server '208.39.106.169'. Connection refused."]]} | ERROR: | {"success":0, "message":"error message"} |
|
Optional Parameters | Name | Type | Example | Description |
---|
likeFlag | BOOL | 1 | When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used. | generalFlag | BOOL | 1 | When 1, searches over the provided paramenters using OR. If 0 or omitted, uses AND. |
Name | Type | Example | Description |
---|
DHCPId | INT | 123 | The DHCP Server ID to search for. | DHCPServer | STRING | IP/domain | The Server Name to search for. | DHCPPort | STRING | 43 | The Port to search for. | DHCPUsername | STRING | kjennings | The Username to search for. | DHCPType | STRING | MSDHCP | The DHCP Server Type to search for. | DHCPConfigPath | STRING | /where/is/it/ | The Config Path to search for. | DHCPServerStop | STRING | /path/to/server/stop | Search by server stop command. | DHCPServerStart | STRING | /path/to/server/start | Search by server start command. | DHCPDefaultLease | INT | 64000 | Search by default lease. | DHCPMaxLease | INT | 128000 | Search by max lease. | DHCPAuthoritative | BOOL | 1 | Search by whether the server is authoritative. | DHCPLogFacility | STRING | local7 | Search by logging facility. | DHCPDomainName | STRING | domain.name.server | Search by domain name servers. | DHCPNameServers | STRING | ns.domain.com | Search by name servers. | DHCPUseText | BOOL | 1 | Search by using text configs or not. | DHCPConfigText | STRING | Text File | Search by text file contents. |
|
DHCP Entry Control
get |
---|
URL | /api/v1/api.php?target=DHCPEntry&action=get |
Description | Accepts search criteria to retrieve a list of all matching DHCP Entries along with their associated Options. |
Returns | Examples: SUCCESSFUL: | {"EntryId":"27","EntryParent":null,"EntryServerId":"1","EntryName":"mike","EntryType": "host","EntryNetmask":"255.255.255.0","EntryIPCount":"1","EntryPercent":"1","Options": [{"OptionId":"46","OptionSubnetId":"27","OptionKey":"hardware ethernet","OptionValue": "11:23:45:67:89:ab"},{"OptionId":"47","OptionSubnetId":"27","OptionKey":"fixed-address", "OptionValue":"10.20.30.158"}]}]} | ERROR: | {"success":0, "message":"error message"} |
Data Detail:
Name | Type | Description |
---|
EntryId | INT | The ID of the DHCP Entry. | EntryParent | INT | The parent Entry of this one | EntryServerId | INT | The DHCP Server to which this entry belongs. | EntryType | STRING | The Entry type. Either 'host' or 'subnet'. | EntryName | STRING | The name of this entry. In the case of a Host, it is the hostname. In the case of a subnet, it is the subnet address. | EntryNetmask | STRING | The subnet mask. Empty on type 'host' | EntryIPCount | INT | The number of IPs in this Entry. | EntryPercent | INT | Percentage of this Entry currently assigned. | Options | STRING | If present, this array contains objects enumerating each option and its type. | OptionId | STRING | The ID of this Option | OptionSubnetId | INT | The ID of the parent. Identical to EntryId. | OptionKey | STRING | The key portion of the option key-value pairing. | OptionValue | STRING | The value portion of the option key-value pairing. |
|
Optional Parameters | Name | Type | Example | Description |
---|
likeFlag | BOOL | 1 | When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used. | generalFlag | BOOL | 1 | When 1, searches over the provided parameters using OR. If 0 or omitted, uses AND. |
Name | Type | Example | Description |
---|
EntryId | INT | 123 | The ID of the DHCP Entry to search for. | EntryParent | INT | 123 | The parent Entry to search for. | EntryServerId | INT | 123 | The DHCP Server to search for. | EntryType | STRING | subnet | The Entry type to search for. | EntryName | STRING | 30.20.10.1 | The name to search for. | EntryNetmask | STRING | 255.255.255.0 | The subnet mask to search for. | OptionId | STRING | 123 | The Option ID to search for. | OptionKey | STRING | range | The key portion of the option key-value pairing to search for. | OptionValue | STRING | 30.20.10.10 30.20.10.40 | The value portion of the option key-value pairing to search for. |
|
update |
---|
URL | /api/v1/api.php?target=DHCPEntry&action=update |
Description | First performs a search based on the submitted DHCP Entry criteria, then performs an Update across those entries and all found Options based on new values. |
Returns | Examples: SUCCESSFUL: | {"success":1,"message":"Update Successful."} | ERROR: | {"success":0, "message":"error message"} |
|
Optional Parameters | Name | Type | Example | Description |
---|
likeFlag | BOOL | 1 | When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used. |
Name | Type | Example | Description |
---|
SearchId | INT | 123 | The ID of the DHCP Entry to search for. | SearchParent | INT | 123 | The parent Entry to search for. | SearchServerId | INT | 123 | The DHCP Server to search for. | SearchType | STRING | subnet | The Entry type to search for. | SearchName | STRING | 30.20.10.1 | The name to search for. | SearchNetmask | STRING | 255.255.255.0 | The subnet mask to search for. | SearchId | STRING | 123 | The Option ID to search for. | SearchKey | STRING | range | The key portion of the option key-value pairing to search for. | SearchValue | STRING | 30.20.10.10 30.20.10.40 | The value portion of the option key-value pairing to search for. |
Name | Type | Example | Description |
---|
UpdateParent | INT | 123 | The new parent data. | UpdateServerId | INT | 123 | The new DHCP Server ID. | UpdateType | STRING | subnet | The new Entry type. | UpdateName | STRING | 30.20.10.1 | The new name. | UpdateNetmask | STRING | 255.255.255.0 | The new subnet mask. | UpdateKey | STRING | range | The new key portion of the option key-value pairing. | UpdateValue | STRING | 30.20.10.10 30.20.10.40 | The new value portion of the option key-value pairing. |
|
updateOption |
---|
URL | /api/v1/api.php?target=DHCPEntry&action=updateOption |
Description | First performs a search based on the submitted DHCP Entry criteria, then performs an Update across all found Options, without altering found Entries. |
Returns | Examples: SUCCESSFUL: | {"success":1,"message":"Update Successful."} | ERROR: | {"success":0, "message":"error message"} |
|
Optional Parameters | Name | Type | Example | Description |
---|
likeFlag | BOOL | 1 | When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used. |
Name | Type | Example | Description |
---|
SearchId | INT | 123 | The ID of the DHCP Entry to search for. | SearchParent | INT | 123 | The parent Entry to search for. | SearchServerId | INT | 123 | The DHCP Server to search for. | SearchType | STRING | subnet | The Entry type to search for. | SearchName | STRING | 30.20.10.1 | The name to search for. | SearchNetmask | STRING | 255.255.255.0 | The subnet mask to search for. | SearchId | STRING | 123 | The Option ID to search for. | SearchKey | STRING | range | The key portion of the option key-value pairing to search for. | SearchValue | STRING | 30.20.10.10 30.20.10.40 | The value portion of the option key-value pairing to search for. |
Name | Type | Example | Description |
---|
UpdateKey | STRING | range | The new key portion of the option key-value pairing. | UpdateValue | STRING | 30.20.10.10 30.20.10.40 | The new value portion of the option key-value pairing. |
|
add |
---|
URL | /api/v1/api.php?target=DHCPEntry&action=add |
Description | Adds a new DHCP Entry and returns the new ID. |
Returns | Examples: SUCCESSFUL: | {"success":1,"message":"Add Successful.","data":123} | ERROR: | {"success":0, "message":"error message"} |
Data Detail:
Name | Type | Description |
---|
data | INT | The ID of the new DHCP Entry. |
|
Required Parameters | Name | Type | Example | Description |
---|
EntryServerId | INT | 123 | The DHCP Server this new Entry belongs to. | EntryType | STRING | subnet | The Entry type of this new Entry. | EntryName | STRING | 30.20.10.1 | The name of this new Entry. | EntryNetmask | STRING | 255.255.255.0 | The subnet mask of this new Entry. |
|
Optional Parameters | Name | Type | Example | Description |
---|
EntryParent | INT | 123 | The parent Entry to search for. |
|
addOption |
---|
URL | /api/v1/api.php?target=DHCPEntry&action=addOption |
Description | Creates a new DHCP Option and returns the new ID. |
Returns | Examples: SUCCESSFUL: | {"success":1,"message":"Add Successful.","data":123} | ERROR: | {"success":0, "message":"error message"} |
Data Detail:
Name | Type | Description |
---|
data | INT | The ID of the new DHCP Option. |
|
Required Parameters | Name | Type | Example | Description |
---|
OptionSubnetId | INT | 123 | The DHCP Entry this Option belongs to. | OptionKey | STRING | range | The key portion of the option key-value pairing to search for. | OptionValue | STRING | 30.20.10.10 30.20.10.40 | The value portion of the option key-value pairing to search for. |
|
delete |
---|
URL | /api/v1/api.php?target=DHCPEntry&action=delete |
Description | Performs a search over the DHCP Entry dataset and deletes all found matches, along with their associated Options. |
Returns | Examples: SUCCESSFUL: | {"success":1,"message":"DHCPEntries(s) Deleted."} | ERROR: | {"success":0, "message":"error message"} |
|
Optional Parameters | Name | Type | Example | Description |
---|
likeFlag | BOOL | 1 | When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used. |
Name | Type | Example | Description |
---|
EntryId | INT | 123 | The ID of the DHCP Entry to search for. | EntryParent | INT | 123 | The parent Entry to search for. | EntryServerId | INT | 123 | The DHCP Server to search for. | EntryType | STRING | subnet | The Entry type to search for. | EntryName | STRING | 30.20.10.1 | The name to search for. | EntryNetmask | STRING | 255.255.255.0 | The subnet mask to search for. | OptionId | STRING | 123 | The Option ID to search for. | OptionKey | STRING | range | The key portion of the option key-value pairing to search for. | OptionValue | STRING | 30.20.10.10 30.20.10.40 | The value portion of the option key-value pairing to search for. |
|
deleteOption |
---|
URL | /api/v1/api.php?target=DHCPEntry&action=deleteOption |
Description | Performs a search over the DHCP Entry dataset and deletes all found Options while leaving the Entries intact. |
Returns | Examples: SUCCESSFUL: | {"success":1,"message":"DHCP Option(s) Deleted."} | ERROR: | {"success":0, "message":"error message"} |
|
Optional Parameters | Name | Type | Example | Description |
---|
likeFlag | BOOL | 1 | When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used. |
Name | Type | Example | Description |
---|
EntryId | INT | 123 | The ID of the DHCP Entry to search for. | EntryParent | INT | 123 | The parent Entry to search for. | EntryServerId | INT | 123 | The DHCP Server to search for. | EntryType | STRING | subnet | The Entry type to search for. | EntryName | STRING | 30.20.10.1 | The name to search for. | EntryNetmask | STRING | 255.255.255.0 | The subnet mask to search for. | OptionId | STRING | 123 | The Option ID to search for. | OptionKey | STRING | range | The key portion of the option key-value pairing to search for. | OptionValue | STRING | 30.20.10.10 30.20.10.40 | The value portion of the option key-value pairing to search for. |
|