You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

DHCP Server Control

get

URL/api/v1/api.php?target=DHCPServer&action=get
DescriptionAccepts 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:

NameTypeDescription
DHCPIdINTThe ID of the DHCP Server entry.
DHCPServerSTRINGThe address of the DHCP Server
DHCPPortINTThe port the DHCP Server can be reached on.
DHCPUsernameSTRINGThe user name required to access the DHCP Server
DHCPPasswordSTRINGThe password required to access the DHCP Server
DHCPTypeSTRINGThe type of DHCP Server
DHCPConfigPathSTRINGPath to DHCP Configuration file
DHCPServerStopSTRINGCommandto stop the DHCP Server
DHCPServerStartSTRINGCommand to start the DHCP Server
DHCPDefaultLeaseSTRINGDefault lease time for this server
DHCPMaxLeaseSTRINGMaximum lease time for this server
DHCPAuthoritativeBOOLWhether or not this server is authoritative
DHCPLogFacilitySTRINGLogging facility for this server
DHCPDomainNameSTRINGDomain names servers used by this server
DHCPNameServersSTRINGName servers used by this server
DHCPUseTextBOOLWhether or not to use the entry builder or a config text file
DHCPConfigTextSTRINGThe text of the config text file
Optional Parameters
NameTypeExampleDescription
likeFlagBOOL1When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used.
generalFlagBOOL1When 1, searches over the provided parameters using OR. If 0 or omitted, uses AND.
NameTypeExampleDescription
DHCPIdINT123The DHCP Server ID to search for.
DHCPServerSTRINGIP/domainThe Server Name to search for.
DHCPPortSTRING43The Port to search for.
DHCPUsernameSTRINGkjenningsThe Username to search for.
DHCPTypeSTRINGMSDHCPThe DHCP Server Type to search for.
DHCPConfigPathSTRING/where/is/it/The Config Path to search for.
DHCPServerStopSTRING/path/to/server/stopSearch by server stop command.
DHCPServerStartSTRING/path/to/server/startSearch by server start command.
DHCPDefaultLeaseINT64000Search by default lease.
DHCPMaxLeaseINT128000Search by max lease.
DHCPAuthoritativeBOOL1Search by whether the server is authoritative.
DHCPLogFacilitySTRINGlocal7Search by logging facility.
DHCPDomainNameSTRINGdomain.name.serverSearch by domain name servers.
DHCPNameServersSTRINGns.domain.comSearch by name servers.
DHCPUseTextBOOL1Search by using text configs or not.
DHCPConfigTextSTRINGText FileSearch 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
DescriptionFirst 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
NameTypeExampleDescription
likeFlagBOOL1When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used.
NameTypeExampleDescription
SearchIdINT123The DHCP Server ID to search for.
SearchServerSTRINGIP/domainThe Server Name to search for.
SearchPortSTRING43The Port to search for.
SearchUsernameSTRINGkjenningsThe Username to search for.
SearchTypeSTRINGMSDHCPThe DHCP Server Type to search for.
SearchConfigPathSTRING/where/is/it/The Config Path to search for.
SearchServerStopSTRING/path/to/server/stopSearch by server stop command.
SearchServerStartSTRING/path/to/server/startSearch by server start command.
SearchDefaultLeaseINT64000Search by default lease.
SearchMaxLeaseINT128000Search by max lease.
SearchAuthoritativeBOOL1Search by whether the server is authoritative.
SearchLogFacilitySTRINGlocal7Search by logging facility.
SearchDomainNameSTRINGdomain.name.serverSearch by domain name servers.
SearchNameServersSTRINGns.domain.comSearch by name servers.
SearchUseTextBOOL1Search by using text configs or not.
SearchConfigTextSTRINGText FileSearch by text file contents.
NameTypeExampleDescription
UpdateServerSTRINGIP/domainThe new server address.
UpdatePortSTRING43The new port.
UpdateUsernameSTRINGkjenningsThe new username.
UpdatePasswordSTRING********The new password.
UpdateTypeSTRINGISCThe new server type.
UpdateConfigPathSTRING/where/is/it/The new config path.
UpdateServerStopSTRING/path/to/server/stopThe new server stop command.
UpdateServerStartSTRING/path/to/server/startThe new server start command.
UpdateDefaultLeaseINT64000The new default lease.
UpdateMaxLeaseINT128000The new max lease.
UpdateAuthoritativeBOOL1The new Authoritative status.
UpdateLogFacilitySTRINGlocal7The new logging facility.
UpdateDomainNameSTRINGdomain.name.serverThe new domain name servers.
UpdateNameServersSTRINGns.domain.comThe new name servers.
UpdateUseTextBOOL1The new use text file setting.
UpdateConfigTextSTRINGText FileThe 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
DescriptionAdds a new DHCP Server.
Returns

