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

Description

This function returns a list of available server profiles.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/get_available_profiles?api.version=1
 Command Line
whmapi1 get_available_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)
{
   "metadata":{
      "result":1,
      "command":"get_available_profiles",
      "reason":"OK",
      "version":1
   },
   "data":{
      "profiles":[
         {
            "description":"The Standard Node profile provides all services and access to every cPanel feature.",
            "experimental":0,
            "code":"STANDARD",
            "enabled_roles":[
               {
                  "description":"Calendars and Contacts provides CalDAV and CardDAV services.",
                  "module":"CalendarContact",
                  "name":"Calendars and Contacts"
               },
               {
                  "description":"DNS allows users to create and edit Domain Name System zone files.",
                  "module":"DNS",
                  "name":"DNS"
               },
               {
                  "module":"FTP",
                  "description":"FTP allows users to manage the files associated with their site with an FTP client.",
                  "name":"FTP"
               },
               {
                  "name":"File Storage",
                  "description":"File Storage allows users to access the File Manager and Git™ Version Control features.",
                  "module":"FileStorage"
               },
               {
                  "name":"Receive Mail",
                  "description":"Receive Mail allows users to receive email, as well as create and manage their email accounts.",
                  "module":"MailReceive"
               },
               {
                  "module":"MailSend",
                  "description":"Send Mail allows users to send email.",
                  "name":"Send Mail"
               },
               {
                  "name":"Local Mail",
                  "module":"MailLocal",
                  "description":"Local Mail allows the system to process email."
               },
               {
                  "description":"MySQL®/MariaDB allows users to create and manage MySQL/MariaDB databases.",
                  "module":"MySQL",
                  "name":"MySQL/MariaDB"
               },
               {
                  "description":"PostgreSQL allows users to create and manage PostgreSQL databases.",
                  "module":"Postgres",
                  "name":"PostgreSQL"
               },
               {
                  "module":"SpamFilter",
                  "description":"Spam Filter allows users to use Apache SpamAssassin™ to identify, sort, and delete unsolicited mail.",
                  "name":"Spam Filter"
               },
               {
                  "name":"Webmail",
                  "description":"Webmail provides access to webmail services.",
                  "module":"Webmail"
               },
               {
                  "name":"Web Disk",
                  "module":"WebDisk",
                  "description":"Web Disk allows users to manage and manipulate files on the server with multiple types of devices."
               },
               {
                  "description":"Web Server allows users to create and manage websites for their domains.",
                  "module":"WebServer",
                  "name":"Web Server"
               }
            ],
            "optional_roles":[

            ],
            "name":"Standard Node",
            "disabled_roles":[

            ]
         },
         {
            "description":"The Database Node profile provides only services and cPanel features that allow the system to serve databases.",
            "experimental":1,
            "code":"DATABASENODE",
            "enabled_roles":[
               {
                  "description":"MySQL®/MariaDB allows users to create and manage MySQL/MariaDB databases.",
                  "module":"MySQL",
                  "name":"MySQL/MariaDB"
               },
               {
                  "name":"Send Mail",
                  "module":"MailSend",
                  "description":"Send Mail allows users to send email."
               },
               {
                  "name":"Local Mail",
                  "module":"MailLocal",
                  "description":"Local Mail allows the system to process email."
               }
            ],
            "optional_roles":[
               {
                  "name":"PostgreSQL",
                  "module":"Postgres",
                  "description":"PostgreSQL allows users to create and manage PostgreSQL databases."
               }
            ],
            "name":"Database Node",
            "disabled_roles":[
               {
                  "name":"Calendars and Contacts",
                  "module":"CalendarContact",
                  "description":"Calendars and Contacts provides CalDAV and CardDAV services."
               },
               {
                  "name":"DNS",
                  "description":"DNS allows users to create and edit Domain Name System zone files.",
                  "module":"DNS"
               },
               {
                  "name":"FTP",
                  "module":"FTP",
                  "description":"FTP allows users to manage the files associated with their site with an FTP client."
               },
               {
                  "name":"File Storage",
                  "description":"File Storage allows users to access the File Manager and Git™ Version Control features.",
                  "module":"FileStorage"
               },
               {
                  "description":"Receive Mail allows users to receive email, as well as create and manage their email accounts.",
                  "module":"MailReceive",
                  "name":"Receive Mail"
               },
               {
                  "name":"Spam Filter",
                  "module":"SpamFilter",
                  "description":"Spam Filter allows users to use Apache SpamAssassin™ to identify, sort, and delete unsolicited mail."
               },
               {
                  "name":"Webmail",
                  "module":"Webmail",
                  "description":"Webmail provides access to webmail services."
               },
               {
                  "module":"WebDisk",
                  "description":"Web Disk allows users to manage and manipulate files on the server with multiple types of devices.",
                  "name":"Web Disk"
               },
               {
                  "name":"Web Server",
                  "module":"WebServer",
                  "description":"Web Server allows users to create and manage websites for their domains."
               }
            ]
         },
         {
            "disabled_roles":[
               {
                  "name":"Calendars and Contacts",
                  "description":"Calendars and Contacts provides CalDAV and CardDAV services.",
                  "module":"CalendarContact"
               },
               {
                  "module":"FTP",
                  "description":"FTP allows users to manage the files associated with their site with an FTP client.",
                  "name":"FTP"
               },
               {
                  "description":"File Storage allows users to access the File Manager and Git™ Version Control features.",
                  "module":"FileStorage",
                  "name":"File Storage"
               },
               {
                  "module":"MailReceive",
                  "description":"Receive Mail allows users to receive email, as well as create and manage their email accounts.",
                  "name":"Receive Mail"
               },
               {
                  "name":"PostgreSQL",
                  "description":"PostgreSQL allows users to create and manage PostgreSQL databases.",
                  "module":"Postgres"
               },
               {
                  "name":"Spam Filter",
                  "description":"Spam Filter allows users to use Apache SpamAssassin™ to identify, sort, and delete unsolicited mail.",
                  "module":"SpamFilter"
               },
               {
                  "name":"Webmail",
                  "module":"Webmail",
                  "description":"Webmail provides access to webmail services."
               },
               {
                  "name":"Web Disk",
                  "module":"WebDisk",
                  "description":"Web Disk allows users to manage and manipulate files on the server with multiple types of devices."
               },
               {
                  "name":"Web Server",
                  "module":"WebServer",
                  "description":"Web Server allows users to create and manage websites for their domains."
               }
            ],
            "name":"DNS Node",
            "enabled_roles":[
               {
                  "name":"DNS",
                  "module":"DNS",
                  "description":"DNS allows users to create and edit Domain Name System zone files."
               },
               {
                  "name":"Send Mail",
                  "module":"MailSend",
                  "description":"Send Mail allows users to send email."
               },
               {
                  "name":"Local Mail",
                  "module":"MailLocal",
                  "description":"Local Mail allows the system to process email."
               }
            ],
            "optional_roles":[
               {
                  "module":"MySQL",
                  "description":"MySQL®/MariaDB allows users to create and manage MySQL/MariaDB databases.",
                  "name":"MySQL/MariaDB"
               }
            ],
            "code":"DNSNODE",
            "experimental":1,
            "description":"The DNS Node profile provides only services and cPanel features that allow the system to serve Domain Name System zones."
         },
         {
            "disabled_roles":[
               {
                  "description":"FTP allows users to manage the files associated with their site with an FTP client.",
                  "module":"FTP",
                  "name":"FTP"
               },
               {
                  "description":"File Storage allows users to access the File Manager and Git™ Version Control features.",
                  "module":"FileStorage",
                  "name":"File Storage"
               },
               {
                  "name":"MySQL/MariaDB",
                  "module":"MySQL",
                  "description":"MySQL®/MariaDB allows users to create and manage MySQL/MariaDB databases."
               },
               {
                  "name":"PostgreSQL",
                  "module":"Postgres",
                  "description":"PostgreSQL allows users to create and manage PostgreSQL databases."
               },
               {
                  "name":"Web Disk",
                  "description":"Web Disk allows users to manage and manipulate files on the server with multiple types of devices.",
                  "module":"WebDisk"
               },
               {
                  "description":"Web Server allows users to create and manage websites for their domains.",
                  "module":"WebServer",
                  "name":"Web Server"
               }
            ],
            "name":"Mail Node",
            "enabled_roles":[
               {
                  "module":"CalendarContact",
                  "description":"Calendars and Contacts provides CalDAV and CardDAV services.",
                  "name":"Calendars and Contacts"
               },
               {
                  "module":"MailReceive",
                  "description":"Receive Mail allows users to receive email, as well as create and manage their email accounts.",
                  "name":"Receive Mail"
               },
               {
                  "module":"MailSend",
                  "description":"Send Mail allows users to send email.",
                  "name":"Send Mail"
               },
               {
                  "name":"Local Mail",
                  "module":"MailLocal",
                  "description":"Local Mail allows the system to process email."
               },
               {
                  "description":"Webmail provides access to webmail services.",
                  "module":"Webmail",
                  "name":"Webmail"
               }
            ],
            "optional_roles":[
               {
                  "description":"DNS allows users to create and edit Domain Name System zone files.",
                  "module":"DNS",
                  "name":"DNS"
               },
               {
                  "module":"SpamFilter",
                  "description":"Spam Filter allows users to use Apache SpamAssassin™ to identify, sort, and delete unsolicited mail.",
                  "name":"Spam Filter"
               }
            ],
            "code":"MAILNODE",
            "experimental":1,
            "description":"The Mail Node profile provides only services and cPanel features that allow the system to serve mail."
         }
      ]
   }
}


