cPanel Reference
cPanel API
cPanel is an industry leading website hosting platform integrated with most servers and providers.
It facilitates the management and configuration of Internet web servers and manages domains, emails and more.
You can read more about cPanel and WHM at https://cpanel.net
ID | Function | Module | Command | Description |
---|---|---|---|---|
1 | Create Database | Mysql | create_database | This function creates a MySQL® database. |
2 | List Cron Jobs | Cron | listcron | This function lists all cron jobs. |
3 | Fetch Cron Jobs | Cron | fetchcron | This function lists all of the account's cron jobs. |
4 | Add Cron Line | Cron | add_line | This function adds a crontab entry. |
5 | Create cPanel API | cpanelAPI | new cpanelAPI | Creates a connection to your user specific cPanel. |
6 | Get Stats | StatsBar | get_States | This function lists a cPanel account's features. |
7 | List Features | Features | list_features | This function lists a cPanel account's features. |
8 | Resource Usage | ResourceUsage | get_usages | |
9 | Get Server Information | Variables | get_server_information | |
10 | Get Session Information | Variables | get_session_information | |
11 | Get User Information | Variables | get_user_information | |
12 | Get Redirect URL | DomainAliases | get_redirect_url | |
13 | Set Redirect URL | DomainAliases | set_redirect_url | |
14 | Disable Redirect | DomainAliases | disable_redirect | |
15 | Set Email | Cron | set_email | This function sets the default notification email for the cron daemon |
16 | Get Email | Cron | get_email | This function retrieves the notification email address. |
17 | Remove Line | Cron | remove_line | This function removes a crontab entry. |
18 | Edit Line | Cron | edit_line | This function edits a crontab entry. |
19 | Set Privileges on Database | Mysql | set_privileges_on_database | This function sets a MySQL® database user's privileges. |
20 | Get Privileges on Database | Mysql | get_privileges_on_database | This function lists a MySQL® database user's privileges. |
21 | Delete User | Mysql | delete_user | This function deletes a MySQL® user. |
22 | Rename User | Mysql | rename_user | This function renames a MySQL® database user |
23 | create_user | Mysql | Create User | This function creates a MySQL® database user. |
24 | List Users | Mysql | list_users | This function lists an account's MySQL® database users. |
25 | Repair Database | Mysql | repair_database | This function repairs all of the tables in a MySQL® database. |
26 | Check Database | Mysql | check_database | This function checks for errors in all of the tables in a MySQL® database. |
27 | Delete Database | Mysql | delete_database | This function deletes a MySQL® database. |
28 | Create Database | Mysql | create_database | This function creates a MySQL® database. |
29 | List Databases | Mysql | list_databases | This function lists an account's MySQL® databases. |
30 | Get Server Information | Mysql | get_server_information | This function returns information about the account's MySQL® host. |
31 | Single Domain Data | DomainInfo | single_domain_data | This function lists user data for a domain. |
32 | Domains Data | DomainInfo | domains_data | This function lists user data for the cPanel account's domains. |
33 | List Domains | DomainInfo | list_domains | |
34 | List Pops | list_pops | ||
35 | Add Pop | add_pop | This function creates an email address. | |
36 | Delete Pop | delete_pop | This function deletes an email address | |
37 | Create Autoresponder | add_auto_responder | This function creates an autoresponder for an email account. | |
38 | Delete Autoresponder | delete_auto_responder | This function deletes an autoresponder. | |
39 | Add Forwarder | add_forwarder | This function creates an email forwarder. | |
40 | Delete Forwarder | delete_forwarder | This function deletes an email forwarder | |
41 | Change Email Password | passwd_pop | This function changes an email account's password. | |
42 | Add Sub Domain | SubDomain | addsubdomain | This function creates a subdomain. |
43 | Delete Subdomain | SubDomain | delsubdomain | This function deletes a subdomain. |
44 | Get Settings | LogManager | get_settings | This function retrieves the account's log archival settings. |
45 | List Archives | LogManager | list_archives | |
46 | LangPHP | php_get_domain_handler | ||
47 | LangPHP | php_get_impacted_domains | ||
48 | LangPHP | php_get_installed_versions | ||
49 | LangPHP | php_get_system_default_version | ||
50 | LangPHP | php_get_vhost_versions | ||
51 | LangPHP | php_ini_get_user_basic_directives | ||
52 | LangPHP | php_ini_get_user_content | ||
53 | LangPHP | php_ini_get_user_paths | ||
54 | LangPHP | php_ini_set_user_basic_directives | ||
55 | LangPHP | php_ini_set_user_content | ||
56 | LangPHP | php_set_vhost_versions | ||
57 | Get Available Addons | cPAddons | get_available_addons | This function lists an account's available cPAddons. |
58 | Get Disk Usage | get_disk_usage | This function retrieves the disk space that an email account uses. | |
59 | List Forwarders | list_forwarders | This function lists a domain's forwarders. | |
60 | Add Forwarder | add_forwarder | This function creates an email forwarder. | |
61 | Delete Forwarder | delete_forwarder | This function deletes an email forwarder. | |
62 | List Auto Responders | list_auto_responders | This function lists a domain's autoresponders. | |
63 | Add Auto Responders | add_auto_responder | This function creates an autoresponder for an email account. | |
64 | Delete Auto Responder | delete_auto_responder | This function deletes an autoresponder. | |
65 | Get Client Settings | get_client_settings | This function retrieves an email account's client settings. | |
66 | Browse Mailbox | browse_mailbox | This function lists the mail directory's subdirectories (boxes) and files. | |
67 | Get Auto Responder | get_auto_responder | This function retrieves autoresponder information. | |
68 | Delete Addon Domain | AddonDomain | deladdondomain | This function deletes an addon domain and its subdomain. |
69 | List Addon Domains | AddonDomain | listaddondomains | This function lists an account's addon domains. We strongly recommend that you use UAPI instead of cPanel API 2. However, no equivalent UAPI function exists. Important: In cPanel & WHM version 76 and later, when you disable the Web Server role, the system disables this function. |
70 | Add Addon Domain | AddonDomain | addaddondomain | This function creates an addon domain, its subdomain, and its DNS zone. We strongly recommend that you use UAPI instead of cPanel API 2. However, no equivalent UAPI function exists. Important: In cPanel & WHM version 76 and later, when you disable the Web Server role, the system disables this function. |
71 | Add Redirect | Mime | add_redirect | This function adds a redirect to a domain. |