Matthew Dees > cPanel-PublicAPI > cPanel::PublicAPI::WHM::API

Download:
cPanel-PublicAPI-1.002.tar.gz

Annotate this POD

CPAN RT

New  3
Open  0
View/Report Bugs
Source  

NAME ^

cPanel::PublicAPI::WHM::API - Legacy interface for querying the xml-api.

NOTE: This module is provided for legacy purposes, cPanel::PublicAPI should be used instead

DESCRIPTION ^

This module provides legacy compatibility support between cPanel::PublicAPI 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: http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/XmlApi

functions ^

jsonapi_listaccts()

Used to list the accounts on a server.

Syntax:

  $pubapi->jsonapi_listaccts( $search, $searchtype );

jsonapi_createacct()

Create a new cPanel account.

Syntax:

  $pubapi->jsonapi_createacct( $username, $domain, $password, $plan );

jsonapi_removeacct()

Terminate an account.

Syntax:

  $pubapi->jsonapi_removeacct( $user );

jsonapi_showversion()

Get the version of cPanel running on the server.

Syntax:

  $pubapi->jsonapi_showversion(  );

jsonapi_version()

Get the version of cPanel running on the server (as as showversion)

Syntax:

  $pubapi->jsonapi_version(  );

jsonapi_applist()

List out the available xml-api calls.

Syntax:

  $pubapi->jsonapi_applist(  );

jsonapi_generatessl()

Generate an ssl certificate.

Syntax:

  $pubapi->jsonapi_generatessl( $host, $pass, $country, $state, $city, $co, $cod, $email, $xemail );

jsonapi_generatessl_noemail()

Generate an SSL certificate without an email.

Syntax:

  $pubapi->jsonapi_generatessl_noemail( $noemail=1 );

jsonapi_listcrts()

List out the certificates that exist on the server.

Syntax:

  $pubapi->jsonapi_listcrts(  );

jsonapi_setresellerlimits()

Set the limits for a single reseller account.

Syntax:

  $pubapi->jsonapi_setresellerlimits(  );

jsonapi_setresellerpackagelimit()

Set which packages a reseller account can use.

Syntax:

  $pubapi->jsonapi_setresellerpackagelimit( $user, $package, $allowerd, $number, $no_limit );

jsonapi_setresellermainip()

Set a reseller's main IP.

Syntax:

  $pubapi->jsonapi_setresellermainip( $user, $ip );

jsonapi_setresellerips()

Set the IP that a reseller has available to it.

Syntax:

  $pubapi->jsonapi_setresellerips( $user, $delegate, $ips );

jsonapi_setresellernameservers()

Set the nameservers that a reseller uses by default.

Syntax:

  $pubapi->jsonapi_setresellernameservers( $user, $nameservers );

jsonapi_suspendreseller()

Suspend a reseller and all of their accounts.

Syntax:

  $pubapi->jsonapi_suspendreseller( $user, $reason, $disallow );

jsonapi_unsuspendreseller()

Unsuspend a reseller and all of their accounts.

Syntax:

  $pubapi->jsonapi_unsuspendreseller( $user );

jsonapi_addzonerecord()

Add a record to a zone.

Syntax:

  $pubapi->jsonapi_addzonerecord( @args );

jsonapi_editzonerecord()

Edit a zone record.

Syntax:

  $pubapi->jsonapi_editzonerecord(@args );

jsonapi_removezonerecord()

Remove a line from a zone.

Syntax:

  $pubapi->jsonapi_removezonerecord( $domain, $Line );

jsonapi_getzonerecord()

Get a record from a zone.

Syntax:

  $pubapi->jsonapi_getzonerecord( $domain, $Line );

jsonapi_servicestatus()

Get the status of various services running on a system.

Syntax:

  $pubapi->jsonapi_servicestatus( $service );

jsonapi_configureservice()

Enable/Disable various services.

Syntax:

  $pubapi->jsonapi_configureservice( $service, $enabled, $monitored );

jsonapi_acctcounts()

Get the number of accounts on a system/that belong to a reseller.

Syntax:

  $pubapi->jsonapi_acctcounts( $user );

jsonapi_domainuserdata()

Get the information about a specific domain's virtualhost.

Syntax:

  $pubapi->jsonapi_domainuserdata( $domain );

jsonapi_editquota()

Edit a user's quota.

Syntax:

  $pubapi->jsonapi_editquota( $user, $quota );

jsonapi_nvget()

Get non-volatile data.

Syntax:

  $pubapi->jsonapi_nvget( $key );

jsonapi_nvset()

Set non-volatile data.

Syntax:

  $pubapi->jsonapi_nvset( $key, $value );

jsonapi_myprivs()

See what privileges are available to your user.

Syntax:

  $pubapi->jsonapi_myprivs(  );

jsonapi_listzones()

List all the zones available to a user.

Syntax:

  $pubapi->jsonapi_listzones(  );

jsonapi_sethostname()

Set the hostname of a system.

Syntax:

  $pubapi->jsonapi_sethostname( $hostname );

jsonapi_setresolvers()

Set the resolvers a system uses.

Syntax:

  $pubapi->jsonapi_setresolvers( $nameserver1, $nameserver2, $nameserver3 );

jsonapi_addip()

Add a new IP to a server.

Syntax:

  $pubapi->jsonapi_addip( $ip, $netmask );

jsonapi_delip()

Remove an IP from a server.

Syntax:

  $pubapi->jsonapi_delip( $ip, $ethernetdev, $skipifshutdown );

jsonapi_listips()

List the IPs on a server.

Syntax:

  $pubapi->jsonapi_listips(  );

jsonapi_dumpzone()

Get the contents of a zone file.

