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
官方网站:点击访问CDN客服QQ:123008公司名:贵州青辞赋文化传媒有限公司域名和IP被墙封了怎么办?用cloudsecre.com网站被攻击了怎么办?用cloudsecre.com问:黑客为什么要找网站来攻击?答:黑客需要找肉鸡。问:什么是肉鸡?答:被控的服务器和电脑主机就是肉鸡。问:肉鸡有什么作用?答:肉鸡的作用非常多,可以用来干违法的事情,通常的行为有:VPN拨号,流量P2P,攻击傀儡,...
以前我们在参与到云服务商促销活动的时候周期基本是一周时间,而如今我们会看到无论是云服务商还是电商活动基本上周期都要有超过一个月,所以我们有一些网友习惯在活动结束之前看看商家是不是有最后的促销活动吸引力的,比如有看到阿里云年中活动最后一周,如果我们有需要云服务器的可以看看。在前面的文章中(阿里云新人福利选择共享性N4云服务器年79.86元且送2月数据库),(LAOZUO.ORG)有提到阿里云今年的云...
WHloud Date(鲸云数据),原做大数据和软件开发的团队,现在转变成云计算服务,面对海内外用户提供中国大陆,韩国,日本,香港等多个地方节点服务。24*7小时的在线支持,较为全面的虚拟化构架以及全方面的技术支持!官方网站:https://www.whloud.com/WHloud Date 韩国BGP云主机少量补货随时可以开通,随时可以用,两小时内提交退款,可在工作日期间全额原路返回!支持pa...
.ftpquota为你推荐
flashfxpflashfxp怎么用?flashwind谁能教我怎么在360里下载个flashwind?wordpress模板wordpress后台默认模板管理在哪里?企业ssl证书ssl证书多少钱一年?asp.net什么叫ASP.NET?cisco2960配置思科2960G交换机如何将配置百兆改为千兆配置cisco2960配置cisco4506与2960的vlan配置flashfxp注册码谁有~FLASHfxp V3.0.2的注册码~~谢谢哦!!要现在能用的!!!!文档下载怎么下载百度文档购物车(淘宝)为什么推荐购物车购买,是什么意思啊?
虚拟主机价格 免费二级域名注册 域名查询工具 欧洲免费vps vps代理 香港服务器99idc 59.99美元 68.168.16.150 ixwebhosting 嘟牛 灵动鬼影 isp服务商 卡巴斯基免费试用 paypal注册教程 中国电信测速器 主机管理系统 石家庄服务器托管 谷歌台湾 永久免费空间 免费蓝钻 更多