Child pages
  • cPanel API 2 Functions - Branding::delbrandingobj

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Description

Excerpt

This function deletes items from the current dynamicui.conf file.

Include Page
LIB:_cPanelAPI2BrandingNote
LIB:_cPanelAPI2BrandingNote

Include Page
LIB:_cPanelAPI2NoEquivalent
LIB:_cPanelAPI2NoEquivalent

 

Panel
bgColor#F2F2F2
borderStylenone

Examples


Panel
bgColor#FFFFFF
borderStylenone
Expand
titleWHM API (JSON)
Code Block
languagetext
https://hostname.example.com:2087/cpsess###########/json-api/cpanel?cpanel_jsonapi_user=user&cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=Branding&cpanel_jsonapi_func=delbrandingobj&opt=description%3D%3E%24LANG%7B'FTP%20Accounts'%7D%2Citemdesc%3D%3E%24LANG%7B'FTP%20Accounts'%7D%2Curl%3D%3Eftp%2Faccounts.html%2Cfeature%3D%3Eftpaccts%2Ctouch%3D%3Eftp%2Cgroup%3D%3Efiles%2Citemorder%3D%3E6%2Cfile%3D%3Eftp_accounts%2Cimgtype%3D%3Eicon%2Ctype%3D%3Eimage%2Csubtype%3D%3Eimg%2Cwidth%3D%3E48%2Cheight%3D%3E48%2Csearchtext%3D%3E%24LANG%7B'FTP%20Accounts%20ftp%20create%5Bcomment%26%2344%3Bsearch%20text%20keywords%5D'%7D

Include Page
LIB:_CallFromWHMAPILink
LIB:_CallFromWHMAPILink

Expand
titleLiveAPI PHP Class
Code Block
languagephp
linenumberstrue
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Delete an item from the current dynamicui.conf file.
$del_dynamicui = $cpanel->api2(
    'Branding', 'delbrandingobj',
		array(        
			'opt'      => 'description=>$LANG{\'FTP Accounts\'},itemdesc=>$LANG{\'FTP Accounts\'},url=>ftp/accounts.html,feature=>ftpaccts,touch=>ftp,group=>files,itemorder=>6,file=>ftp_accounts,imgtype=>icon,type=>image,subtype=>img,width=>48,height=>48,searchtext=>$LANG{\'FTP Accounts ftp create[comment,search text keywords]\'}',
    ) 
 );

Include Page
LIB:_LiveAPIPHPLink
LIB:_LiveAPIPHPLink

 

Expand
titleLiveAPI Perl Module
Code Block
languageperl
linenumberstrue
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Delete an item from the current dynamicui.conf file.
my $del_dynamicui = $cpliveapi->api2(
    'Branding', 'delbrandingobj',
    { 
			'opt'      => "description=>$LANG{\'FTP Accounts\'},itemdesc=>$LANG{\'FTP Accounts\'},url=>ftp/accounts.html,feature=>ftpaccts,touch=>ftp,group=>files,itemorder=>6,file=>ftp_accounts,imgtype=>icon,type=>image,subtype=>img,width=>48,height=>48,searchtext=>$LANG{\'FTP Accounts ftp create[comment,search text keywords]\'}",
	}
 );

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink

 

Expand
titlecPanel Tag System (deprecated)

Include Page
LIB:_cPanelAPI2cPanelTagsWarning
LIB:_cPanelAPI2cPanelTagsWarning

Expand
titleCommand Line
Code Block
languagebash
cpapi2 --user=username Branding delbrandingobj opt=description%3D%3E%24LANG%7B%5C%27FTP%20Accounts%5C%27%7D%2Citemdesc%3D%3E%24LANG%7B%5C%27FTP%20Accounts%5C%27%7D%2Curl%3D%3Eftp%2Faccounts.html%2Cfeature%3D%3Eftpaccts%2Ctouch%3D%3Eftp%2Cgroup%3D%3Efiles%2Citemorder%3D%3E6%2Cfile%3D%3Eftp_accounts%2Cimgtype%3D%3Eicon%2Ctype%3D%3Eimage%2Csubtype%3D%3Eimg%2Cwidth%3D%3E48%2Cheight%3D%3E48%2Csearchtext%3D%3E%24LANG%7B%5C%27FTP%20Accounts%20ftp%20create%5Bcomment%26%2344%3Bsearch%20text%20keywords%5D%5C%27%7D

Include Page
LIB:_cPanelAPI2CLINote
LIB:_cPanelAPI2CLINote

Expand
titleOutput (JSON)
Code Block
languagetext
linenumberstrue
{
  "cpanelresult": {
    "apiversion": 2,
    "func": "delbrandingobj",
    "data": [
      {
        "status": "1"
        "reason": "OK"
        "dynamicui.conf": "/user/cpanelbranding/x3/mypackage/dynamicui.conf"
      }
    ],
    "event": {
      "result": 1
    },
    "module": "Branding"
  }
}

Include Page
LIB:_cPanelAPIShellNote
LIB:_cPanelAPIShellNote

 

Parameters

InputTypeDescriptionPossible valuesExample
optstring

Required

A line to delete from the dynamicui.conf file.

A dynamicui.conf line.

Expand
titleClick to view...

description=>$LANG{'FTP Accounts'},itemdesc=>$LANG{'FTP Accounts'},url=>ftp/accounts.html,feature=>ftpaccts,touch=>ftp,group=>files,itemorder=>6,file=>ftp_accounts,imgtype=>icon,type=>image,subtype=>img,width=>48,height=>48,searchtext=>$LANG{'FTP Accounts ftp create[comment,search text keywords]'} 

 

Returns

ReturnTypeDescriptionPossible valuesExample
statusBooleanWhether the function succeeded.
  • 1 — The function succeeded.
  • 0 — The function failed.
1
reasonstring

A message of success, or an error message.

  • OK
  • A string that describes the error.
OK
dynamicui.confstringThe dynamicui.conf file's location.

A valid file path, relative to the user's home directory.

/user/cpanelbranding/x3/mypackage/dynamicui.conf
resultBoolean

Whether the function succeeded.

  • 1 — The function succeeded.
  • 0 — The function failed.
1