GuidetocPanelAPI1GuidetocPanelAPI1ReturnDatacPanelTags(deprecated)Bandwidth::displaybwheaderBandwidth::displaybwBandwidth::displaydayBandwidth::displaymainbwheaderBoxTrapper::changestatusBoxTrapper::cleancfgfilelistBoxTrapper::editmsgBoxTrapper::fetchcfgfileBoxTrapper::getboxconfdirBoxTrapper::listmsgsBoxTrapper::logcontrolsBoxTrapper::messageactionBoxTrapper::multimessageactionBoxTrapper::resetmsgBoxTrapper::savecfgfileBoxTrapper::saveconfBoxTrapper::showautowhitelistBoxTrapper::showemailsBoxTrapper::showfromnameBoxTrapper::showlogBoxTrapper::showmessageBoxTrapper::showqueueBoxTrapper::showqueuesearchIntroductioncPanelAPI1accessesinformationfromthecPanelinterface.
BasicusageLiveAPIPHPClass$cpanel=newCPANEL();//ConnecttocPanel-onlydothisonce.
$your_variable=$cpanel->api1('Module','function',array('parameter','parameter','parameter'Callthefunction.
LiveAPIPerlModulemy$cpliveapi=Cpanel::LiveAPI->new();#ConnecttocPanel-onlydothisonce.
my$your_variable=$cpliveapi->api1('Module','function',['parameter','parameter','parameter']);#Callthefunction.
TemplateToolkitcPanelAPI1BasicsAvailablein:cPanel11+Languages:PHP,PerlMethods:GET,POSTReturnFormats:Seethedesiredfunctionforoutputinformation.
AboutcPanelAPI1cPanelAPI1accessesinformationaboutcPanelaccounts.
Warning:cPanelAPI1is.
WerecommendthatyouusedeprecatedstronglycPanelAPIorinstead.
2UAPIImportant:IncPanel&WHMversion76,weintroducedserverprofilesandroles.
Whenyouenableanon-StandardNodeserverprofile,thesystemdisablesAPIcallsassociatedwiththatprofile'sdisabledroles.
Note:YoucallthisAPI'sfunctionsviaanotherAPI'scallmethods.
Formorecannotinformation,readthesectionbelow.
APImethoddistinctionsNote:Formoreinformation,readour.
GuidetotheLiveAPISystemNote:Formoreinformation,readour.
GuidetotheLiveAPISystemNote:Currently,individualfunctiondocumentationdoesincludeTemplateToolkitnotexamples.
Warning:cPanelAPI1isde.
precatedWestronglyrecommendthatyouusecPanelorAPI2UAPIinstead.
Notes:BoxTrapper::showqueuetimeBoxTrapper::statusBoxTrapper::statusbuttonBranding::fileBranding::imageBranding::killimgBranding::setbrandingpkgBranding::setmyacctspkgBranding::setupdirsBranding::tempsetbrandingpkgCgi::backuplinkCgi::displayurchinCgi::phpmyadminlinkChkservd::geteximportChkservd::geteximport_sslClamScanner::barscPAddons::mainpgCron::crontab_permsCustInfo::getemailDenyIp::adddenyipDenyIp::deldenyipDenyIp::listdenyipsDiskUsage::showmanagerEmail::addautoresponderEmail::adddforwardEmail::addfilterEmail::addlistEmail::addmxEmail::addpopEmail::addspamEmail::addspamboxEmail::addspamfilterEmail::changemxEmail::checkfastmailEmail::checkpipefwd[%-USEApi1;SETmyvariable=execute('Module','function',{'parameter'=>'value','parameter'=>'value','parameter'=>'value',});%]cPanelTagSystem(deprecated)CommandLinecpapi1--user=username--output=typeModulefunctionparameter=valueparameter=valuecPanelAPI1callsthroughthecommandlineconsistofthefollowingbasicparts:PartDescriptionCommandThisvalueisalwaysforcallstocPanelAPI1.
cpapi1Note:Formoreinformation,readourdocumentation.
GuidetoTemplateToolkitWarning:IncPanel&WHMversion11.
30andlater,cPaneltagsare.
WedeprecatedprovidethisexampletohelpdevelopersmovefromtheoldcPaneltagsystemtooursystem.
WerecommendthatyouusetheLiveAPIstronglyonlyLiveAPIsystemtocallthecPanelAPIs.
Note:cPanel&WHMintroducedthecommandlinefeatureinversion56.
Note:IfyourunCloudLinux,youusethefullpathofthe1mustcpapicommand:/usr/local/cpanel/bin/cpapi1Thesefunctionsmayrequireafeaturelist.
ToviewtheavailablefeaturelistsonacPanelserver,viewWHM'sFeatureManagerinterface.
UnlessyoucaEmail::clearspamboxEmail::delautoresponderEmail::deldforwardEmail::delfilterEmail::dellistEmail::delmxEmail::delpopEmail::delspamEmail::delspamboxEmail::disable_spam_autodeleteEmail::editquotaEmail::enable_spam_autodeleteEmail::getagingEmail::getarsbodyEmail::getarscharsetEmail::getarsfromEmail::getarshtmlEmail::getarsintervalEmail::getarsstartEmail::getarsstopEmail::getarssubjectEmail::getmailserverEmail::getmailserveruserEmail::getpopquotaEmail::has_spam_as_aclEmail::has_spam_autodeleteEmail::listmaildomainsEmail::listmaildomainsoptEmail::listmaildomainsoptndefEmail::mainacctdiskusedEmail::passwdlistEmail::passwdpopEmail::setmxacceptEmail::spamboxstatusOutputTypeTheAPIoutputtypethatyouwishtoreceive.
UsetoreturnJSON-formattedoutput.
--output=jsonUsetoreturnindentedJSON-formatted--output=jsonprettyoutput.
UsetoreturnXML-formattedoutput.
--output=xmlUsetoreturnYAML-formattedoutput.
--output=yamlModuleThecPanelAPI1modulename.
FunctionThecPanelAPI1function.
UserThecPanelaccount-levelusername.
InputparametersandvaluesThefunction'sinputparametersandtheirvalues.
Youvalues.
mustURI-encodeSeparatemultiplepairswithaspacecharacter.
parameter=valueSpecialcharacterswithinakey'svaluemaycauseanerror.
Youmusteitherescapeanyspecialcharacterswithinvaluesorsurroundthevaluewithappropriatequotes.
Formoreinformation,readWikipedia'sEscapearticle.
CharactersForexample,abashshellcommandwithaJSON-encodedvaluemayappearsimilartooneofthefollowing:cpapi1--userusernameModulefunctionkey=[\"sslinstall\",\"videotut\"]"'{"videcpapi1--userusernameModulefunctionkey=otut","sslinstall"}'Theseexamplesusethefollowingvariables:VariableDescriptionExampleModuleThemoduleforthefunctionthatyouwishtouse.
EmailfunctionThecPanelAPI1functionthatyouwishtouse.
addpopImportant:cPanel&WHMversion66deprecatedXMLoutput.
Note:Thisparameterdefaultsto.
--output=yamlNote:Theterm"Boolean"inourdocumentationreferstoparametersthatacceptvaluesofor.
cPanel&WHM'sAPIsdosupportthe10notliteralvaluesofand.
truefalseNote:Formoreinformationaboutthisfeature,runthefollowingcommand:cpapi1--helpllthisAPIviatheWHMAPI,youmustusetheappropriatecPanelports(2082or2083).
YoucanalsocallsomefunctionsviacPanel'sWebmailporEmail::spamstatusEmail::tracefilterFileman::changepermFileman::delfileFileman::dofileopFileman::emptytrashFileman::extractfileFileman::fileimgFileman::fmmkdirFileman::fmmkfileFileman::fmpushfileFileman::fmrenameFileman::fmsavefileFileman::fmsavehtmlfileFileman::fullbackupFileman::getfileFileman::htmleditorFileman::killdirFileman::listfilesFileman::listfullbackupsFileman::listtemplatesFileman::restoreafFileman::restoredbFileman::restorefileFileman::restorefilesFileman::savehtmlfileFileman::showpermFileman::uploadfilesFileman::viewfileFrontPage::addfpFrontPage::delfpFrontPage::fpstatusFtp::addftpFtp::delftpFtp::ftpquotaFtp::ftpservernameFtp::ftpstatsloginFtp::get_anonftpparameterInputparametersthatyoupasstothefunction.
example.
comCallcPanelAPI1fromtheWHMAPIYoucanusetheWHMAPItocallcPanelAPIfunctions.
Formoreinformation,readourUsedocumentation.
WHMAPItoCallcPanelAPI&UAPICustomEventHandlersandStandardizedHooksYoucanusethetocustomizetheeventsbeforeandafteraStandardizedHookSystemcPanelAPIcall.
APImethoddistinctionsRelatedDocumentationUseWHMAPItoCallcPanelAPIandUAPI—YoucancallcPanelAPIandUAPIfunctionsthroughtheWHMAPI.
GuidetotheManage2API—TheManage2APIautomatescPanellicensemanagementprocedures.
GuidetoUAPI—UAPIaccessesthecPanelinterface'sfeatures.
GuidetoWHMAPI0—WHMAPI0accessestheWHMinterface'sfeatures.
GuidetocPanelAPI2—cPanelAPI2accessescPanelaccountinformationandmodifiessettings.
Important:cPanelAPI1functionsuseorderedparameters.
Youspecifyparametersinmusttheorderinwhichtheyappearinthisdocumentation.
cPanelAPI1parametersare.
case-sensitiveNote:Theterm"Boolean"inourdocumentationreferstoparametersthatacceptvaluesofor.
cPanel&10WHM'sAPIsdosupporttheliteralvaluesofnottrand.
uefalseWarning:DoattempttousecPanelorWHMinterfaceURLstoperformactionsinnotcustomcode.
YoucalltheappropriateAPIfunctionsinordertoperformmusttheactionsofcPanel&WHM'sinterfaces.
Forexample,dopassvaluestopages,asinthefollowingexample:not.
htmlhttp://example.
com:2082/frontend/x3/mail/doaddpop.
html/email=name&domain=user.
comWhilethismethodsometimesworkedinpreviousversionsofunsupportedcPanel&WHM,wediscourageitsuseanddoguaranteethatitwillstronglynotworkinthefuture.
Instead,thecorrectmethodtoperformthisactionistocalltheappropriateAPIfunction.
Warning:UnlessyoucallthisAPIviatheWHMAPI,youcallthisAPIviaWHM'scannotports(or).
20862087Important:BecausesomecPanelAPI1functionsreturnHTMLoutput,thismethodwillcauseparsingerrorsinmostXMLparsers.
WerecommendthatyoustronglyusecPanelAPI2instead.
ts(2095or2096).
Ftp::get_anonftpinFtp::get_welcomemsgFtp::getftpquotaFtp::kill_ftp_sessionFtp::listftpstatsurlFtp::passwdftpFtp::set_anonftpFtp::set_anonftpinFtp::set_welcomemsgGpg::deletekeyGpg::exportkeyGpg::exportsecretkeyGpg::genkeyGpg::importkeysHtaccess::checkprotectedHtaccess::del_userHtaccess::getindexHtaccess::htdirlsHtaccess::number_of_usersHtaccess::phpselectableHtaccess::resnameHtaccess::set_passHtaccess::set_protectHtaccess::setindexHtaccess::setphpreferenceHtaccess::showusersImageManager::convertImageManager::dimensionsImageManager::hdimensionImageManager::scaleImageManager::thumbnailImageManager::wdimensionLastLogin::lastlogincPanel,L.
L.
C.
producesfourcurrentandtwodeprecatedAPIs,andtheyallincludeseparatesetsoffunctions.
MakethatthefunctionandmodulethatyoucallexistincertaintheAPIversionthatyourcodeuses.
SelectatabtoviewexamplesofcallstothedesiredAPI:WHMAPI1https://hostname.
example.
com:2087/cpsess#json-api/accountsummaryapi.
version=1&user=usernamewhmapi1accountsummaryuser=usernameFormoreinformation,readourandGuidetoTestingCustomCode-WHMAPICallsGuidedocumentation.
toWHMAPI1UAPIhttps://hostname.
example.
com:2083/cpsess#execute/Module/functionparameter=value¶meter=value¶meter=valueuapi--user=username--output=typeModulefunctionparameter=valueparameter=value$cpanel=newCPANEL();//ConnecttocPanel-onlydothisonce.
//CallaUAPIfunction.
$function_result=$cpanel->uapi('Module','function',array('parameter'=>'value','parameter'=>'value','parameter'=>'value',));Important:APIcallsusethecorrectport:must2082—UnsecurecallstocPanel'sAPIs.
2083—SecurecallstocPanel'sAPIs.
2095—UnsecurecallstocPanel'sAPIsviaaWebmailsession.
2096—SecurecallstocPanel'sAPIsviaaWebmailsession.
2086—UnsecurecallstoWHM'sAPIs,ortocPanel'sAPIsviatheWHMAPI.
2087—SecurecallstoWHM'sAPIs,ortocPanel'sAPIsviatheWHMAPI.
Otherwise-correctcallswillreturnorPermissiondeniedFunctionnoterrorsiftheyuseanincorrectportnumber.
foundNote:Browser-basedcallstoWHMAPI1includetheWHMAPIversion(mustap).
Ifyouomittheversion,thesystemcallsWHMAPI0,whichi.
version=1maynotcontainthedesiredfunction,ormaycontainanolderversionofthatfunction.
LeechProtect::disableLeechProtect::enableLeechProtect::setupLeechProtect::showpasswdfileLeechProtect::statusLogManager::listdownloadsLogManager::savesettingsLogManager::showsettingsMagicRevision::uriMime::add_handlerMime::add_hotlinkMime::add_mimeMime::add_redirectMime::del_handlerMime::del_hotlinkMime::del_mimeMime::del_redirectMime::linkallownullMime::linkenableMime::linkextsMime::linkrurlMime::linkurlsMysql::adddbMysql::addhostMysql::adduserMysql::adduserdbMysql::checkdbMysql::deldbMysql::delhostMysql::deluserMysql::deluserdbMysql::gethostMysql::initcacheMysql::listdbsMysql::listdbsoptMysql::listusersMysql::listusersoptmy$cpliveapi=Cpanel::LiveAPI->new();#ConnecttocPanel-onlydothisonce.
#CallaUAPIfunction.
my$function_result=$cpliveapi->uapi('Module','function',{'parameter'=>'value','parameter'=>'value','parameter'=>'value',});[%execute('Module','function',{'parameter'=>'value','parameter'=>'value','parameter'=>'value',});%]cPanelAPI2https://hostname.
example.
com:2087/cpsess#json-api/cpanelcpanel_jsonapi_user=user&cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=Module&cpanel_jsonapi_func=function¶meter="value"cpapi2--user=username--output=typeModulefunctionparameter=valueparameter=value[%-USEApi2;SETmyvariable=execute('Module','function',{'parameter'=>'value','parameter'=>'value','parameter'=>'value',});%]Note:Formoreinformation,readourGuidetoTestingCustomCode-cPanelAPIandanddocumentation.
UAPICallsGuidetoUAPIMysql::number_of_dbsMysql::number_of_usersMysql::repairdbMysql::routinesMysql::updateprivsNet::dnslookupNet::dnszoneNet::sethastracerouteNews::displaynewsNVData::setOptimizeWS::loadoptimizesettingsOptimizeWS::loadoptimizesettings(bytes)OptimizeWS::optimizewsPark::disableredirectPark::getredirecturlPark::parkPark::setredirecturlPark::unparkPostgres::adddbPostgres::adduserPostgres::adduserdbPostgres::deldbPostgres::deluserPostgres::deluserdbPostgres::initcachePostgres::listdbsoptPostgres::listusersoptPostgres::number_of_dbsPostgres::number_of_usersProxyUtils::proxyaddressResellers::accountlistoptResellers::themelistoptServerinfo::servicestatus$cpanel=newCPANEL();//ConnecttocPanel-onlydothisonce.
//Callthefunction.
$my_variable=$cpanel->api2('Module','function',array('parameter'=>'value','parameter'=>'value','parameter'=>'value',));my$cpliveapi=Cpanel::LiveAPI->new();#ConnecttocPanel-onlydothisonce.
#Callthefunction.
my$my_variable=$cpliveapi->api2('Module','function',{'parameter'=>'value','parameter'=>'value','parameter'=>'value',});WHMAPI0(deprecated)https://hostname.
example.
com:2087/cpsess#json-api/accountsummaryuser=usernamewhmapi0accountsummaryuser=usernamecPanelAPI1(deprecated)cpapi1--user=username--output=typeModulefunctionparameter=valueparameter=valueNote:Formoreinformation,readourGuidetoTestingCustomCode-cPanelAPIandanddocumentation.
UAPICallsGuidetocPanelAPI2Warning:WHMAPI0is.
Werecommendthatyouusethedeprecatedstronglyonlyequivalentfunctionsinstead.
WHMAPI1Note:Formoreinformation,readourGuidetoTestingCustomCode-WHMAPICallsanddocumentation.
GuidetoWHMAPI0Warning:cPanelAPI1is.
WerecommendthatyouusedeprecatedstronglycPanelAPIorinstead.
2UAPISetLang::listlangsoptSetLang::setlangSpamAssassin::configSpamAssassin::saveconfigSSH::getportSSL::deleteSSL::deletecrtSSL::deletecsrSSL::deletekeySSL::gencrtSSL::gencsrSSL::genkeySSL::getcabundleSSL::getcnnameSSL::installSSL::installedhostSSL::listkeysoptSSL::showcrtSSL::showcsrSSL::showkeySSL::sslsharedstatusSSL::uploadcrtSSL::uploadkeyStatManager::doFormStatManager::updateUserConfigStats::analoglistStats::awstatsStats::bwbarStats::errlogStats::lastvisitorsStats::showbandwidthStats::webalizerStats::webalizerftpSubDomain::addsubdomainSubDomain::cplistsubdomainsSubDomain::disablesubrd$cpanel=newCPANEL();//ConnecttocPanel-onlydothisonce.
$your_variable=$cpanel->api1('Module','function',array('parameter','parameter','parameter'Callthefunction.
my$cpliveapi=Cpanel::LiveAPI->new();#ConnecttocPanel-onlydothisonce.
my$your_variable=$cpliveapi->api1('Module','function',['parameter','parameter','parameter']);#Callthefunction.
[%-USEApi1;SETmyvariable=execute('Module','function',{'parameter'=>'value','parameter'=>'value','parameter'=>'value',});%]Note:Formoreinformation,readourGuidetoTestingCustomCode-cPanelAPIandanddocumentation.
UAPICallsGuidetocPanelAPI1SubDomain::listsubdomainsopSubDomain::setsuburlUI::confirmUI::redirectUI::showresult
近日快云科技发布了最新的夏季优惠促销活动,主要针对旗下的香港CN2 GIA系列的VPS云服务器产品推送的最新的75折优惠码,国内回程三网CN2 GIA,平均延迟50ms以下,硬件配置方面采用E5 2696v2、E5 2696V4 铂金Platinum等,基于KVM虚拟架构,采用SSD硬盘存储,RAID10阵列保障数据安全,有需要香港免备案CN2服务器的朋友可以关注一下。快云科技怎么样?快云科技好不...
日本vps云服务器怎么选择?很多人都会遇到日本vps和日本云服务器怎么选择的问题,日本云服务器具有免备案的特点。小编今天就分析一下日本云服务器价格多少钱,以方便大家选购的时候有个更加合适的取舍。日本云服务器租用前比较选择,高性能、安全、高效、免备案日本云服务器是很关键的因素。那么,日本云服务器该怎么选择呢?日本作为我们的邻国,与其贸易、文化往来是比较多的。日本云服务器价格多少钱一年?一、日本·CN...
DiyVM是一家成立于2009年的国人主机商,提供的产品包括VPS主机、独立服务器租用等,产品数据中心包括中国香港、日本大阪和美国洛杉矶等,其中VPS主机基于XEN架构,支持异地备份与自定义镜像,VPS和独立服务器均可提供内网IP功能。商家VPS主机均2GB内存起步,三个地区机房可选,使用优惠码后每月69元起;独立服务器开设在香港沙田电信机房,CN2线路,自动化开通上架,最低499元/月起。下面以...
.ftpquota为你推荐
支持ipadinternetexplorer无法打开internet explorer网页打不开degradeios文档下载手机下载的文件在哪里能找到大飞资讯伯乐资讯是什么公司可信网站可信网站认证温州都市报招聘劳务市场找工作可靠吗400电话查询400电话号码可以查询归属地吗?办理400电话是不是很贵?美国独立美国独立时不是只有13个洲吗?后来的领土都是怎么得来的。discuz教程Discuz! Database Error怎么解决啊?我的电脑打不开这个网啊很久了。其他电脑可以。
花生壳域名 郑州服务器租用 大庆服务器租用 vps代理 securitycenter justhost 百度云100as omnis 免费ftp空间 512m 华为云主机 css样式大全 网站实时监控 网通代理服务器 亚洲小于500m 150邮箱 ca4249 空间出租 电子邮件服务器 北京双线机房 更多