Child pages
  • UAPI Functions - Brand::read

Versions Compared

Key

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

Description

Excerpt

This function retrieves the cPanel account's branding information.

 For more information, read our Customization documentation.

Note
titleNote:

cPanel accounts that do not use the Paper Lantern theme, or that use Paper Lantern without configured branding information, return blank values. 


Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone


Expand
titlecPanel or Webmail Session URL


Code Block
languagetext
https://hostname.example.com:2083/cpsess##########/execute/Brand/read

Include Page
LIB:_CallUAPIFromBrowserLink
LIB:_CallUAPIFromBrowserLink


Expand
titleLiveAPI PHP Class


Code Block
languagephp
linenumberstrue
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Get Paper Lantern branding settings.
$pl_branding = $cpanel->uapi(
    'Brand', 'read'
);

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.
 
# Get Paper Lantern branding settings.
my $pl_branding = $cpliveapi->uapi(
    'Brand', 'read',
);

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink

 


Expand
titlecPanel Template Toolkit


Code Block
languagexml
linenumberstrue
<!-- Get a hash of all the data, then display the company_name value. -->
[% data = execute( 'Brand', 'read' ); %]
[% FOREACH q = data.company_name %]
     <p>
         [% q %]
     </p>
[% END %]
 

<!-- Get only the company name. -->
[% execute('Brand', 'read' ).data.company_name %]

Include Page
LIB:_TTLink
LIB:_TTLink

 


Expand
titleCommand Line


Code Block
languagetext
uapi --user=username Brand read

Include Page
LIB:_UAPICLINote
LIB:_UAPICLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{
  "messages": null,
  "errors": null,
  "status": 1,
  "metadata": {
    
  },
  "data": {
    "company_name": "Hosting Company, Inc.",
    "display_company_name": 1,
    "webmail_display_company_name": 1,
    "documentation_url": "http://www.hostingcompany.com/docs",
    "help_url": "http://www.hostingcompany.com/support",
    "cpanel_logo": "logo.svg",
    "cpanel_logo_small": "logo_small.svg",
    "webmail_logo": "webmail.svg"
  }
}


Include Page
LIB:_cPanelAPIShellNote
LIB:_cPanelAPIShellNote


   

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
company_namestring

The company name.

This name appears in the top left corner of the branded cPanel interface.

  • A string value.
  • An empty string.
Hosting Company, Inc.
display_company_name BooleanWhether the cPanel interface displays the company_name value or a logo in the branded cPanel interface.
  • 1 — Display the company_name value.
  • 0 — Display the company's logo.
1
webmail_display_company_nameBoolean

Whether the Webmail interface displays the company_name value or a logo in the branded Webmail interface.

Note
titleNote:

We added this return in cPanel & WHM version 60. 


  • 1 — Display the company_name value.
  • 0 — Display the company's logo.
1
documentation_urlstring

The company's documentation URL.

The Documentation link uses this URL in branded cPanel interfaces.

  • A valid URL.
  • An empty string.
http://www.hostingcompany.com/docs
help_urlstring

The company's support URL.

In cPanel & WHM version 11.48 and earlier, the Help link uses this URL in branded cPanel interfaces.

Note
titleNote:

In cPanel & WHM version 11.50 and later, we removed the Help link from the cPanel interface.


  • A valid URL.
  • An empty string.

 

http://www.hostingcompany.com/support
cpanel_logostring

The filename of the logo file that displays in the cPanel interface.

Note
titleNote:

We added this return in cPanel & WHM version 60. 


  • logo.svg
  • logo.png
logo.svg
cpanel_logo_smallstring

The filename of the small logo file that displays in the cPanel interface.

Note
titleNote:

We added this return in cPanel & WHM version 60. 


  • logo_small.svg
  • logo_small.png
logo_small.svg
webmail_logostring

The filename of the logo file that displays in the Webmail interface.

Note
titleNote:

We added this return in cPanel & WHM version 60. 


  • webmail.svg
  • webmail.png
webmail.svg