Note:

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

Parameters

This function does not accept any parameters.

Returns

ReturnTypeDescriptionPossible valuesExample
profilesarray of hashesAn array of hashes that contains the available server profiles.This array contains the code, name, description, enabled_roles, disabled_roles, and optional_roles returns.

code

string

The profile's ID.

The function returns this value in the profiles hash.

A valid string.MAILNODE

name

string

The profile's name.

The function returns this value in the profiles hash.

A valid string.Mail Node

description

string

The profile's description.

The function returns this value in the profiles hash.

A valid string.
The Mail Node profile provides only services and cPanel features that allow the system to serve mail.

enabled_roles

array of hashes

The roles that this profile enables.

The function returns this value in the profiles hash.

Each hash contains the name, description, and module returns.

name

string

The role's name.

The function returns this value in the enabled_roles hash.

A valid string.Receive Mail

description

string

The role's description.

The function returns this value in the enabled_roles hash.

A valid string.
Receive Mail allows users to receive email, as well as create and manage their email accounts.

module

string

The role's module name.

The function returns this value in the enabled_roles hash.

A valid string.MailReceive

disabled_roles

array of hashes

The roles that this profile disables.

The function returns this value in the profiles hash.

Each hash contains the name, description, and module returns.

The function returns an empty value if no disabled roles exist.

                

name

string

The role's name.

The function returns this value in the disabled_roles hash.

A valid string.File Storage

description

string

The role's description.

The function returns this value in the disabled_roles hash.

A valid string.File Storage allows users to access the File Manager and Git™ Version Control features.

module

string

The role's module name.

The function returns this value in the disabled_roles hash.

A valid string.FileStorage

optional_roles

array of hashes

The optional roles that this profile enables.

The function returns this value in the profiles hash.

Each hash contains the name, description, and module returns.

The function returns an empty value if no optional roles exist.

                

name

string

The role's name.

The function returns this value in the optional_roles hash.

A valid string.DNS

description

string

The role's description.

The function returns this value in the optional_roles hash.

A valid string.DNS allows users to create and edit Domain Name System zone files.

module

string

The role's module name.

The function returns this value in the optional_roles hash.

A valid string.DNS