Syntax:

  $pubapi->jsonapi_dumpzone( $domain );

jsonapi_listpkgs()

List the packages available to your user.

Syntax:

  $pubapi->jsonapi_listpkgs(  );

jsonapi_limitbw()

Limit the amount of bandwidth available to an account.

Syntax:

  $pubapi->jsonapi_limitbw( $user, $bwlimit );

jsonapi_showbw()

Show the amount of BW used by an account.

Syntax:

  $pubapi->jsonapi_showbw( $month, $year, $showres, $search, $searchtype );

jsonapi_killdns()

Remove a DNS zone.

Syntax:

  $pubapi->jsonapi_killdns( $domain );

jsonapi_adddns()

Add a dns zone.

Syntax:

  $pubapi->jsonapi_adddns( $domain, $ip, $trueowner );

jsonapi_changepackage()

Change an Account's Package.

Syntax:

  $pubapi->jsonapi_changepackage( $user, $pkg );

jsonapi_modifyacct()

Modify an Account's limits.

Syntax:

  $pubapi->jsonapi_modifyacct( $user, $domain, $HASCGI, $CPTHEME, $LANG, $MAXPOP, $MAXFTP, $MAXLST, $MAXSUB, $MAXPARK, $MAXADDON, $MAXSQL, $shell );

jsonapi_suspendacct()

Suspend an account.

Syntax:

  $pubapi->jsonapi_suspendacct( $user, $reason );

jsonapi_unsuspendacct()

Unsuspend an account.

Syntax:

  $pubapi->jsonapi_unsuspendacct( $user );

jsonapi_listsuspended()

List the suspended accounts on a server.

Syntax:

  $pubapi->jsonapi_listsuspended(  );

jsonapi_addpkg()

Add a new package.

Syntax:

  $pubapi->jsonapi_addpkg( $pkgname, $quota, $ip, $cgi, $frontpage, $cpmod, $maxftp, $maxsql, $maxpop, $maxlst, $maxsub, $maxpark, $maxaddon, $featurelist, $hasshell, $bwlimit );

jsonapi_killpkg()

Remove a package.

Syntax:

  $pubapi->jsonapi_killpkg( $pkg );

jsonapi_editpkg()

Edit a package.

Syntax:

  $pubapi->jsonapi_editpkg( $pkgname, $quota, $ip, $cgi, $frontpage, $cpmod, $maxftp, $maxsql, $maxpop, $maxlst, $maxsub, $maxpark, $maxaddon, $featurelist, $hasshell, $bwlimit );

jsonapi_setacls()

Change features available to a reseller.

Syntax:

  $pubapi->jsonapi_setacls( $reseller, $acllist );

jsonapi_terminatereseller()

Remove a reseller.

Syntax:

  $pubapi->jsonapi_terminatereseller( $reseller, $verify );

jsonapi_resellerstats()

Get statistics on a specific reseller.

Syntax:

  $pubapi->jsonapi_resellerstats( $reseller );

jsonapi_setupreseller()

Make a cPanel account a Reseller account.

Syntax:

  $pubapi->jsonapi_setupreseller( $user, $makeowner );

jsonapi_lookupnsip()

Get the IP for a nameserver.

Syntax:

  $pubapi->jsonapi_lookupnsip( $nameserver );

jsonapi_listresellers()

List all the resellers on a system.

Syntax:

  $pubapi->jsonapi_listresellers(  );

jsonapi_listacls()

List all of the ACL lists available.

Syntax:

  $pubapi->jsonapi_listacls(  );

jsonapi_saveacllist()

Save a new ACL list.

Syntax:

  $pubapi->jsonapi_saveacllist( $acllist );

jsonapi_unsetupreseller()

Remove reseller permissions from an account.

Syntax:

  $pubapi->jsonapi_unsetupreseller( $user );

jsonapi_gethostname()

Get the hostname of the server currently being queried.

Syntax:

  $pubapi->jsonapi_gethostname(  );

jsonapi_fetchsslinfo()

Get information on a specific SSL certificate.

Syntax:

  $pubapi->jsonapi_fetchsslinfo( $domain, $crtdata );

jsonapi_installssl()

Install a new SSL certificate.

Syntax:

  $pubapi->jsonapi_installssl( $domain, $user, $cert, $key, $cab, $ip );

jsonapi_passwd()

Change an account's password.

Syntax:

  $pubapi->jsonapi_passwd( $user, $pass );

jsonapi_getlanglist()

Get a list of languages available on a system.

Syntax:

  $pubapi->jsonapi_getlanglist(  );

jsonapi_reboot()

Reboot the server.

Syntax:

  $pubapi->jsonapi_reboot( $force );

jsonapi_accountsummary_user()

Get a summary of an account.

Syntax:

  $pubapi->jsonapi_accountsummary_user( $user );

jsonapi_accountsummary_domain()

Get the summary of an account by specifying the domain.

Syntax:

  $pubapi->jsonapi_accountsummary_domain( $domain );

jsonapi_loadavg()

Get the loadavg on the system.

Syntax:

  $pubapi->jsonapi_loadavg(  );

jsonapi_restartservice()

Restart a service.

Syntax:

  $pubapi->jsonapi_restartservice( $service );

jsonapi_setsiteip_user()

Set the IP for a specific user.

Syntax:

  $pubapi->jsonapi_setsiteip_user( $user, $ip );

jsonapi_setsiteip_domain()

Set the IP for a specific domain.

Syntax:

  $pubapi->jsonapi_setsiteip_domain( $domain, $ip );

Bugs ^

see http://rt.cpan.org to report and view bugs

License ^

Copyright (c) 2011, 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.

syntax highlighting: