UAPI Functions - Branding::get_available_applications

Description

This function retrieves information about the groups and applications in the authenticated user's cPanel interface.

Examples 


 cPanel or Webmail Session URL

https://hostname.example.com:2083/cpsess##########/execute/Branding/get_available_applications

 LiveAPI PHP Class

$cpanel new CPANEL(); // Connect to cPanel - only do this once.
  
// Get the group and application information from the user's cPanel interface.
$app_info $cpanel->uapi(
    'Branding''get_available_applications'
);

 LiveAPI Perl Module

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
  
# Get the group and application information from the user's cPanel interface.
my $app_info $cpliveapi->uapi(
    'Branding''get_available_applications'
);

 cPanel Template Toolkit

<!-- Get a hash of all the data, then display the file value. -->
[% data = execute( 'Branding', 'get_available_applications'); %]
[% FOREACH q = data.itemdesc %]
     <p>
         [% q %]
     </p>
[% END %]

 Command Line

uapi --user=username Branding get_available_applications

 

Notes:

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

 Output (JSON)

{
   "messages":null,
   "errors":null,
   "status":1,
   "metadata":{
 
   },
   "data":{
      "index":{
         "web_host_manager":[
            7,
            0
         ],
         "change_language":[
            8,
            1
         ],
         "addon_domains":[
            2,
            0
         ],
...
         "php_my_admin":[
            1,
            0
         ]
      },
      "grouporder":[
         "files",
         "databases",
         "domains",
         "email",
         "metrics",
         "security",
         "software",
         "advanced",
         "preferences",
         "pref"
      ],
      "groups":[
         {
            "group":"files",
            "desc":"Files",
            "items":[
               {
                  "width":"48",
                  "itemorder":"1",
                  "file":"file_manager",
                  "itemdesc":"File Manager",
                  "feature":"filemanager",
                  "subtype":"img",
                  "target":"file_manager",
                  "group":"files",
                  "acontent":"target=\"file_manager\"",
                  "searchtext":"File Manager file-manager",
                  "imgtype":"icon",
                  "base64_png_image":"",
                  "url":"filemanager/index.html",
                  "implements":"FileManager_Home",
                  "height":"48",
                  "onclick":"",
                  "type":"image"
               },
               {
                  "width":"48",
                  "itemorder":"2",
                  "file":"images",
                  "itemdesc":"Images",
                  "feature":"cpanelpro_images",
                  "subtype":"img",
                  "acontent":"",
                  "target":"",
                  "group":"files",
                  "searchtext":"image manager resize manager scaler thumbnailer format Images",
                  "imgtype":"icon",
                  "base64_png_image":"",
                  "url":"cpanelpro/images.html",
                  "module":"ImageManager",
                  "height":"48",
                  "onclick":"",
                  "type":"image"
               },
...
            ]
         },
         {
            "group":"domains",
            "desc":"Domains",
            "items":[
               {
                  "width":"48",
                  "itemorder":"1",
                  "file":"addon_domains",
                  "itemdesc":"Addon Domains",
                  "feature":"addondomains",
                  "subtype":"img",
                  "acontent":"",
                  "target":"",
                  "group":"domains",
                  "searchtext":"Domains Addon domain Addon Domains",
                  "imgtype":"icon",
                  "base64_png_image":"",
                  "url":"addon/index.html",
                  "implements":"Domains_AddonDomains",
                  "height":"48",
                  "onclick":"",
                  "type":"image"
               },
...
            ]
         },
...
      ],
      "implements":{
         "support":"WHMCS_support2",
         "Email_BoxTrapper":"boxtrapper",
         "Database_phpMyAdmin":"php_my_admin",
         "Email_Archive":"archive",
         "Stats_AWStats":"awstats",
         "FileManager_Home":"file_manager",
         "Email_AutoResponders":"autoresponders",
         "Site_Software":"site_software",
         "Email_Accounts":"accounts",
         "Cron_Home":"cron_jobs",
         "Locale_Change":"change_language",
         "Email_DefaultAddress":"default_address",
         "Password_Change":"change_password",
         "Email_MX":"mx_entry",
         "Domains_SubDomains":"subdomains",
         "Email_Authentication":"authentication",
         "Domains_AddonDomains":"addon_domains",
         "Email_Forwarders":"forwarders",
         "Email_AccountLevelFiltering":"global_email_filters",
         "Backups_Home":"backup",
         "Database_MySQL":"mysql_databases",
         "Email_DeliveryReport":"track_delivery",
         "ContactInfo_Change":"contact_information",
         "Email_SpamFilter":"apache_spam_assassin",
         "Calendar_Configure":"calendar_and_contacts",
         "Email_UserLevelFiltering":"email_filters",
         "Email_GreyListing":"greylisting",
         "Email_MailingLists":"mailing_lists"
      }
   }
}

 

