Page tree
Skip to end of metadata
Go to start of metadata

 

Description

This function retrieves an application's information from the dynamicui.conf file.

Examples 


 cPanel or Webmail Session URL
https://hostname.example.com:2083/cpsess##########/execute/Branding/get_application_information?app_key=boxtrapper

Note:

This example calls the UAPI function via a cPanel session. For more information, read our Guide to UAPI documentation. 

 LiveAPI PHP Class
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
 
// Get the dynamicui.conf settings for BoxTrapper.
$app_info = $cpanel->uapi(
    'Branding', 'get_application_information',
    array(
      'app_key'          => 'boxtrapper',
    )
);

Note:

For more information, read our Guide to the LiveAPI System.

 LiveAPI Perl Module
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
 
# Get the dynamicui.conf settings for BoxTrapper.
my $app_info = $cpliveapi->uapi(
    'Branding', 'get_application_information',
    {
      'app_key'          => 'boxtrapper',
    }
);

Note:

For more information, read our Guide to the LiveAPI System.

 cPanel Template Toolkit
<!-- Get a hash of all the data, then display the itemdesc value. -->
[% data = execute( 'Branding', 'get_application_information', { 'app_key' => 'boxtrapper' } ); %]
[% FOREACH q = data.itemdesc %]
     <p>
         [% q %]
     </p>
[% END %]
 

<!-- Get only the itemdesc value. -->
[% execute('Branding', 'get_application_information', { 'app_key' => 'boxtrapper' } ).data.itemdesc %]

Note:

For more information, read our Guide to Template Toolkit documentation. 

 Command Line
uapi --user=username Branding get_application_information app_key=boxtrapper

Notes:

  • You must URI-encode values.
  • username represents your account-level username.
  • For more information and additional output options, read our Guide to UAPI documentation or run the uapi --help command. 
  • We introduced this functionality in cPanel & WHM version 56.

 Output (JSON)
{  
   "messages":null,
   "errors":null,
   "status":1,
   "metadata":{  

   },
   "data":{  
      "width":"35",
      "itemorder":"3",
      "file":"boxtrapper",
      "height":"32",
      "itemdesc":"BoxTrapper",
      "if":"!$CONF{'skipboxtrapper'} $CPDATA{'FEATURE-BOXTRAPPER'}",
      "feature":"boxtrapper",
      "group":"mail",
      "subtype":"img",
      "imgtype":"icon",
      "searchtext":"boxtrapper filter",
      "url":"mail/boxtrapper.html",
      "type":"image",
      "module":"BoxTrapper"
   }
}

Note:

Use cPanel's API Shell interface (cPanel >> Home >> Advanced >> API Shell) to directly test cPanel API calls.

   

Parameters

ParameterTypeDescriptionPossible valuesExample
app_keystring

Required

The application's feature name.

Any valid feature name.

Note:

This value must match a feature's app_key value. For a list of app_key values, read our Guide to cPanel Interface Customization - Appkeys documentation. 

boxtrapper

Returns

ReturnTypeDescriptionPossible valuesExample
widthintegerThe application's icon's width.

A positive integer that represents an image width, in pixels.

35
itemorderintegerThe application's order in the dynamicui.conf file.

A positive integer that represents the application's display order in cPanel's Home interface.

For example, the first item on the cPanel Home interface has an itemorder value of 1.

3

filestringThe application's icon's filename.A valid filename.

boxtrapper

heightintegerThe application's icon's height.A positive integer that represents an image height, in pixels.32
itemdescstringThe application's display name.A string value.BoxTrapper
ifstring

Conditional arguments that determine whether to display the item, if any exist.

Conditional arguments that determine whether to display the item.

For example, $isreseller indicates that the item only displays for reseller accounts.

For more information, read our Guide to cPanel Variables documentation.

 Click to view...

!$CONF{'skipboxtrapper'} $CPDATA{'FEATURE-BOXTRAPPER'}

featurestringThe application's feature name.The app_key parameter's value.boxtrapper
groupstringThe application's group.A string value.mail
subtypestringThe item's subtype.img is the only possible value. img
imgtypestringThe item's image type.icon is the only possible value.icon
searchtextstring

One or more search terms.

The application's icon will display when users enter these search terms in the Quick Find text box.

A space-separated list of search terms.boxtrapper
urlstringThe location to which the application's icon links.A valid filepath or URL.mail/boxtrapper.html
typestringThe application's type.image is the only possible value. image
modulestringThe application's module.A valid module name.BoxTrapper