Examples:

SUCCESSFUL:{"success":1,"message":"Add Successful.","data":123}
ERROR:{"success":0, "message":"error message"}


Data Detail:

NameTypeDescription
dataINTThe ID of the new DHCP Server.
Required Parameters
NameTypeExampleDescription
DHCPServerSTRINGIP/domainThe new server address.
DHCPPortSTRING43The new port.
DHCPUsernameSTRINGkjenningsThe new username.
DHCPPasswordSTRING********The new password.
DHCPTypeSTRINGISCThe new server type.
Optional Parameters
NameTypeExampleDescription
DHCPConfigPathSTRING/where/is/it/The new config path.
DHCPServerStopSTRING/path/to/server/stopThe new server stop command.
DHCPServerStartSTRING/path/to/server/startThe new server start command.
DHCPDefaultLeaseINT64000The new default lease.
DHCPMaxLeaseINT128000The new max lease.
DHCPAuthoritativeBOOL1The new Authoritative status.
DHCPLogFacilitySTRINGlocal7The new logging facility.
DHCPDomainNameSTRINGdomain.name.serverThe new domain name servers.
DHCPNameServersSTRINGns.domain.comThe new name servers.
DHCPUseTextBOOL1The new use text file setting.
DHCPConfigTextSTRINGText FileThe new use text file content.
Example URL

/api/v1/api.php?target=DHCPServer&action=addDHCPServer=IP/domain&DHCPPort=43&DHCPUsername=kjennings&DHCPPassword=********&DHCPType=ISC&DHCPConfigText=configtexthere

 

 

delete

URL/api/v1/api.php?target=DHCPServer&action=delete
DescriptionPerforms 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
NameTypeExampleDescription
likeFlagBOOL1When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used.
generalFlagBOOL1When 1, searches over the provided paramenters using OR. If 0 or omitted, uses AND.
NameTypeExampleDescription
DHCPIdINT123The DHCP Server ID to search for.
DHCPServerSTRINGIP/domainThe Server Name to search for.
DHCPPortSTRING43The Port to search for.
DHCPUsernameSTRINGkjenningsThe Username to search for.
DHCPTypeSTRINGMSDHCPThe DHCP Server Type to search for.
DHCPConfigPathSTRING/where/is/it/The Config Path to search for.
DHCPServerStopSTRING/path/to/server/stopSearch by server stop command.
DHCPServerStartSTRING/path/to/server/startSearch by server start command.
DHCPDefaultLeaseINT64000Search by default lease.
DHCPMaxLeaseINT128000Search by max lease.
DHCPAuthoritativeBOOL1Search by whether the server is authoritative.
DHCPLogFacilitySTRINGlocal7Search by logging facility.
DHCPDomainNameSTRINGdomain.name.serverSearch by domain name servers.
DHCPNameServersSTRINGns.domain.comSearch by name servers.
DHCPUseTextBOOL1Search by using text configs or not.
DHCPConfigTextSTRINGText FileSearch by text file contents.
Example URL/api/v1/api.php?target=DHCPServer&action=delete&DHCPNameServers=ns.domain.com&DHCPType=MSDHCP

testConnection

URL/api/v1/api.php?target=DHCPServer&action=testConnection
DescriptionPerforms 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
NameTypeExampleDescription
likeFlagBOOL1When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used.
generalFlagBOOL1When 1, searches over the provided paramenters using OR. If 0 or omitted, uses AND.
NameTypeExampleDescription
DHCPIdINT123The DHCP Server ID to search for.
DHCPServerSTRINGIP/domainThe Server Name to search for.
DHCPPortSTRING43The Port to search for.
DHCPUsernameSTRINGkjenningsThe Username to search for.
DHCPTypeSTRINGMSDHCPThe DHCP Server Type to search for.
DHCPConfigPathSTRING/where/is/it/The Config Path to search for.
DHCPServerStopSTRING/path/to/server/stopSearch by server stop command.
DHCPServerStartSTRING/path/to/server/startSearch by server start command.
DHCPDefaultLeaseINT64000Search by default lease.
DHCPMaxLeaseINT128000Search by max lease.
DHCPAuthoritativeBOOL1Search by whether the server is authoritative.
DHCPLogFacilitySTRINGlocal7Search by logging facility.
DHCPDomainNameSTRINGdomain.name.serverSearch by domain name servers.
DHCPNameServersSTRINGns.domain.comSearch by name servers.
DHCPUseTextBOOL1Search by using text configs or not.
DHCPConfigTextSTRINGText FileSearch by text file contents.
Example URL/api/v1/api.php?target=DHCPServer&action=testConnection&DHCPId=123

