[Development Guides Home](/guides) # Guide to Replacing cPanel API 1 Functions with UAPI Equivalents This document lists the UAPI functions that replace previously-deprecated cPanel API 1 functions. As we developed additional UAPI functions, we created equivalents to some cPanel API 1 functions. These new modules and functions replace any cPanel API 1 functions without a current equivalent. We are [actively removing](https://docs.cpanel.net/knowledge-base/cpanel-product/cpanel-deprecation-plan) the cPanel API 1 functions. We **strongly** recommend that anyone using a cPanel API 1 function use a UAPI function instead. ## Replace cPanel API 1 functions with UAPI equivalents To retrieve a list of cPanel API 1 functions that custom integrations call your system, call the following WHM API 1 functions: * [`get_api_calls`](/openapi/whm/operation/get_api_calls/) * [`get_api_pages`](/openapi/whm/operation/get_api_pages/) The following examples display code from a cPanel API 1 function and its UAPI equivalent. Click the tab below that corresponds to your chosen development language. div Note: The examples below compare the cPanel API 1 `SetLang::setlang` function and the UAPI [Locale::set_locale](/openapi/cpanel/operation/set_locale/) function. #### LiveAPI PHP Class **cPanel API 1 function** ```php $cpanel = new CPANEL(); // Connect to cPanel - only do this once. // Set the "en" locale for the account. $new_language = $cpanel->api1( 'SetLang', 'setlang', array('en') ); ``` **UAPI Function** ```php $cpanel = new CPANEL(); // Connect to cPanel - only do this once. // Set the "en" locale for the account. $set_locale = $cpanel->uapi( 'Locale', 'set_locale', array( 'locale' => 'en', ) ); ``` #### LiveAPI Perl Module **cPanel API 1 function** ```perl my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once. # Set the "en" locale for the account. my $new_language = $cpliveapi->api1( 'SetLang', 'setlang', ['en'] ); ``` **UAPI function** ```perl my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once. # Set the "en" locale for the account. my $set_locale = $cpliveapi->uapi( 'Locale', 'set_locale', { 'locale' => 'en', } ); ``` div Note: For more information, read our [Guide to the LiveAPI System](/guides/guide-to-the-liveapi-system). For more information about how to replace a cPanel API 1 function with a UAPI function, read our [Replace a cPanel API 1 Function With a UAPI Function](/guides/quickstart-development-guide/tutorial-replace-a-cpanel-api-1-function-with-a-uapi-function) documentation. ## UAPI functions and legacy equivalents The following tables list the UAPI functions that we added. The tables also list their cPanel API 1 equivalent functions. For a complete list of UAPI functions and cPanel API 1 functions, read our [Guide to UAPI](/cpanel/introduction/) and [Guide to cPanel API 1](https://documentation.cpanel.net/display/DD/Guide+to+cPanel+API+1) documentation. #### BoxTrapper | cPanel API 1 Functions | UAPI Functions | | --- | --- | | [`BoxTrapper::changestatus`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+BoxTrapper%3A%3Achangestatus) | [`BoxTrapper::set_status`](/openapi/cpanel/operation/set_status/) | | [`BoxTrapper::fetchcfgfile`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+BoxTrapper%3A%3Afetchcfgfile) | [`BoxTrapper::get_forwarders`](/openapi/cpanel/operation/get_forwarders/)[`BoxTrapper::get_email_template`](/openapi/cpanel/operation/get_email_template/)[`BoxTrapper::set_blocklist`](/specifications/cpanel.openapi/spam-prevention-(boxtrapper)/boxtrapper::set_blocklist/)[`BoxTrapper::get_blocklist`](/specifications/cpanel.openapi/spam-prevention-(boxtrapper)/boxtrapper::get_blocklist/)[`BoxTrapper::get_allowlist`](/specifications/cpanel.openapi/spam-prevention-(boxtrapper)/boxtrapper::get_allowlist/) | | [`BoxTrapper::listmsgs`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+BoxTrapper%3A%3Alistmsgs) | [`BoxTrapper::list_email_templates`](/openapi/cpanel/operation/list_email_templates/) | | [`BoxTrapper::logcontrols`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+BoxTrapper%3A%3Alogcontrols)[`BoxTrapper::showlog`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+BoxTrapper%3A%3Ashowlog) | [`BoxTrapper::get_log`](/openapi/cpanel/operation/get_log/) | | [`BoxTrapper::messageaction`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+BoxTrapper%3A%3Amessageaction)[`BoxTrapper::multimessageaction`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+BoxTrapper%3A%3Amultimessageaction) | [`BoxTrapper::blacklist_messages`](/openapi/cpanel/operation/blacklist_messages/)[`BoxTrapper::delete_messages`](/openapi/cpanel/operation/delete_messages/)[`BoxTrapper::deliver_messages`](/openapi/cpanel/operation/deliver_messages/)[`BoxTrapper::ignore_messages`](/openapi/cpanel/operation/ignore_messages/)[`BoxTrapper::whitelist_messages`](/openapi/cpanel/operation/whitelist_messages/)[`BoxTrapper::process_messages`](/openapi/cpanel/operation/process_messages/) | | [`BoxTrapper::resetmsg`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+BoxTrapper%3A%3Aresetmsg) | [`BoxTrapper::reset_email_template`](/openapi/cpanel/operation/reset_email_template/) | | [`BoxTrapper::savecfgfile`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+BoxTrapper%3A%3Asavecfgfile) | [`BoxTrapper::set_allowlist`](/specifications/cpanel.openapi/spam-prevention-(boxtrapper)/boxtrapper::set_allowlist) | | [`BoxTrapper::saveconf`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+BoxTrapper%3A%3Asaveconf) | [`BoxTrapper::save_configuration`](/openapi/cpanel/operation/save_configuration/)[`BoxTrapper::save_email_template`](/openapi/cpanel/operation/save_email_template/)[`BoxTrapper::set_forwarders`](/openapi/cpanel/operation/set_forwarders/) | | [`BoxTrapper::showautowhitelist`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+BoxTrapper%3A%3Ashowautowhitelist)[`BoxTrapper::showemails`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+BoxTrapper%3A%3Ashowemails)[`BoxTrapper::showfromname`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+BoxTrapper%3A%3Ashowfromname)[`BoxTrapper::showqueuetime`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+BoxTrapper%3A%3Ashowqueuetime) | [`BoxTrapper::get_configuration`](/openapi/cpanel/operation/get_configuration/) This function returns all of an account's BoxTrapper configuration settings. | | [`BoxTrapper::showmessage`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+BoxTrapper%3A%3Ashowmessage) | [`BoxTrapper::get_message`](/openapi/cpanel/operation/get_message/) | | [`BoxTrapper::showqueue`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+BoxTrapper%3A%3Ashowqueue)[`BoxTrapper::showqueuesearch`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+BoxTrapper%3A%3Ashowqueuesearch) | [`BoxTrapper::list_queued_messages`](/openapi/cpanel/operation/list_queued_messages/) This function inherently has [filtering capabilities](/cpanel/filters/). | | [`BoxTrapper::status`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+BoxTrapper%3A%3Astatus)[`BoxTrapper::statusbutton`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+BoxTrapper%3A%3Astatusbutton) | [`BoxTrapper::get_status`](/openapi/cpanel/operation/get_status/) | #### ClamScanner | cPanel API 1 Functions | UAPI Functions | | --- | --- | | [`ClamScanner::bars`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+ClamScanner%3A%3Abars) | [`ClamScanner::get_scan_status`](/specifications/cpanel.openapi/antivirus-protection-(clamav)/clamscanner::get_scan_status)[`ClamScanner::get_scan_paths`](/specifications/cpanel.openapi/antivirus-protection-(clamav)/clamscanner::get_scan_paths)[`ClamScanner::start_scan`](/specifications/cpanel.openapi/antivirus-protection-(clamav)/clamscanner::start_scan)[`ClamScanner::list_infected_files`](/specifications/cpanel.openapi/antivirus-protection-(clamav)/clamscanner::list_infected_files)[`ClamScanner::disinfect_files`](/openapi/cpanel/operation/disinfect_files/)[`ClamScanner::check_disinfection_status`](/specifications/cpanel.openapi/antivirus-protection-(clamav)/clamscanner::check_disinfection_status) | #### DenyIp | cPanel API 1 Functions | UAPI Functions | | --- | --- | | [`DenyIp::adddenyip`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+DenyIp%3A%3Aadddenyip) | [`BlockIp::add_ip`](/openapi/cpanel/operation/blockip-add-ip/) | | [`DenyIp::deldenyip`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+DenyIp%3A%3Adeldenyip) | [`BlockIp::remove_ip`](/openapi/cpanel/operation/blockip-remove-ip/) | #### Fileman | cPanel API 1 Functions | UAPI Functions | | --- | --- | | [`Fileman::restoredb`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Fileman%3A%3Arestoredb) | [`Backup::restore_databases`](/openapi/cpanel/operation/restore_databases/) | | [`Fileman::restorefiles`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Fileman%3A%3Arestorefiles) | [`Backup::restore_files`](/openapi/cpanel/operation/restore_files/) | | [`Fileman::restoreaf`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Fileman%3A%3Arestoreaf) | [`Backup::restore_email_filters`](/openapi/cpanel/operation/restore_email_filters/)[`Backup::restore_email_forwarders`](/openapi/cpanel/operation/restore_email_forwarders/) | #### Gpg | cPanel API 1 Functions | UAPI Functions | | --- | --- | | [`Gpg::deletekey`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Gpg%3A%3Adeletekey) | [`GPG::delete_keypair`](/openapi/cpanel/operation/delete_keypair/) | | [`Gpg::exportkey`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Gpg%3A%3Aexportkey) | [`GPG::export_public_key`](/openapi/cpanel/operation/export_public_key/) | | [`Gpg::exportsecretkey`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Gpg%3A%3Aexportsecretkey) | [`GPG::export_secret_key`](/openapi/cpanel/operation/export_secret_key/) | | [`Gpg::genkey`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Gpg%3A%3Agenkey) | [`GPG::generate_key`](/openapi/cpanel/operation/generate_key/) | | [`Gpg::importkeys`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Gpg%3A%3Aimportkeys) | [`GPG::import_key`](/openapi/cpanel/operation/import_key/) | #### Htaccess | cPanel API 1 Functions | UAPI Functions | | --- | --- | | [`Htaccess::del_user`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Htaccess%3A%3Adel_user) | [`DirectoryPrivacy::delete_user`](/openapi/cpanel/operation/delete_user/) | | [`Htaccess::htdirls`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Htaccess%3A%3Ahtdirls) | [`DirectoryPrivacy::list_directories`](/specifications/cpanel.openapi/directory-privacy/directoryprivacy-list_directories)[`DirectoryIndexes::list_directories`](/specifications/cpanel.openapi/directory-indexes/directoryindexes-list_directories)[`DirectoryProtection::list_directories`](/specifications/cpanel.openapi/directory-protection/directoryprotection-list_directories) | | [`Htaccess::number_of_users`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Htaccess%3A%3Anumber_of_users)[`Htaccess::showusers`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Htaccess%3A%3Ashowusers) | [`DirectoryPrivacy::list_users`](/specifications/cpanel.openapi/directory-privacy/directoryprivacy::list_users) | | [`Htaccess::resname`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Htaccess%3A%3Aresname) | [`DirectoryIndexes::get_indexing`](/openapi/cpanel/operation/get_indexing/) | | [`Htaccess::setindex`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Htaccess%3A%3Asetindex) | [`DirectoryIndexes::set_indexing`](/openapi/cpanel/operation/set_indexing/) | | [`Htaccess::set_pass`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Htaccess%3A%3Aset_pass) | [`DirectoryPrivacy::add_user`](/openapi/cpanel/operation/add_user/) | | [`Htaccess::set_protect`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Htaccess%3A%3Aset_protect) | [`DirectoryPrivacy::configure_directory_protection`](/openapi/cpanel/operation/configure_directory_protection/) | #### ImageManager | cPanel API 1 Functions | UAPI Functions | | --- | --- | | [`ImageManager::convert`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+ImageManager%3A%3Aconvert) | [`ImageManager::convert_file` ](/openapi/cpanel/operation/convert_file/) | | [`ImageManager::thumbnail`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+ImageManager%3A%3Athumbnail) | [`ImageManager::create_thumbnails`](/openapi/cpanel/operation/create_thumbnails/) | | [`ImageManager::dimensions`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+ImageManager%3A%3Adimensions)[`ImageManager::hdimension`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+ImageManager%3A%3Ahdimension)[`ImageManager::wdimension`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+ImageManager%3A%3Awdimension) | [`ImageManager::get_dimensions`](/openapi/cpanel/operation/get_dimensions/) This function returns all of an image's dimensions. | | [`ImageManager::scale`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+ImageManager%3A%3Ascale) | [`ImageManager::resize_image`](/openapi/cpanel/operation/resize_image/) | #### LogManager | cPanel API 1 Functions | UAPI Functions | | --- | --- | | [`LogManager::listdownloads`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+LogManager%3A%3Alistdownloads) | [`LogManager::list_archives`](/openapi/cpanel/operation/list_archives/) | | [`LogManager::savesettings`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+LogManager%3A%3Asavesettings) | [`LogManager::set_settings`](/openapi/cpanel/operation/set_settings/) | | [`LogManager::showsettings`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+LogManager%3A%3Ashowsettings) | [`LogManager::get_settings`](/openapi/cpanel/operation/get_settings/) | #### MySQL® | cPanel API 1 Functions | UAPI Functions | | --- | --- | | [`Mysql::listdbs`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Mysql%3A%3Alistdbs)[`Mysql::listdbsopt`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Mysql%3A%3Alistdbsopt)[`Mysql::number_of_dbs`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Mysql%3A%3Anumber_of_dbs) | [`Mysql::list_databases`](/openapi/cpanel/operation/list_databases/) | | [`Mysql::routines`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Mysql%3A%3Aroutines) | [`Mysql::list_routines`](/openapi/cpanel/operation/list_routines/) | | [`Mysql::listusers`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Mysql%3A%3Alistusers)[`Mysql::listusersopt`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Mysql%3A%3Alistusersopt)[`Mysql::number_of_users`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Mysql%3A%3Anumber_of_users) | [`Mysql::list_users`](/specifications/cpanel.openapi/user-management/mysql-list_users) | | [`Mysql::updateprivs`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Mysql%3A%3Aupdateprivs) | `Mysql::update_privileges` | #### Net | cPanel API 1 Functions | UAPI Functions | | --- | --- | | [`Net::dnslookup`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Net%3A%3Adnslookup) | [`DNS::lookup`](/openapi/cpanel/operation/dns-lookup/) | #### Park | cPanel API 1 Functions | UAPI Functions | | --- | --- | | [`Park::disableredirect`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Park%3A%3Adisableredirect) | [`Mime::delete_redirect`](/openapi/cpanel/operation/delete_redirect/) | | [`Park::getredirecturl`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Park%3A%3Agetredirecturl) | [`Mime::get_redirect`](/openapi/cpanel/operation/get_redirect/) | | [`Park::setredirecturl`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Park%3A%3Asetredirecturl) | [`Mime::add_redirect`](/openapi/cpanel/operation/add_redirect/) | #### PHP | cPanel API 1 Functions | UAPI Functions | | --- | --- | | `PHP::loaddocroots` | [`DomainInfo::domains_data`](/openapi/cpanel/operation/domains_data/) | | `PHP::loadvars` | [`Variables::get_server_information`](/specifications/cpanel.openapi/cpanel-server-information/variables-get_server_information)[`Variables::get_session_information`](/openapi/cpanel/operation/get_session_information/)[`Variables::get_user_information`](/specifications/cpanel.openapi/account-information/variables-get_user_information) | #### PostgreSQL® | cPanel API 1 Functions | UAPI Functions | | --- | --- | | [`Postgres::deluser`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Postgres%3A%3Adeluser) | [`Postgresql::delete_user`](/specifications/cpanel.openapi/postgresql-user-management/postgresql::delete_user) | | [`Postgres::listdbs`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Postgres%3A%3Alistdbsopt)[`Postgres::listdbsopt`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Postgres%3A%3Alistdbsopt) | [`Postgresql::list_databases`](/specifications/cpanel.openapi/postgresql-database-management/postgresql-list_databases) | | [`Postgres::listusersopt`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Postgres%3A%3Alistusersopt) | [`Postgresql::list_users`](/specifications/cpanel.openapi/postgresql-user-management/postgresql::list_users) | #### ServerInformation | cPanel API 1 Functions | UAPI Functions | | --- | --- | | [`ServerInfo::servicestatus`](https://documentation.cpanel.net/display/DD/cPanel+API+1+Functions+-+Serverinfo%3A%3Aservicestatus) | [`ServerInformation::get_information`](/openapi/cpanel/operation/get_information/) | #### SetLang div Note: We removed the SetLang cPanel API 1 module. | cPanel API 1 Functions | UAPI Functions | | --- | --- | | `SetLang::setlang` | [`Locale::set_locale`](/openapi/cpanel/operation/set_locale/) | | `SetLang::listlangsopt` | [`Locale::list_locales`](/openapi/cpanel/operation/list_locales/) | #### Stats | cPanel API 1 Functions | UAPI Functions | | --- | --- | | `Stats::analoglist``Stats::webalizer``Stats::webalizerftp` | [`Stats::list_sites`](/openapi/cpanel/operation/list_sites/)[`Stats::list_stats_by_domain`](/openapi/cpanel/operation/list_stats_by_domain/) | | `Stats::errlog` | [`Stats::get_site_errors`](/openapi/cpanel/operation/get_site_errors/) | | `Stats::showbandwidth` | [`Stats::get_bandwidth`](/openapi/cpanel/operation/get_bandwidth/) | #### StatsManager | cPanel API 1 Functions | UAPI Functions | | --- | --- | | `StatManager::updateUserConfig` | [`StatsManager::save_configuration`](/openapi/cpanel/operation/stats_manager_save_configuration/) | | `StatManager::doForm` | [`StatsManager::get_configuration`](/openapi/cpanel/operation/stats_manager_get_configuration/) | #### SubDomain | cPanel API 1 Functions | UAPI Functions | | --- | --- | | `SubDomain::disablesubrd` | [`Mime::delete_redirect`](/openapi/cpanel/operation/delete_redirect/) | | `SubDomain::setsuburl` | [`Mime::add_redirect`](/openapi/cpanel/operation/add_redirect/) | | `SubDomain::subdomainurl` | [`Mime::get_redirect`](/openapi/cpanel/operation/get_redirect/) |