UAPI Functions - Branding::get_applications

Description

This function retrieves an application's information from a specific theme's dynamicui.conf file.

Examples


 cPanel or Webmail Session URL

https://hostname.example.com:2083/cpsess##########/execute/Branding/get_applications?&app_keys=addon_domains,ftp_accounts,anonymous_ftp

 LiveAPI PHP Class

$cpanel new CPANEL(); // Connect to cPanel - only do this once.
  
// Get the dynamicui.conf settings for Addon Domains, FTP Accounts, and Anonymous FTP.
$app_info $cpanel->uapi(
    'Branding''get_applications',
    array(
      'app_keys'  => 'addon_domains,ftp_accounts,anonymous_ftp'
    )
);

 LiveAPI Perl Module

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
  
# Get the dynamicui.conf settings for Addon Domains, FTP Accounts, and Anonymous FTP.
my $app_info $cpliveapi->uapi(
    'Branding''get_applications',
    {
      'app_keys'  => 'addon_domains,ftp_accounts,anonymous_ftp'
    }
);

 cPanel Template Toolkit

<!-- Get a hash of all the data, then display the file value. -->
[% data = execute( 'Branding', 'get_information_for_application', { 'app_keys' => 'addon_domains,ftp_accounts,anonymous_ftp' } ); %]
[% FOREACH q = data.itemdesc %]
     <p>
         [% q %]
     </p>
[% END %]
  
 
<!-- Get only a hash of the data. -->
[% execute('Branding', 'get_applications', { 'app_keys' => 'addon_domains,ftp_accounts,anonymous_ftp' } ).data.file %]

 Command Line

uapi --user=username Branding get_applications app_keys=addon_domains,ftp_accounts,anonymous_ftp

 

Notes:

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

 Output (JSON)

{
  "messages"null,
  "errors"null,
  "status"1,
  "metadata": {
     
  },
  "data": {
    "addon_domains": {
      "width""48",
      "itemorder""1",
      "file""addon_domains",
      "itemdesc""Addon Domains",
      "height""48",
      "feature""addondomains",
      "group""domains",
      "subtype""img",
      "imgtype""icon",
      "searchtext""Domains Addon domain",
      "url""addon/index.html",
      "type""image",
      "implements""Domains_AddonDomains"
    },
    "ftp_accounts": {
      "width""48",
      "itemorder""6",
      "file""ftp_accounts",
      "itemdesc""FTP Accounts",
      "height""48",
      "feature""ftpaccts",
      "group""files",
      "subtype""img",
      "imgtype""icon",
      "searchtext""FTP Accounts ftp create",
      "url""ftp/accounts.html",
      "touch""ftp",
      "type""image"
    },
   "anonymous_ftp": {
      "width""48",
      "itemorder""8",
      "file""anonymous_ftp",
      "itemdesc""Anonymous FTP",
      "height""48",
      "if""$hasanonftp",
      "feature""ftpaccts",
      "group""files",
      "subtype""img",
      "imgtype""icon",
      "searchtext""Anonymous FTP anonymousftp",
      "url""ftp/anonymous.html",
      "touch""ftp",
      "type""image"
    }
  }
}

 

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_keys

 string 

The application's feature name.

 If you do not specify this parameter, the output will include all of the applications that the dynamicui.conffile contains.

A comma-separated list of application feature names.

Note:

This value must match an application's feature value in the dynamicui.conffile. 

 addon_domains,ftp_accounts,anonymous_ftp 

 

Returns

Return

Type

Description

Possible values

Example

 addon_domains 

             

 

hash

A hash that lists the details for a feature.

Note:

This parameter returns a feature'sapp_keys value.

This hash includes the width, itemorder, file,itemdesc, height, feature, group, subtype,imgtype, seachtext, url, type, implements,touch, and if returns.

 

width

 integer 

The application's icon's width.

The function returns this value in the addon_domainshash.

The application's icon's width, in pixels.

 

48

itemorder

integer

The application's order in the dynamicui.conf file.  

The function returns thisvalue in the addon_domainshash.

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

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

4

file

string

The application's icon's filename.

The function returns thisvalue in the addon_domainshash.

An image's filename.

 

addon_domains

itemdesc

string

The application's display name.

The function returns thisvalue in the addon_domainshash.

A string value.

Addon Domain

height

integer

The application's icon's height.

The function returns thisvalue in the addon_domainshash.

The application's icon's height, in pixels.

48

feature

string

A feature name.

The item will only display if the cPanel user has access to this feature.

The function returns thisvalue in the addon_domainshash.

A feature name.

addondomains

group

string

The item's group.

The function returns thisvalue in the addon_domainshash.

A string value.

advanced

subtype

string

The item's subtype.

The function returns thisvalue in the addon_domainshash.

img is the only possible value.

img

imgtype

string

The item's image type.

The function returns thisvalue in the addon_domainshash.

icon is the only possible value.

icon

searchtext

string

One or more search terms.

The item will display when users enter these search terms in the Quick Find textbox.

The function returns thisvalue in the addon_domainshash.

A space-separated list of search terms.

Domains Addon domain

url

string

The location to which the application's icon links.

The function returns thisvalue in the addon_domainshash.

A valid filepath or URL.

 

addon/index.html

type

string

The application's type.

The function returns thisvalue in the addon_domainshash.

image is the only possible value.

image

implements

string

The app_key value that the system modified.

The function returns thisvalue in the addon_domainshash.

An application.

 Domains_AddonDomains 

touch

string

 Conditional arguments that determine whether to display the item, if the touch  file exists.

The function returns thisvalue in the addon_domainshash.

A valid string.

ftp

if

string

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

For example, $isresellerindicates that the item onlydisplays for reseller accounts.

The function returns thisvalue in the addon_domainshash.

A valid string.

 

$is_reseller

 

  • 5 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....