push

URL/api/v1/api.php?target=DHCPServer&action=push
DescriptionPerforms 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
NameTypeExampleDescription
likeFlagBOOL1When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used.
generalFlagBOOL1When 1, searches over the provided paramenters using OR. If 0 or omitted, uses AND.
NameTypeExampleDescription
DHCPIdINT123The DHCP Server ID to search for.
DHCPServerSTRINGIP/domainThe Server Name to search for.
DHCPPortSTRING43The Port to search for.
DHCPUsernameSTRINGkjenningsThe Username to search for.
DHCPTypeSTRINGMSDHCPThe DHCP Server Type to search for.
DHCPConfigPathSTRING/where/is/it/The Config Path to search for.
DHCPServerStopSTRING/path/to/server/stopSearch by server stop command.
DHCPServerStartSTRING/path/to/server/startSearch by server start command.
DHCPDefaultLeaseINT64000Search by default lease.
DHCPMaxLeaseINT128000Search by max lease.
DHCPAuthoritativeBOOL1Search by whether the server is authoritative.
DHCPLogFacilitySTRINGlocal7Search by logging facility.
DHCPDomainNameSTRINGdomain.name.serverSearch by domain name servers.
DHCPNameServersSTRINGns.domain.comSearch by name servers.
DHCPUseTextBOOL1Search by using text configs or not.
DHCPConfigTextSTRINGText FileSearch by text file contents.
Example URL/api/v1/api.php?target=DHCPServer&action=push&DHCPServer=IP/domain

 

DHCP Entry Control

get

URL/api/v1/api.php?target=DHCPEntry&action=get
DescriptionAccepts 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:

NameTypeDescription
EntryIdINTThe ID of the DHCP Entry.
EntryParentINTThe parent Entry of this one
EntryServerIdINTThe DHCP Server to which this entry belongs.
EntryTypeSTRINGThe Entry type. Either 'host' or 'subnet'.
EntryNameSTRINGThe 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.
EntryNetmaskSTRINGThe subnet mask. Empty on type 'host'
EntryIPCountINTThe number of IPs in this Entry.
EntryPercentINTPercentage of this Entry currently assigned.
OptionsSTRINGIf present, this array contains objects enumerating each option and its type.
OptionIdSTRINGThe ID of this Option
OptionSubnetIdINTThe ID of the parent. Identical to EntryId.
OptionKeySTRINGThe key portion of the option key-value pairing.
OptionValueSTRINGThe value portion of the option key-value pairing.
Optional Parameters
NameTypeExampleDescription
likeFlagBOOL1When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used.
generalFlagBOOL1When 1, searches over the provided parameters using OR. If 0 or omitted, uses AND.
NameTypeExampleDescription
EntryIdINT123The ID of the DHCP Entry to search for.
EntryParentINT123The parent Entry to search for.
EntryServerIdINT123The DHCP Server to search for.
EntryTypeSTRINGsubnetThe Entry type to search for.
EntryNameSTRING30.20.10.1The name to search for.
EntryNetmaskSTRING255.255.255.0The subnet mask to search for.
OptionIdSTRING123The Option ID to search for.
OptionKeySTRINGrangeThe key portion of the option key-value pairing to search for.
OptionValueSTRING30.20.10.10 30.20.10.40The value portion of the option key-value pairing to search for.
Example URL/api/v1/api.php?target=DHCPEntry&action=get&EntryID=123

update

URL/api/v1/api.php?target=DHCPEntry&action=update
DescriptionFirst 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
NameTypeExampleDescription
likeFlagBOOL1When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used.
NameTypeExampleDescription
SearchIdINT123The ID of the DHCP Entry to search for.
SearchParentINT123The parent Entry to search for.
SearchServerIdINT123The DHCP Server to search for.
SearchTypeSTRINGsubnetThe Entry type to search for.
SearchNameSTRING30.20.10.1The name to search for.
SearchNetmaskSTRING255.255.255.0The subnet mask to search for.
SearchKeySTRINGrangeThe key portion of the option key-value pairing to search for.
SearchValueSTRING30.20.10.10 30.20.10.40The value portion of the option key-value pairing to search for.
NameTypeExampleDescription
UpdateParentINT123The new parent data.
UpdateServerIdINT123The new DHCP Server ID.
UpdateTypeSTRINGsubnetThe new Entry type.
UpdateNameSTRING30.20.10.1The new name.
UpdateNetmaskSTRING255.255.255.0The new subnet mask.
UpdateKeySTRINGrangeThe new key portion of the option key-value pairing.
UpdateValueSTRING30.20.10.10 30.20.10.40The new value portion of the option key-value pairing.
Example URL

