cPanel/Variables
cPanel module

Variables

3 functions, invoked through the cpanel_uapi tool.

scope cpanel:uapi
Call any function with cpanel_uapi(service_id, module="Variables", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.

get_server_information GET#

Return server's configuration settings

This function retrieves the configuration settings for the cPanel & WHM server on which an account exists. This is useful, for example, to verify which applications and functionality are available on the account.

namestringOptional
The server configuration settings to return. <details> <summary>Click to view information about the available server configuration settings.</summary> default_theme - The cPanel interface's default theme. email_filter_storage_directory - The location of the Exim email filter storage directory. allow_park_subdomain_on_hostname - Whether the system allows users to park subdomains of the server's hostname. allow_remote_domains - Whether the system allows users to create addon domains or aliases that resolve to other servers. allow_unregistered_domains - Whether the system allows users to add domains they didn't register with a domain name registrar. apache_port - The IP address or IP address with a firewall port number that Apache® uses to listen for requests and serve web pages over an unsecured connection. apache_ssl_port - The port or IP address that Apache uses to listen for requests and serve web pages over a secure connection. api_shell - Whether the user can access cPanel's API Shell interface (cPanel >> Home >> Advanced >> API Shell). awstats_browser_update - Whether the user can update their AWStats software. awstats_reverse_dns - Whether the AWStats statistical analysis software interprets visitors' domain names as IP addresses. cpanel_root_directory - The cPanel root directory. database_prefix_required - Whether the account requires database prefixing. display_cpanel_doclinks - Whether the system displays links to cPanel feature documentation in the cPanel interface. dnsadmin_app - The application that processes DNS management requests. empty_trash_days - The minimum age of files that the system will automatically purge from .trash folders in user home directories. enable_file_protect - Whether EasyApache 4's FileProtect option is enabled. file_upload_maximum_bytes - The maximum file size, in megabytes (MB), that a user can upload to a server. file_upload_must_leave_bytes - The minimum filesystem quota that the system requires after a file uploads to a server. * file_usage - Whether file usage information displays in the cPanel Home interface's statistics bar. ftp_server - The FTP server. htaccess_check_recurse - The maximum number of directories deep to look for .htaccess files when you change the PHP handler. * invite_sub - Whether cPanel account users can send invitations to new Subaccount users via cPanel's User Manager interface (cPanel >> Home >> Preferences >> User Manager). ipv6_listen - Whether the cpsrvd daemon and other cPanel & WHM services listen on IPv6. local_nameserver_type - The DNS nameserver's type. logout_redirect_url - The logout redirection URL. mailbox_storage_format - The mailbox storage format for new accounts. mail_server - The mailserver type. minimum_password_strength - The minimum strength for cPanel account passwords. minimum_password_strength_mysql - The minimum strength for MySQL® or MariaDB® passwords. mysql_host - The MySQL or MariaDB hostname or IP address. mysql_version - The MySQL or MariaDB version. php_maximum_execution_time - The number of seconds that a PHP script can run before the system terminates it. php_post_maximum_size - The maximum size, in megabytes (MB), of a POST request. php_system_default_version - The system's default version of PHP. php_upload_maximum_filesize - The maximum file size, in megabytes (MB), that a PHP script may upload. php_loader - The PHP loaders through which the system executes internal PHP scripts. php_open_basedir_home - Whether PHP open_basedir protection is enabled on the server. phpmyadmin_disable_search_info_schema - Whether the user can search for the phpMyAdmin information schema. docroots_in_public_html_only - Whether the system restricts users from creating addon domains and subdomains outside of their public_html directory. require_ssl - Whether the system requires passwords and other sensitive information use SSL encryption. * allow_reset_password - Whether cPanel's Reset Password feature is enabled for the account. * allow_reset_password_for_subaccounts - Whether cPanel's Reset Password feature is enabled for subaccounts on the account. * disable_analog - Whether users can access the Analog Stats interface (cPanel >> Home >> Metrics >> Analog Stats). skip_apache_clients_optimizer - Whether the Apache Client Optimizer is enabled. disable_awstats - Whether the AWStats software is enabled. skip_mailbox_warnings_check - Whether mailbox usage warnings are enabled. disable_boxtrapper - Whether BoxTrapper is enabled. skip_bandwidth_limit_check - Whether the system automatically suspends HTTP service for accounts that exceed their bandwidth limit. disable_mailman - Whether Mailman mailing lists are enabled. disable_roundcube - Whether Roundcube webmail is enabled. disable_spamassassin - Whether the Apache SpamAssassin™ spam filter is enabled. disable_spambox - Whether Apache SpamAssassin's spam box feature is enabled. disable_webalizer - Whether the Webalizer statistics program is enabled. ssl_default_key_type - The default SSL/TLS encryption algorithm used by the system. use_information_schema - Whether the system uses the MySQL® INFORMATION_SCHEMA view. This view includes disk usage by all MySQL tables in the disk usage totals. use_mail_for_mailman_url - Whether the system prefixes Mailman URLs with the mail prefix. For example, http://mail.domain.com/mailman. is_mod_userdir_enabled - Whether the Apache mod_userdir Tweak is enabled. version - The system's Linux® kernel version. </details> Note: If you don't use this parameter, this function returns all of the server's configuration settings. * To retrieve multiple variables, increment this parameter. For example, name-1=variable, name-2=variable, name-3=variable.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

allow_park_subdomain_on_hostnameinteger
Whether the system allows users to park subdomains of the server's hostname. 1 - Allows. 0 - Doesn't allow.
One of: 1 0
allow_remote_domainsinteger
Whether the system allows users to create addon domains or aliases that resolve to other servers. 1 - Allows. 0 - Doesn't allow.
One of: 1 0
allow_reset_passwordinteger
Whether cPanel's Reset Password feature is enabled for the account. * 1 - Reset Password feature enabled. * 0 - Reset Password feature not enabled.
One of: 1 0
allow_reset_password_for_subaccountsinteger
Whether cPanel's Reset Password feature is enabled for subaccounts on the account. * 1 - Reset Password feature enabled. * 0 - Reset Password feature not enabled.
One of: 1 0
allow_unregistered_domainsinteger
Whether the system allows users to add domains they didn't register with a domain name registrar. 1 - Allows. 0 - Doesn't allow.
One of: 1 0
apache_portstring
The IP address or IP address with a firewall port number that Apache uses to listen for requests and serve web pages over an unsecured connection.
apache_ssl_portstring
The IP address or IP address with a firewall port number that Apache uses to listen for requests and serve web pages over a secure connection.
api_shellinteger
Whether the user can access cPanel's API Shell interface (cPanel >> Home >> Advanced >> API Shell). 1 - Can access. 0 - Can't access.
One of: 1 0
awstats_browser_updateinteger
Whether the user can update their AWStats software. 1 - Can update. 0 - Can't update.
One of: 1 0
awstats_reverse_dnsinteger
Whether the AWStats statistical analysis software interprets visitors' domain names as IP addresses. 1 - Interprets visitors' domain names as IP addresses. 0 - Doesn't interpret visitors' domain names as IP addresses.
One of: 1 0
cpanel_root_directorystring
The cPanel root directory.
database_prefix_requiredinteger
Whether the account requires database prefixing. 1 - Requires database prefixing. 0 - Doesn't require database prefixing.
One of: 1 0
default_themestring
The cPanel interface's default theme.
disable_analoginteger
Whether users can access the Analog Stats interface (cPanel >> Home >> Metrics >> Analog Stats). 1 - Enabled. 0 - Not enabled.
One of: 1 0
disable_awstatsinteger
Whether the AWStats software is enabled. 1 - Enabled. 0 - Not enabled.
One of: 1 0
disable_boxtrapperinteger
Whether BoxTrapper is enabled. 1 - Enabled. 0 - Not enabled.
One of: 1 0
disable_mailmaninteger
Whether Mailman mailing lists are enabled. 1 - Enabled. 0 - Not enabled.
One of: 1 0
disable_roundcubeinteger
Whether Roundcube webmail is enabled. 1 - Enabled. 0 - Not enabled.
One of: 1 0
disable_spamassassininteger
Whether the Apache SpamAssassin spam filter is enabled. 1 - Enabled. 0 - Not enabled.
One of: 1 0
disable_spamboxinteger
Whether Apache SpamAssassin's spam box feature is enabled. 1 - Enabled. 0 - Not enabled.
One of: 1 0
disable_webalizerinteger
Whether the Webalizer statistics program is enabled. 1 - Enabled. 0 - Not enabled.
One of: 1 0
display_cpanel_doclinksinteger
Whether the system displays links to cPanel feature documentation in the cPanel interface. 1 - Displays documentation links. 0 - Doesn't display documentation links.
One of: 1 0
dnsadmin_appstring
The application that processes DNS management requests. The value is an application's file path, relative to the user's home directory. dnsadmin * auto-detect SSL
docroots_in_public_html_onlyinteger
Whether the system restricts users from creating addon domains and subdomains outside of their public_html directory. 1 - Restricts users from creating addon domains and subdomains outside of their public_html directory. 0 - Allows users to creating addon domains and subdomains outside of their public_html directory.
One of: 1 0
email_filter_storage_directorystring
The location of the Exim email filter storage directory.
empty_trash_daysstring
The minimum age of files that the system will automatically purge from .trash folders in user home directories.
enable_file_protectinteger
Whether EasyApache 4's FileProtect option is enabled. 1 - Enabled. 0 - Not enabled.
One of: 1 0
file_upload_maximum_bytesinteger
The maximum file size, in megabytes (MB), that a user can upload to a server.
file_upload_must_leave_bytesinteger
The minimum filesystem quota that the system requires after a file uploads to a server.
file_usageinteger
Whether file usage information displays in the cPanel Home interface's statistics bar. 1 - Displays file usage information. 0 - Doesn't display file usage information.
One of: 1 0
ftp_serverstring
The FTP server. pure-ftpd - The Pure-FTPD server. proftpd - The ProFTPD FTP server. * disabled - FTP has been disabled on this server.
One of: pure-ftpd proftpd disabled
htaccess_check_recurseinteger
The maximum number of directories deep to look for .htaccess files when you change the PHP handler.
invite_subinteger
Whether cPanel account users can send invitations to new Subaccount users via cPanel's User Manager interface (cPanel >> Home >> Preferences >> User Manager). 1 - Can send invitations. 0 - Can't send invitations.
One of: 1 0
ipv6_listeninteger
Whether the cpsrvd daemon and other cPanel & WHM services listen on IPv6. 1 - Listen on IPv6. 0 - Don't listen on IPv6.
One of: 1 0
is_mod_userdir_enabledinteger
Whether the Apache mod_userdir Tweak is enabled. 1 - Enabled. 0 - Not enabled.
One of: 1 0
local_nameserver_typestring
The DNS nameserver's type. powerdns - The PowerDNS nameserver. bind - The bind nameserver. * disabled - Nameserver's have been disabled on this server.
One of: powerdns bind disabled
logout_redirect_urlstring
The logout redirection URL.
mail_serverstring
The mailserver type. dovecot - The Dovecot mailserver. disabled - The mailserver is disabled on this system.
One of: dovecot disabled
mailbox_storage_formatstring
The mailbox storage format for new accounts. mdbox - The mdbox storage format. maildir - The maildir storage format.
One of: mdbox maildir
minimum_password_strengthinteger
The minimum strength for cPanel account passwords.
minimum_password_strength_mysqlinteger
The minimum strength for MySQL or MariaDB passwords.
mysql_hoststring
The MySQL or MariaDB hostname or IP address.
mysql_versionstring
The MySQL or MariaDB version.
php_loaderstring
The PHP loaders through which the system executes internal PHP scripts. ioncube - The ionCube PHP loader. sourceguardian - The SourceGuardian PHP loader. ioncube,sourceguardian - Both the ionCube and SourceGuardian PHP loaders are in use. An emtpy string - PHP loader is not in use.
One of: ioncube sourceguardian ioncube,sourceguardian
php_maximum_execution_timeinteger
The number of seconds that a PHP script can run before the system terminates it.
php_open_basedir_homeinteger
Whether PHP open_basedir protection is enabled on the server. 1 - Enabled. 0 - Not enabled. Important: We removed WHM's PHP open_basedir Tweak interface (WHM >> Home >> Security Center >> PHP open_basedir Tweak)
One of: 1 0
php_post_maximum_sizeinteger
The maximum size, in megabytes (MB), of a POST request.
php_system_default_versionstring
The system's default version of PHP.
php_upload_maximum_filesizeinteger
The maximum file size, in megabytes (MB), that a PHP script may upload.
phpmyadmin_disable_search_info_schemainteger
Whether the user can search for the phpMyAdmin information schema. 1 - Searches are enabled. 0 - Searches are not enabled.
One of: 1 0
require_sslinteger
Whether the system requires passwords and other sensitive information use SSL encryption. 1 - Requires SSL. 0 - Doesn't require SSL.
One of: 1 0
skip_apache_clients_optimizerinteger
Whether the Apache Client Optimizer is enabled. 1 - Enabled. 0 - Not enabled.
One of: 1 0
skip_bandwidth_limit_checkinteger
Whether the system automatically suspends HTTP service for accounts that exceed their bandwidth limit. 1 - Suspends HTTP service. 0 - Doesn't suspend HTTP service.
One of: 1 0
skip_mailbox_warnings_checkinteger
Whether mailbox usage warnings are enabled. 1 - Enabled. 0 - Not enabled.
One of: 1 0
ssl_default_key_typestring
The default SSL/TLS encryption algorithm used by the system. rsa-2048 - The rsa-2048 encryption algorithm. ecdsa-secp384r1 - The ecdsa-secp384r1 encryption algorithm. ecdsa-prime256v1 - The ecdsa-prime256v1 encryption algorithm. rsa-4096 - The rsa-4096 encryption algorithm.
One of: rsa-2048 ecdsa-secp384r1 ecdsa-prime256v1 rsa-4096
use_information_schemainteger
Whether the system uses the MySQL INFORMATION_SCHEMA view. This view includes disk usage by all MySQL tables in the disk usage totals. 1 - Uses MySQL's INFORMATION_SCHEMA view. 0 - Doesn't use MySQL's INFORMATION_SCHEMA view.
One of: 1 0
use_mail_for_mailman_urlinteger
Whether the system prefixes Mailman URLs with mail. For example, http://mail.domain.com/mailman. 1 - Prefixes Mailman URLs with the mail. prefix. 0 - Doesn't prefix Mailman URLs with the mail. prefix.
One of: 1 0
versionstring
The system's Linux Kernel version.

get_session_information GET#

Return web server's hostname

This function retrieves a web server's hostname.

namestringOptional
The web server environment variable to retrieve. You can only retrieve the web server's hostname. * host is the only possible value.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

hoststring
The web server's hostname.

get_user_information GET#

Return cPanel account's configuration settings

This function retrieves the user's account configuration settings.

namestringOptional
The user configuration variables to retrieve. If you don't use this parameter, this function returns all of the user's configuration data. Note: To retrieve multiple account configuration settings for a user, increment the parameter name. For example: name-0, name-1, and name-2.

Response — normalized as { ok, data, errors[], warnings[] }; data contains:

backup_enabledinteger
Whether the user has backups enabled. 1 - Backups enabled. 0 - Backups not enabled.
One of: 0 1
bandwidth_limitinteger
The account's bandwidth limit. 0 - unlimited A maximum amount of bandwidth, in bytes.
cgi_enabledinteger
Whether CGI is enabled. 1 - Enabled. 0 - Not enabled.
One of: 0 1
contact_emailstring
The account's contact email address.
contact_email_2string
The account's alternate contact email address, if one exists.
cpanel_root_directorystring
The root directory.
createdinteger
The account's creation date in Unix time format.
created_in_versionstring
The version of cPanel used during account creation.
database_ownerstring
The owner of the account's databases. root A reseller account's username. * The account's username.
dead_domainsarray<string>
The account's inactive domains.
demo_modeinteger
Whether demo mode is enabled. 1 - Enabled. 0 - Not enabled.
One of: 0 1
disk_block_limitinteger
The number of disk blocks for the account. 0 - unlimited A maximum amount of disk blocks, in kilobytes.
dkim_enabledinteger
Whether DomainKeys Identified Mail (DKIM) is enabled. 1 - Enabled. 0 - Not enabled.
One of: 0 1
domainstring
The account's main domain.
domainsarray<string>
list of the account's domains and subdomains.
featureobject
The available features on the account that exist in the /var/cpanel/users/user file, where user represents the cPanel user. Note: This object returns any custom features that the hosting provider adds to the /var/cpanel/users/user` file.
additionalPropertiesinteger
Whether the feature is enabled. 1 - Enabled. 0 - Disabled. Note: The feature's name is the return name.
One of: 0 1
feature_liststring
The account's feature list name.
gidinteger
The account's group ID.
homestring
The user's home directory.
home_directory_linksarray<any>
Any symlinks to the cPanel account's home directory. An array of one or more home directory symlinks.
ipstring
The account's IPv4 address.
langstring
The account's language.
last_modifiedinteger
The most recent modification time of the /var/cpanel/users/user file in Unix time format. Note: user represents the cPanel user.
legacy_backup_enabledinteger
Whether legacy backups are enabled. 1 - Enabled. 0 - Disabled.
One of: 0 1
localestring
The account's default locale, a two-letter ISO-3166 code.
mailbox_formatstring
The storage format that the account's mailboxes use. maildir mbox
One of: maildir mbox
maximum_addon_domainsany
The account's maximum number of addon domains. unlimited An integer that represents a number of addon domains.
maximum_databasesany
The account's maximum number of SQL databases. unlimited An integer that represents a number of SQL databases.
maximum_defer_fail_percentageany
The percentage of failed or deferred email messages that the account can send per hour before outgoing mail is rate-limited. unlimited An integer value.
maximum_email_account_disk_quotaany
The maximum size, that the account can define when it creates an email account. unlimited An integer value, in Megabytes (MB).
maximum_emails_per_hourany
The maximum number of emails that the account can send in one hour. A positive integer. 0 or unlimited - The account can send an unlimited number of emails.
maximum_ftp_accountsany
The account's maximum number of FTP accounts. unlimited An integer that represents a number of FTP accounts.
maximum_mail_accountsany
The maximum number of email accounts for the account. unlimited An integer that represents a number of email accounts.
maximum_mailing_listsany
The account's maximum number of mailing lists. unlimited An integer that represents a number of mailing lists.
maximum_parked_domainsany
The account's maximum number of aliases. unlimited An integer that represents a number of aliases.
maximum_passenger_appsany
The account's maximum number of Ruby applications. unlimited An integer that represents a number of applications.
maximum_subdomainsany
The account's maximum number of subdomains. unlimited An integer that represents a number of subdomains.
mxcheckobject
Domains and their mail exchanger (MX) type.
additionalPropertiesstring
The domain's MX type. local - Accept mail locally for the domain. remote - Do not accept mail locally for the domain. * secondary - Accept mail until a higher priority mail server is available. Note: The return's name is the domain name.
One of: local remote secondary
notify_account_authn_linkinteger
Whether the systems sends a notification when someone links the account to an external authentication account. 1 - Notifies. 0 - Doesn't notify.
One of: 0 1
notify_account_authn_link_notification_disabledinteger
Whether the systems sends a notification when someone disables notifications for external authentication account links. 1 - Notifies. 0 - Doesn't notify.
One of: 0 1
notify_account_logininteger
Whether the system sends a notification when someone logs in to the account. 1 - Notifies. 0 - Doesn't notify.
One of: 0 1
notify_account_login_for_known_netblockinteger
Whether the system sends a notification when a user on a known netblock logs in to the account. 1 - Notifies. 0 - Doesn't notify.
One of: 0 1
notify_account_login_notification_disabledinteger
Whether the system sends a notification when someone disables notifications for account logins. 1 - Notifies. 0 - Doesn't notify.
One of: 0 1
notify_autossl_expiryinteger
Whether the system sends a notification when an AutoSSL certificate expires. 1 - Notifies. 0 - Doesn't notify
One of: 0 1
notify_autossl_expiry_coverageinteger
Whether the system sends a notification when AutoSSL cannot renew a certificate because domains that fail Domain Control Validation (DCV) exist on the current certificate. 1 - Notifies. 0 - Doesn't notify.
One of: 0 1
notify_autossl_renewal_coverageinteger
Whether the system sends a notification when AutoSSL renews a certificate. 1 - Notifies. 0 - Doesn't notify.
One of: 0 1
notify_autossl_renewal_coverage_reducedinteger
Whether the system sends a notification when AutoSSL renews a certificate, but the new certificate lacks at least one domain that the previous certificate secured. 1 - Notifies. 0 - Doesn't notify.
One of: 0 1
notify_autossl_renewal_uncovered_domainsinteger
Whether the system sends a notification when AutoSSL renews a certificate, but the new certificate lacks at least one domain that the previous certificate secured. 1 - Notifies. 0 - Doesn't notify.
One of: 0 1
notify_bandwidth_limitinteger
Whether the systems sends a notification when the account reaches its bandwidth quota. 1 - Notifies. 0 - Doesn't notify.
One of: 0 1
notify_contact_address_changeinteger
Whether the systems sends a notification when someone changes the contact address for the account. 1 - Notifies. 0 - Doesn't notify.
One of: 0 1
notify_contact_address_change_notification_disabledinteger
Whether the systems sends a notification when someone disables the notification for contact address changes. 1 - Notifies. 0 - Doesn't notify.
One of: 0 1
notify_disk_limitinteger
Whether the systems sends a notification when the account reaches its disk usage limit. 1 - Notifies. 0 - Doesn't notify.
One of: 0 1
notify_password_changeinteger
Whether the systems sends a notification when someone changes the account's password. 1 - Notifies. 0 - Doesn't notify.
One of: 0 1
notify_password_change_notification_disabledinteger
Whether the systems sends a notification when someone disables notifications for password changes. 1 - Notifies. 0 - Doesn't notify.
One of: 0 1
notify_ssl_expiryinteger
Whether the systems sends a notification when an SSL certificate on the account expires. 1 - Notifies. 0 - Doesn't notify.
One of: 0 1
notify_twofactorauth_changeinteger
Whether the systems sends a notification when the account's Two-Factor Authentication (2FA) credentials change. 1 - Notifies. 0 - Doesn't notify.
One of: 0 1
notify_twofactorauth_change_notification_disabledinteger
Whether the systems sends a notification when someone disables notifications for 2FA. 1 - Notifies. 0 - Doesn't notify.
One of: 0 1
ownerstring
The account's owner. root A reseller account's username. * The account's username.
package_extensionsarray<string>
The account's package extensions.
planstring
The account's hosting package.
pushbullet_access_tokenstring
The account's Pushbullet access token.
shellstring
The account's shell.
spf_enabledinteger
Whether Sender Policy Framework (SPF) is enabled. 1 - Enabled. 0 - Not enabled.
One of: 0 1
ssl_default_key_typestring
The type of key to generate for the user’s TLS certificates and CSRs. system — The system’s ssl_default_key_type value in the cpanel.config file. rsa-2048 — 2,048-bit RSA. rsa-4096 — 4,096-bit RSA. ecdsa-prime256v1 — ECDSA prime256v1 (“P-256”). * ecdsa-secp384r1 — ECDSA secp384r1 (“P-384”).
One of: system rsa-2048 rsa-4096 ecdsa-prime256v1 ecdsa-secp384r1
themestring
The account's current theme.
uidinteger
The account's user ID on the system.
userstring
An existing account's username.
utf8_mailboxinteger
Whether UTF-8-encoded mailbox names are enabled for the cPanel account. 1 - Enabled. 0 - Not enabled.
One of: 0 1