Comprehensive Guide to WHM API 1 Functions in cPanel Print

  • 0

In cPanel, WHM API 1 provides a variety of functions for managing various aspects of cPanel accounts. Below is a list of some of the commonly used WHM API 1 functions:

Account Management

Create Account:
Creates a new cPanel account.
whmapi1 createacct username=username domain=example.com password=password
Remove Account
Deletes an existing cPanel account.
whmapi1 removeacct user=username
Suspend Account
Suspends a cPanel account, preventing access and functionality.
whmapi1 suspendacct user=username reason='Reason for suspension'
Unsuspend Account
Restores access to a suspended cPanel account.
whmapi1 unsuspendacct user=username
 
Email Management
Suspend Outgoing Email
Prevents a cPanel account from sending outgoing emails.
whmapi1 suspend_outgoing_email user=cpanelusername
Unsuspend Outgoing Email
Restores the ability to send outgoing emails for a cPanel account.
whmapi1 unsuspend_outgoing_email user=cpanelusername
List Email Accounts
Lists all email accounts for a specified cPanel user.
whmapi1 list_pops user=cpanelusername
Create Email Account
Creates a new email account under a specified cPanel user.
whmapi1 addpop email=email@domain.com password=password quota=quota user=cpanelusername
Delete Email Account
Deletes an email account.
whmapi1 delpop email=email@domain.com user=cpanelusername

DNS Management

Add DNS Zone
Adds a DNS zone for a specified domain.
whmapi1 adddns user=cpanelusername domain=example.com
Edit DNS Zone
Edits a DNS zone record.
whmapi1 editzonerecord zone=example.com line=1 address=1.2.3.4
Remove DNS Zone
Removes a DNS zone.
whmapi1 killdns domain=example.com

Package Management

Create Package
Creates a new hosting package with specified parameters.
whmapi1 addpkg name=package_name quota=quota bandwidth=bandwidth maxsql=maxsql
Delete Package
Deletes an existing hosting package.
whmapi1 killpkg name=package_name

SSL Management

Install SSL Certificate
Installs an SSL certificate for a specified domain.
whmapi1 installssl domain=example.com crt='certificate_content' key='private_key_content' cabundle='ca_bundle_content'
Delete SSL Certificate
Deletes an SSL certificate for a specified domain.
whmapi1 deletessl domain=example.com

Backup Management

Create Backup
Creates a backup of a specified cPanel account.
whmapi1 createrepo user=username
Restore Backup
Restores a backup for a specified cPanel account.
whmapi1 restorepkg user=username

Server Information

Get Server Information
Retrieves the hostname of the server.
whmapi1 gethostname
Get Server Load
Retrieves the current server load.
whmapi1 loadavg

User Management

Change User Password
Changes the password for a specified cPanel user.
whmapi1 passwd user=username password=newpassword
Modify User Quota
Modifies the disk quota for a specified cPanel user.
whmapi1 editquota user=username quota=newquota

Additional Useful Functions

List Accounts
Lists all cPanel accounts on the server.
whmapi1 listaccts
Terminate Account
Terminates a specified cPanel account.
whmapi1 terminateacct user=username
Suspend Reseller Account
Suspends a reseller account, preventing access and functionality.
whmapi1 suspendreseller user=username
Unsuspend Reseller Account
Restores access to a suspended reseller account.
whmapi1 unsuspendreseller user=username

Conclusion

WHM API 1 offers a comprehensive set of functions to manage cPanel accounts and server operations efficiently. Understanding and utilizing these functions can greatly enhance your ability to administer and troubleshoot cPanel environments.

For more detailed information on WHM API 1 functions, refer to the official WHM API 1 documentation. If you encounter issues or need further assistance, please refer to our detailed knowledge base at www.domainindia.com/knowledgebase or submit a ticket at www.domainindia.com/support.


Was this answer helpful?

« Back