UAPI Functions - Branding::get_application_information

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

 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',
    )
);

 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',
    }
);

 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 %]

 Command Line

uapi --user=username Branding get_application_information app_key=boxtrapper

 

Notes:

  • You must URI-encode values.
  • username represents your account-level username.

 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 (Home >> Advanced >> API Shell) to directly test cPanel API calls.

 

Parameters

 Parameter 

Type

Description

Possible values

Example

app_key

 string 

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_keyvalues, read our Guide to cPanel Interface Customization - Appkeysdocumentation. 

 boxtrapper 

 

Returns

Return

Type

Description

Possible values

Example

width

integer

The application's icon's width.

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

35

itemorder

integer

The application's order in thedynamicui.conf file.

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

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

3

file

string

The application's icon's filename.

A valid filename.

boxtrapper

height

 integer 

The application's icon's height.

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

32

itemdesc

string

The application's display name.

A string value.

BoxTrapper

if

string

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.

 

feature

string

The application's feature name.

The app_key parameter's value.

boxtrapper

group

string

The application's group.

A string value.

mail

subtype

string

The item's subtype.

img is the only possible value. 

img

imgtype

string

The item's image type.

icon is the only possible value.

icon

 searchtext 

string

One or more search terms.

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

A space-separated list of search terms.

boxtrapper

url

string

The location to which the application's icon links.

A valid filepath or URL.

 mail/boxtrapper.html 

type

string

The application's type.

image is the only possible value. 

image

module

string

The application's module.

A valid module name.

BoxTrapper

 

  • 11 Users Found This Useful
Was this answer helpful?

Related Articles

The cPanel Interface

For  cPanel  &  WHM  version  58 Overview The cPanel interface is...

User Preferences

For cPanel & WHM version 58 Overview This document outlines how to access your cPanel...

Manage External Authentications

For cPanel & WHM version 58 Overview Manage credentials Additional documentation...

What is cPanelID?

In This Article:  Overview ServicesHow to get a cPanelID cPanelID External...

Guide to cPanel Interface Customization - cPanel Style Development

Introduction You can develop custom styles that modify the appearance of the cPanel interface....