/api/v1/api.php?target=DHCPEntry&action=update&SearchID=123&UpdateName=30.20.10.0

updateOption

URL/api/v1/api.php?target=DHCPEntry&action=updateOption
DescriptionFirst 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
NameTypeExampleDescription
likeFlagBOOL1When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used.
NameTypeExampleDescription
SearchIdINT123The ID of the DHCP Entry to search for.
SearchParentINT123The parent Entry to search for.
SearchServerIdINT123The DHCP Server to search for.
SearchTypeSTRINGsubnetThe Entry type to search for.
SearchNameSTRING30.20.10.1The name to search for.
SearchNetmaskSTRING255.255.255.0The subnet mask to search for.
SearchKeySTRINGrangeThe key portion of the option key-value pairing to search for.
SearchValueSTRING30.20.10.10 30.20.10.40The value portion of the option key-value pairing to search for.
NameTypeExampleDescription
UpdateKeySTRINGrangeThe new key portion of the option key-value pairing.
UpdateValueSTRING30.20.10.10 30.20.10.40The new value portion of the option key-value pairing.
Example URL/api/v1/api.php?target=DHCPEntry&action=updateOption&SearchNetmask=255.255.255.0&UpdateValue=30.20.10.10 

add

URL/api/v1/api.php?target=DHCPEntry&action=add
DescriptionAdds 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:

NameTypeDescription
dataINTThe ID of the new DHCP Entry.
Required Parameters
NameTypeExampleDescription
EntryServerIdINT123The DHCP Server this new Entry belongs to.
EntryTypeSTRINGsubnetThe Entry type of this new Entry.
EntryNameSTRING30.20.10.1

The name of this new Entry.

EntryNetmaskSTRING255.255.255.0The subnet mask of this new Entry.
Optional Parameters
NameTypeExampleDescription
EntryParentINT123The parent Entry to search for.
Example URL/api/v1/api.php?target=DHCPEntry&action=add&EntryServerId=123&EntryType=subnet&EntryName=30.20.10.1&EntryNetmask=255.255.255.0

addOption

URL/api/v1/api.php?target=DHCPEntry&action=addOption
DescriptionCreates 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:

NameTypeDescription
dataINTThe ID of the new DHCP Option.
Required Parameters
NameTypeExampleDescription
OptionSubnetIdINT123The DHCP Entry this Option belongs to.
OptionKeySTRINGrangeThe key portion of the option key-value pairing to search for.
OptionValueSTRING30.20.10.10 30.20.10.40The value portion of the option key-value pairing to search for.
Example URL/api/v1/api.php?target=DHCPEntry&action=addOption&OptionSubnetId=123&OptionKey=range&OptionValue=30.20.10.10 

delete

URL/api/v1/api.php?target=DHCPEntry&action=delete
DescriptionPerforms 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
NameTypeExampleDescription
likeFlagBOOL1When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used.
NameTypeExampleDescription
EntryIdINT123The ID of the DHCP Entry to search for.
EntryParentINT123The parent Entry to search for.
EntryServerIdINT123The DHCP Server to search for.
EntryTypeSTRINGsubnetThe Entry type to search for.
EntryNameSTRING30.20.10.1The name to search for.
EntryNetmaskSTRING255.255.255.0The subnet mask to search for.
OptionIdSTRING123The Option ID to search for.
OptionKeySTRINGrangeThe key portion of the option key-value pairing to search for.
OptionValueSTRING30.20.10.10 30.20.10.40The value portion of the option key-value pairing to search for.
Example URL/api/v1/api.php?target=DHCPEntry&action=delete&EntryParent=123

deleteOption

URL/api/v1/api.php?target=DHCPEntry&action=deleteOption
DescriptionPerforms 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
NameTypeExampleDescription
likeFlagBOOL1When 1, string searches are done via LIKE with wildcards at both ends. When 0, strict comparison is used.
NameTypeExampleDescription
EntryIdINT123The ID of the DHCP Entry to search for.
EntryParentINT123The parent Entry to search for.
EntryServerIdINT123The DHCP Server to search for.
EntryTypeSTRINGsubnetThe Entry type to search for.
EntryNameSTRING30.20.10.1The name to search for.
EntryNetmaskSTRING255.255.255.0The subnet mask to search for.
OptionIdSTRING123The Option ID to search for.
OptionKeySTRINGrangeThe key portion of the option key-value pairing to search for.
OptionValueSTRING30.20.10.10 30.20.10.40The value portion of the option key-value pairing to search for.
Example URL/api/v1/api.php?target=DHCPEntry&action=deleteOption&EntryNetmask=255.255.255.0
  • No labels