Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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=getupdate&likeFlagSearchPort=143&DHCPUsernameUpdatePort=kjenn48

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.

...