Description

This function enables or disables the current branding package.

 

Examples


https://hostname.example.com:2087/cpsess###########/json-api/cpanel?cpanel_jsonapi_user=user&cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=Branding&cpanel_jsonapi_func=setbrandingpkgstatus&action="enable"

$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Enable the account's current branding package.
$enable_branding = $cpanel->api2(
    'Branding', 'setbrandingpkgstatus',
		array(        
			'action'      => 'enable',
    ) 
 );

 

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Enable the account's current branding package.
my $enable_branding = $cpliveapi->api2(
    'Branding', 'setbrandingpkgstatus',
    { 
			'action'      => 'enable',
	}
 );

 

cpapi2 --user=username Branding setbrandingpkgstatus action=enable

{
  "cpanelresult": {
    "apiversion": 2,
    "func": "setbrandingpkgstatus",
    "data": [
      {
        "status": "enabled"
      }
    ],
    "event": {
      "result": 1
    },
    "module": "Branding"
  }
}

 

Parameters

InputTypeDescriptionPossible valuesExample
actionstring

Required

Whether to enable or disable the account's current branding package.

  • enable
  • disable
enable

 

Returns

ReturnTypeDescriptionPossible valuesExample
statusstring

The action taken.

  • enabled
  • disabled
enabled
resultBoolean

Whether the function succeeded.

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