=encoding UTF-8 =head1 NAME cPanel::PublicAPI::WHM::API - Legacy interface for querying the xml-api. NOTE: This module is provided for legacy purposes, L should be used instead =head1 DESCRIPTION This module provides legacy compatibility support between L and Cpanel::Accounting (distributed with cPanel). This should never be used unless there is a very good reason to use it (such as having a script that uses Cpanel::Accounting). Every method contained within this object can be queried using cPanel::publicAPI::whm_api() instead. For more information on the calls within the methods contained here and what the parameter names mean, please read the documentation at: L =head1 functions =head2 C Used to list the accounts on a server. Syntax: $pubapi->api_listaccts( $search, $searchtype ); =head2 C Create a new cPanel account. Syntax: $pubapi->api_createacct( $username, $domain, $password, $plan ); =head2 C Terminate an account. Syntax: $pubapi->api_removeacct( $user ); =head2 C Get the version of cPanel running on the server. Syntax: $pubapi->api_showversion( ); =head2 C Get the version of cPanel running on the server (as as showversion) Syntax: $pubapi->api_version( ); =head2 C List out the available xml-api calls. Syntax: $pubapi->api_applist( ); =head2 C Generate an ssl certificate. Syntax: $pubapi->api_generatessl( $host, $pass, $country, $state, $city, $co, $cod, $email, $xemail ); =head2 C Generate an SSL certificate without an email. Syntax: $pubapi->api_generatessl_noemail( $noemail=1 ); =head2 C List out the certificates that exist on the server. Syntax: $pubapi->api_listcrts( ); =head2 C Set the limits for a single reseller account. Syntax: $pubapi->api_setresellerlimits( ); =head2 C Set which packages a reseller account can use. Syntax: $pubapi->api_setresellerpackagelimit( $user, $package, $allowerd, $number, $no_limit ); =head2 C Set a reseller's main IP. Syntax: $pubapi->api_setresellermainip( $user, $ip ); =head2 C Set the IP that a reseller has available to it. Syntax: $pubapi->api_setresellerips( $user, $delegate, $ips ); =head2 C Set the nameservers that a reseller uses by default. Syntax: $pubapi->api_setresellernameservers( $user, $nameservers ); =head2 C Suspend a reseller and all of their accounts. Syntax: $pubapi->api_suspendreseller( $user, $reason, $disallow ); =head2 C Unsuspend a reseller and all of their accounts. Syntax: $pubapi->api_unsuspendreseller( $user ); =head2 C Add a record to a zone. Syntax: $pubapi->api_addzonerecord( @args ); =head2 C Edit a zone record. Syntax: $pubapi->api_editzonerecord(@args ); =head2 C Remove a line from a zone. Syntax: $pubapi->api_removezonerecord( $domain, $Line ); =head2 C Get a record from a zone. Syntax: $pubapi->api_getzonerecord( $domain, $Line ); =head2 C Get the status of various services running on a system. Syntax: $pubapi->api_servicestatus( $service ); =head2 C Enable/Disable various services. Syntax: $pubapi->api_configureservice( $service, $enabled, $monitored ); =head2 C Get the number of accounts on a system/that belong to a reseller. Syntax: $pubapi->api_acctcounts( $user ); =head2 C Get the information about a specific domain's virtualhost. Syntax: $pubapi->api_domainuserdata( $domain ); =head2 C Edit a user's quota. Syntax: $pubapi->api_editquota( $user, $quota ); =head2 C Get non-volatile data. Syntax: $pubapi->api_nvget( $key ); =head2 C Set non-volatile data. Syntax: $pubapi->api_nvset( $key, $value ); =head2 C See what privileges are available to your user. Syntax: $pubapi->api_myprivs( ); =head2 C List all the zones available to a user. Syntax: $pubapi->api_listzones( ); =head2 C Set the hostname of a system. Syntax: $pubapi->api_sethostname( $hostname ); =head2 C Set the resolvers a system uses. Syntax: $pubapi->api_setresolvers( $nameserver1, $nameserver2, $nameserver3 ); =head2 C Add a new IP to a server. Syntax: $pubapi->api_addip( $ip, $netmask ); =head2 C Remove an IP from a server. Syntax: $pubapi->api_delip( $ip, $ethernetdev, $skipifshutdown ); =head2 C List the IPs on a server. Syntax: $pubapi->api_listips( ); =head2 C Get the contents of a zone file. Syntax: $pubapi->api_dumpzone( $domain ); =head2 C List the packages available to your user. Syntax: $pubapi->api_listpkgs( ); =head2 C Limit the amount of bandwidth available to an account. Syntax: $pubapi->api_limitbw( $user, $bwlimit ); =head2 C Show the amount of BW used by an account. Syntax: $pubapi->api_showbw( $month, $year, $showres, $search, $searchtype ); =head2 C Remove a DNS zone. Syntax: $pubapi->api_killdns( $domain ); =head2 C Add a dns zone. Syntax: $pubapi->api_adddns( $domain, $ip, $trueowner ); =head2 C Change an Account's Package. Syntax: $pubapi->api_changepackage( $user, $pkg ); =head2 C Modify an Account's limits. Syntax: $pubapi->api_modifyacct( $user, $domain, $HASCGI, $CPTHEME, $LANG, $MAXPOP, $MAXFTP, $MAXLST, $MAXSUB, $MAXPARK, $MAXADDON, $MAXSQL, $shell ); =head2 C Suspend an account. Syntax: $pubapi->api_suspendacct( $user, $reason ); =head2 C Unsuspend an account. Syntax: $pubapi->api_unsuspendacct( $user ); =head2 C List the suspended accounts on a server. Syntax: $pubapi->api_listsuspended( ); =head2 C Add a new package. Syntax: $pubapi->api_addpkg( $pkgname, $quota, $ip, $cgi, $frontpage, $cpmod, $maxftp, $maxsql, $maxpop, $maxlst, $maxsub, $maxpark, $maxaddon, $featurelist, $hasshell, $bwlimit ); =head2 C Remove a package. Syntax: $pubapi->api_killpkg( $pkg ); =head2 C Edit a package. Syntax: $pubapi->api_editpkg( $pkgname, $quota, $ip, $cgi, $frontpage, $cpmod, $maxftp, $maxsql, $maxpop, $maxlst, $maxsub, $maxpark, $maxaddon, $featurelist, $hasshell, $bwlimit ); =head2 C Change features available to a reseller. Syntax: $pubapi->api_setacls( $reseller, $acllist ); =head2 C Remove a reseller. Syntax: $pubapi->api_terminatereseller( $reseller, $verify ); =head2 C Get statistics on a specific reseller. Syntax: $pubapi->api_resellerstats( $reseller ); =head2 C Make a cPanel account a Reseller account. Syntax: $pubapi->api_setupreseller( $user, $makeowner ); =head2 C Get the IP for a nameserver. Syntax: $pubapi->api_lookupnsip( $nameserver ); =head2 C List all the resellers on a system. Syntax: $pubapi->api_listresellers( ); =head2 C List all of the ACL lists available. Syntax: $pubapi->api_listacls( ); =head2 C Save a new ACL list. Syntax: $pubapi->api_saveacllist( $acllist ); =head2 C Remove reseller permissions from an account. Syntax: $pubapi->api_unsetupreseller( $user ); =head2 C Get the hostname of the server currently being queried. Syntax: $pubapi->api_gethostname( ); =head2 C Get information on a specific SSL certificate. Syntax: $pubapi->api_fetchsslinfo( $domain, $crtdata ); =head2 C Install a new SSL certificate. Syntax: $pubapi->api_installssl( $domain, $user, $cert, $key, $cab, $ip ); =head2 C Change an account's password. Syntax: $pubapi->api_passwd( $user, $pass ); =head2 C Get a list of languages available on a system. Syntax: $pubapi->api_getlanglist( ); =head2 C Reboot the server. Syntax: $pubapi->api_reboot( $force ); =head2 C Get a summary of an account. Syntax: $pubapi->api_accountsummary_user( $user ); =head2 C Get the summary of an account by specifying the domain. Syntax: $pubapi->api_accountsummary_domain( $domain ); =head2 C Get the loadavg on the system. Syntax: $pubapi->api_loadavg( ); =head2 C Restart a service. Syntax: $pubapi->api_restartservice( $service ); =head2 C Set the IP for a specific user. Syntax: $pubapi->api_setsiteip_user( $user, $ip ); =head2 C Set the IP for a specific domain. Syntax: $pubapi->api_setsiteip_domain( $domain, $ip ); =head1 Bugs see http://rt.cpan.org to report and view bugs =head1 License Copyright (c) 2015, cPanel, Inc. All rights reserved. http://cpanel.net Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of cPanel, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.