Description

This function is for cPanel & WHM's internal use only.

 It requires variables that third-party applications cannot set.

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=installbrandingpkgs

$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Call the function.
$call_function = $cpanel->api2(
    'Branding', 'installbrandingpkgs'
);

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Call the function.
my $call_function = $cpliveapi->api2(
    'Branding', 'installbrandingpkgs',
);

cpapi2 --user=username Branding installbrandingpkgs

{
  "cpanelresult": {
    "apiversion": 2,
    "func": "installbrandingpkgs",
    "data": [
      null
    ],
    "event": {
      "result": 1
    },
    "module": "Branding"
  }
}

 

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
resultBoolean

Whether the function succeeded.

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