Description

This function retrieves the account's default 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=getdefaultbrandingpkg

$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Get the name of the default branding package.
$get_default_branding = $cpanel->api2(
    'Branding', 'getdefaultbrandingpkg'
 );

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Get the name of the default branding package.
my $get_default_branding = $cpliveapi->api2(
    'Branding', 'getdefaultbrandingpkg',
 );

 

cpapi2 --user=username Branding getdefaultbrandingpkg

{
  "cpanelresult": {
    "apiversion": 2,
    "func": "getdefaultbrandingpkg",
    "data": [
      {
        "pkg": "[root]"
      }
    ],
    "event": {
      "result": 1
    },
    "module": "Branding"
  }
}

 

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
pkgstring

The default branding package name.

The name of a branding package on the server.

[root]
resultBoolean

Whether the function succeeded.

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