UAPI Functions - Themes::list

Description

This function lists available themes.

Examples 


 cPanel or Webmail Session URL

https://hostname.example.com:2083/cpsess##########/execute/Themes/list?get_mail_themes=1

 LiveAPI PHP Class

$cpanel new CPANEL(); // Connect to cPanel - only do this once.
  
// List themes for example.com.
$list_themes $cpanel->uapi(
    'Themes''list',
        array(
        'get_mail_themes'           => '1',
    )
 );

 LiveAPI Perl Module

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
  
# Set list themes on example.com.
my $list_theme $cpliveapi->uapi(
    'Themes''list',
    {
        'get_mail_themes'           => '1',
 
    }
 );

 cPanel Template Toolkit

<!-- List the themes. -->
[% execute('Themes', 'list', { get_mail_themes => '1', } ); %]

 Command Line

uapi --user=username Themes list get_mail_themes=1

 

Notes:

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

 Output (JSON)

{
  "messages": null,
  "errors": null,
  "status": 1,
  "metadata": {
    "transformed": 1
  },
  "data": [
    "paper_lantern",
    "x3",
    "x3mail"
  ]
}

 

Note:

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

 

Parameters

Parameter

Type

Description

Possible values

 Example 

 show_mail_themes 

 string 

 Whether to list the account's mail themes. 

This parameter defaults to 0.

  • 1 — List mail themes.
  • 0 — Do not list mail themes. 

1

 

Returns

 Return 

Type

Description

Possible values

Example

data

 array 

 An array that contains the account's themes. 

 One or more available themes. 

 paper_lantern 

 

 

 

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