Note:

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

 

Parameters

 Parameter 

Type

Description

Possible values

Example

nvarglist

or

arglist

 string 

The order in which to sort the groups.

 If you do not supply a value, the function does not sort the groups. 

 A pipe-separated (|) list of group names. 

 pref|software|domains 

 

 

Returns

Return

Type

Description

Possible values

Example

index

             

 

 

hash of arrays

A hash of arrays that contain the order in which applications appear in the cPanel interface.

This hash includes theapp_name array.

 

app_name

array

An array that contains the order in which the application appears in the cPanel interface.

Note:

This parameter's name is the application's name.

 The function returns this value in the index hash.

Two comma-separated non-negative integers.

  • The first integer represents the group in which the application appears.
  • The second integer represents the order in which the application appears in the group.

7,1

grouporder

array

An array that contains the order in which the groups appear.

A comma-separated list of group IDs.

 "files","databases","domains","email","metrics","security","software","advanced","preferences","pref" 

groups

 array of    hashes 

 An array that contains  information about the  groups in the cPanel  interface.

This array includes thegroup and descreturns and the itemsarray.

 

group

string

The group's ID.

 The function returns this value in the groups array.

A valid string.

files

desc

string

 The group's description.

 The function returns this value in the groups array.

A valid string.

Files

items

array of hashes

 An array of hashes that contain group information.

 The function returns this array in the groups array.

This array includes thewidth, itemorder,  file,itemdesc, feature,subtype, target,group, acontent,searchtext, imgtype,base64_png_image,url, implements,height, onclick,feature, if, touch  and module returns.

 

width

integer

 The application's icon's width.

 The function returns this value in the items array.

The application icon width, in pixels.

 

48

itemorder

integer

The application's order in  thedynamicui.conffile.  

 The function returns this  value in the items array.

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

For example, the first item in the cPanelHome interface'sitemorder value is 1.

4

file

string

 The application's icon's  filename.

 The function returns this value in the items array.

An image's filename.

 

addon_domains

itemdesc

string

 The application's display name.

 The function returns this value in the items array.

A string value.

Addon Domain

height

 integer 

The application icon height.

 The function returns this value in the items array.

The application icon height, in pixels.

48

feature

string

A feature name. The icon onlydisplays if the cPanel user can access this feature.

 The function returns this value in the items array.

A feature name.

addondomains

target

string

The target of the application's link.

 The function returns this value in the items array.

A valid string.

file_manager

acontent

string

 The content of a tag in  the application's link.

 The function returns this value in the items array.

A valid string.

target=\"file_manager\"

base64_png_image

string

 The application's icon in Base64 format.

 The function returns this value in the items array.

A valid Base64-encoded image file.

 

group

string

The item's group.

 The function returns this value in the items array.

A string value.

advanced

subtype

string

The item's subtype.

 The function returns this value in the items array.

img is the only possible value.

img

imgtype

string

The item's image type.

 The function returns this value in the items array.

icon is the only possible value.

icon

searchtext

string

One or more search terms. The icon will display when users enter these search terms in the Quick Find text box in the cPanel interface.

 The function returns this value in the items array.

A space-separated list of search terms.

Domains Addon domain

url

string

The location to which the application's icon links.

 The function returns this  value in the items array.

A valid filepath or URL.

 

addon/index.html

type

string

The application's type.

 The function returns this value in the items array.

image is the only possible value.

image

implements

string

The app_key that the function overwrote.

 The function returns this value in the items array.

An application name.

WHM API 1'screate_user_sessionand get_users_linksfunctions use this value.

Domains_AddonDomains

onclick

string

A JavaScript function that the browser calls  before or instead of URL navigation.

 The function returns this value in the items array.

A valid string.

function

module

string

The Perl module that  the application requires.

 The function returns this value in the items array.

A valid string.

My::Module

touch

string

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

 The function returns this value in the items array.

A valid string.

ftp

if

string

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

 The function returns this value in the items array.

A valid string that contains cPanel variables.

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

For more information, read our Guide to cPanel Variablesdocumentation.

$is_reseller

implements

hash

A hash that contains information about the applications and  alternative names under which the cPanel  interface displays them.

This hash includes theapp_name return.

 

app_name

string

The name of the application.

Note:

This return's name is the application's name.

 The function returns this value in the implementshash.

A valid application name.

"Email_BoxTrapper":"boxtrapper",

 

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