Child pages
  • WHM API 1 Functions - ea4_list_profiles
Skip to end of metadata
Go to start of metadata

Description

This function returns a list of all EasyApache 4 profiles and the packages each profile provides.

Note:

For more information, read our EasyApache 4 documentation.

Important:

In cPanel & WHM version 76 and later, when you disable the WebServer role, the system disables this function. For more information, read our How to Use Server Profiles documentation.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/ea4_list_profiles?api.version=1
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/ea4_list_profiles?api.version=1
 Command Line
whmapi1 ea4_list_profiles


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command.
  • If you run CloudLinux™, you must use the full path of the whmapi1 command:

    /usr/local/cpanel/bin/whmapi1

 Output (JSON)
{  
   "data" : {
      "cpanel" : [
         {
            "version" : "1.0",
            "pkgs" : [
               "ea-apache24",
               "ea-apache24-config",
           	…
            ],
            "desc" : "The currently installed packages on the server.",
            "validation_data" : {
               "not_on_server" : []
            },
            "name" : "Current Profile",
            "active" : 1
         },
         {
            "version" : "0.2",
            "tags" : [
               "Apache 2.4",
               "PHP 7.0",
               "PHP 5.5",
               "PHP 5.6",
               "All PHP Opts"
            ],
            "pkgs" : [
               "ea-apache24",
               "ea-apr",
               …
            ],
            "desc" : "This is the MPM Worker cPanel profile plus every PHP option (sans recode and zendguard due to incompatibilities). This package can host multiple sites and users.",
            "validation_data" : {
               "not_on_server" : []
            },
            "name" : "All PHP Options + OpCache",
            "path" : "allphp-opcache.json"
         },
         {
            "name" : "All PHP Options + ZendGuard",
            "validation_data" : {
               "not_on_server" : []
            },
            "path" : "allphp.json",
            "version" : "0.2",
            "desc" : "This is the default cPanel profile plus every PHP option (sans recode and opcache due to incompatibilities). This package can host multiple sites and users.",
            "pkgs" : [
               "ea-apache24",
               "ea-apr",
               …
            ],
            "tags" : [
               "Apache 2.4",
               "PHP 7.0",
               "PHP 5.5",
               "PHP 5.6",
               "All PHP Opts"
            ]
         },
         {
            "path" : "default.json",
            "name" : "cPanel Default",
            "validation_data" : {
               "not_on_server" : []
            },
            "desc" : "This is the standard Apache package with up-to-date PHP and modules, including PHP-FPM. This package can host multiple sites and users.",
            "pkgs" : [
               "ea-apache24",
               "ea-apr",
               …
            ],
            "tags" : [
               "Apache 2.4",
               "PHP 5.5",
               "PHP 5.6",
               "PHP 7.0"
            ],
            "version" : "0.2"
         },
         {
            "tags" : [
               "Apache 2.4",
               "PHP 7.0",
               "PHP 5.5",
               "PHP 5.6",
               "MPM ITK"
            ],
            "desc" : "This profile includes the modules from the Basic profile but replaces MPM Worker with MPM ITK to further increase security for your server. MPM ITK creates a more secure environment than Mod Ruid2, but uses more resources.",
            "pkgs" : [
               "ea-apache24",
               "ea-apr",
               …
            ],
            "version" : "0.2",
            "path" : "mpm_itk.json",
            "validation_data" : {
               "not_on_server" : []
            },
            "name" : "cPanel Default + MPM ITK"
         },
         {
            "desc" : "This Apache web server is beneficial for static content and secure servers. This server does not use PHP support.",
            "pkgs" : [
               "ea-apache24",
               "ea-apr",
               "ea-apr-util",
               "ea-apache24-mod_mpm_worker",
               "ea-apache24-mod_ssl",
               "ea-apache24-mod_suexec",
               "ea-apache24-mod_deflate",
               "ea-apache24-mod_expires",
               "ea-apache24-mod_headers",
               "ea-apache24-mod_proxy",
               "ea-apache24-mod_cgid",
               "ea-apache24-mod_security2"
            ],
            "tags" : [
               "Apache 2.4",
               "No PHP"
            ],
            "version" : "0.1",
            "path" : "nophp.json",
            "name" : "No PHP",
            "validation_data" : {
               "not_on_server" : []
            }
         },
         {
            "tags" : [
               "Apache 2.4",
               "Ruby 2.4",
               "Passenger 5.1"
            ],
            "pkgs" : [
               "ea-apache24",
               …
            "desc" : "This profile installs standard Apache packages with mod_passenger and ea-ruby24. This profile enables the Application Manager interface in cPanel, which allows users to configure Ruby applications to be deployed via mod_passenger.",
            "version" : "0.3",
            "path" : "rubypassenger.json",
            "validation_data" : {
               "not_on_server" : []
            },
            "name" : "Ruby via mod_passenger"
         },
         {
            "path" : "worker.json",
            "name" : "cPanel Worker MPM",
            "validation_data" : {
               "not_on_server" : []
            },
            "desc" : "This profile uses the worker MPM and includes suexec, suphp and mod_security2 to improve the security of your server.",
            "pkgs" : [
               "ea-apache24",
               …
            ],
            "tags" : [
               "Apache 2.4",
               "PHP 5.5",
               "PHP 5.6",
               "PHP 7.0"
            ],
            "version" : "0.3"
         }
      ],
      "custom" : [
         {
            "path" : "example.json",
            "validation_data" : {
               "not_on_server" : []
            },
            "name" : "Example",
            "tags" : [],
            "pkgs" : [
               "ea-apache24"
            ],
            "desc" : "",
            "version" : "0.1"
         }
     ]
   },
   "metadata":{  
      "reason":"OK",
      "result":1,
      "version":1,
      "command":"ea4_list_profiles"
   }
}
 Output (XML)
<result>
  <data>
    <cpanel>
      <name>Current Profile</name>
      <active>1</active>
      <desc>The currently installed packages on the server.</desc>
      <pkgs>ea-apache24</pkgs>
      <pkgs>ea-apache24-config</pkgs>
      …
      <validation_data>
      </validation_data>
      <version>1.0</version>
    </cpanel>
    <cpanel>
      <name>All PHP Options + OpCache</name>
      <desc>This is the MPM Worker cPanel profile plus every PHP option (sans recode and zendguard due to incompatibilities). This package can host multiple sites and users.</desc>
      <path>allphp-opcache.json</path>
      <pkgs>ea-apache24</pkgs>
      <pkgs>ea-apr</pkgs>
      …
      <tags>Apache 2.4</tags>
      <tags>PHP 7.0</tags>
      <tags>PHP 5.5</tags>
      <tags>PHP 5.6</tags>
      <tags>All PHP Opts</tags>
      <validation_data>
      </validation_data>
      <version>0.2</version>
    </cpanel>
    <cpanel>
      <name>All PHP Options + ZendGuard</name>
      <desc>This is the default cPanel profile plus every PHP option (sans recode and opcache due to incompatibilities). This package can host multiple sites and users.</desc>
      <path>allphp.json</path>
      <pkgs>ea-apache24</pkgs>
      <pkgs>ea-apr</pkgs>
      …
      <tags>Apache 2.4</tags>
      <tags>PHP 7.0</tags>
      <tags>PHP 5.5</tags>
      <tags>PHP 5.6</tags>
      <tags>All PHP Opts</tags>
      <validation_data>
      </validation_data>
      <version>0.2</version>
    </cpanel>
    <cpanel>
      <name>cPanel Default</name>
      <desc>This is the standard Apache package with up-to-date PHP and modules, including PHP-FPM. This package can host multiple sites and users.</desc>
      <path>default.json</path>
      <pkgs>ea-apache24</pkgs>
      <pkgs>ea-apr</pkgs>
      …
      <tags>Apache 2.4</tags>
      <tags>PHP 5.5</tags>
      <tags>PHP 5.6</tags>
      <tags>PHP 7.0</tags>
      <validation_data>
      </validation_data>
      <version>0.2</version>
    </cpanel>
    <cpanel>
      <name>cPanel Default + MPM ITK</name>
      <desc>This profile includes the modules from the Basic profile but replaces MPM Worker with MPM ITK to further increase security for your server. MPM ITK creates a more secure environment than Mod Ruid2, but uses more resources.</desc>
      <path>mpm_itk.json</path>
      <pkgs>ea-apache24</pkgs>
      <pkgs>ea-apr</pkgs>
      …
      <tags>Apache 2.4</tags>
      <tags>PHP 7.0</tags>
      <tags>PHP 5.5</tags>
      <tags>PHP 5.6</tags>
      <tags>MPM ITK</tags>
      <validation_data>
      </validation_data>
      <version>0.2</version>
    </cpanel>
    <cpanel>
      <name>No PHP</name>
      <desc>This Apache web server is beneficial for static content and secure servers. This server does not use PHP support.</desc>
      <path>nophp.json</path>
      <pkgs>ea-apache24</pkgs>
      <pkgs>ea-apr</pkgs>
      <pkgs>ea-apr-util</pkgs>
      <pkgs>ea-apache24-mod_mpm_worker</pkgs>
      <pkgs>ea-apache24-mod_ssl</pkgs>
      <pkgs>ea-apache24-mod_suexec</pkgs>
      <pkgs>ea-apache24-mod_deflate</pkgs>
      <pkgs>ea-apache24-mod_expires</pkgs>
      <pkgs>ea-apache24-mod_headers</pkgs>
      <pkgs>ea-apache24-mod_proxy</pkgs>
      <pkgs>ea-apache24-mod_cgid</pkgs>
      <pkgs>ea-apache24-mod_security2</pkgs>
      <tags>Apache 2.4</tags>
      <tags>No PHP</tags>
      <validation_data>
      </validation_data>
      <version>0.1</version>
    </cpanel>
    <cpanel>
      <name>Ruby via mod_passenger</name>
      <desc>This profile installs standard Apache packages with mod_passenger and ea-ruby24. This profile enables the Application Manager interface in cPanel, which allows users to configure Ruby applications to be deployed via mod_passenger.</desc>
      <path>rubypassenger.json</path>
      <pkgs>ea-apache24</pkgs>
      …
      <tags>Apache 2.4</tags>
      <tags>Ruby 2.4</tags>
      <tags>Passenger 5.1</tags>
      <validation_data>
      </validation_data>
      <version>0.3</version>
    </cpanel>
    <cpanel>
      <name>cPanel Worker MPM</name>
      <desc>This profile uses the worker MPM and includes suexec, suphp and mod_security2 to improve the security of your server.</desc>
      <path>worker.json</path>
      <pkgs>ea-apache24</pkgs>
      <pkgs>ea-apr</pkgs>
      …
      <tags>Apache 2.4</tags>
      <tags>PHP 5.5</tags>
      <tags>PHP 5.6</tags>
      <tags>PHP 7.0</tags>
      <validation_data>
      </validation_data>
      <version>0.3</version>
    </cpanel>
    <custom>
      <name>Test</name>
      <desc></desc>
      <path> foo bar.json</path>
      <pkgs>ea-apache24</pkgs>
      <validation_data>
      </validation_data>
      <version>0.1</version>
    </custom>
  </data>
    <metadata>
        <result>1</result>
        <version>1</version>
        <reason>OK</reason>
        <command>ea4_list_pkgs</command>
    </metadata>
	
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

This function does not accept parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
cpanelarray of hashesAn array of cPanel's settings hashes.

This array of hashes includes the version, desc, name, path, pkgs, active, tags, and validation_data returns.


 
customarray of hashes

An array of custom settings hashes.

Note:

This function returns the custom or vendor_name arrays when the server administrator or a third-party vendor creates the profile.

This array of hashes includes the version, desc, name, path, pkgs, tags, and validation_data returns.

                
vendor_namearray of hashes

An array of vendor settings hashes.

In this return, vendor_name is a vendor's name.

Note:

  • This function returns the custom or vendor_name arrays when the server administrator or a third-party vendor creates the profile.
  • The vendor_name hash may contain multiple options, as the system can install multiple vendors.

This array of hashes includes the version, desc, name, path, pkgs, tags, and validation_data returns.

ExampleHost

active

Boolean

Whether the cPanel profile's settings are active.

The function returns this value in the hashes of the cpanel array of hashes.

  • 1 — Active.
  • 0 — Inactive.
1

version

string

The profile's current version ID.

The function returns this value in the hashes of the cpanel, custom, or vendor_name array of hashes.

A version ID.

1.2

desc

string

A description of the profile.

The function returns this value in the hashes of the cpanel, custom, or vendor_name array of hashes.

A description.
The currently installed packages on the server.

name

string

The profile name.

The function returns this value in the hashes of the cpanel, custom, or vendor_name array of hashes.

A profile name.

No PHP

path

string

The file name of the profile.

The function returns this value in the hashes of the cpanel, custom, or vendor_name array of hashes.

A system path.

default.json

pkgs

array

The RPM packages included in the profile.

The function returns this value in the hashes of the cpanel, custom, or vendor_name array of hashes.

An array of RPM packages.ea-apache24

tags

array

Labels that highlight key attributes of a profile.

The function returns this value in the hashes of the cpanel, custom, or vendor_name array of hashes.

An array of profile labels.Apache 2.4

validation_data

array

The packages not installed on the server.

The function returns this value in the hashes of the cpanel, custom, or vendor_name array of hashes.

An array of uninstalled RPM packages.[ ]