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
俄罗斯vps速度怎么样?俄罗斯vps云主机节点是欧洲十大节点之一,地处俄罗斯首都莫斯科,网络带宽辐射周边欧洲大陆,10G专线连通德国法兰克福、法国巴黎、意大利米兰等,向外连接全球。俄罗斯vps云主机速度快吗、延迟多少?由于俄罗斯数据中心出口带宽充足,俄罗斯vps云主机到全球各地的延迟、速度相对来说都不错。今天,云服务器网(yuntue.com)小编介绍一下俄罗斯vps速度及俄罗斯vps主机推荐!俄...
Moack怎么样?Moack(蘑菇主机)是一家成立于2016年的商家,据说是国人和韩国合资开办的主机商家,目前主要销售独立服务器,机房位于韩国MOACK机房,网络接入了kt/lg/kinx三条线路,目前到中国大陆的速度非常好,国内Ping值平均在45MS左右,而且商家的套餐比较便宜,针对国人有很多活动。不过目前如果购买机器如需现场处理,由于COVID-19越来越严重,MOACK办公楼里的人也被感染...
关于半月湾HMBCloud商家之前也有几篇那文章介绍过这个商家的产品,对于他们家的其他产品我都没有多加留意,而是对他们家的DC5机房很多人还是比较喜欢的,这个比我们有些比较熟悉的某商家DC6 DC9机房限时,而且半月湾HMBCloud商家是相对便宜的。关于半月湾DC5机房的方案选择和介绍:1、半月湾三网洛杉矶DC5 CN2 GIA同款DC6 DC9 1G内存 1TB流量 月$4.992、亲测选择半...
.ftpquota为你推荐
厦门金龙联合汽车工业有限公司招标项目phpwindPHPWind 都有什么功能申请支付宝账户怎样申请支付宝账户?要填写什么信息?购物车(淘宝)为什么推荐购物车购买,是什么意思啊?三五互联科技股份有限公司厦门三五互联科技股份有限公司 怎么样?申请400电话400电话如何申请?美国独立美国独立战争的概况开源网店国内开源网店系统哪款好oscommerceOscommerce,Magento, Zen-cart 比较,哪个好一点!帖子标题百度贴吧里帖子标题后面的“(共xxx贴)”和此张贴子的楼层数有何区别?两者的数值并不一样。
域名注册查询 解析域名 西部数码vps 新加坡主机 美国主机论坛 免费cdn加速 realvnc ibrs 三拼域名 毫秒英文 秒杀预告 idc资讯 域名评估 泉州移动 中国网通测速 789电视剧 银盘服务是什么 七夕快乐英语 免费外链相册 工信部网站备案查询 更多