Child pages
  • WHM API 1 Functions - get_current_profile

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Excerpt

This function returns details about the server's current profile.


Panel
bgColor#F2F2F2
borderStylenone

Examples


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/get_current_profile?api.version=1



Expand
titleCommand Line


Code Block
languagebash
whmapi1 get_current_profile

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


Code Block
languagebash
firstline1
linenumberstrue
{
   "metadata":{
      "result":1,
      "reason":"OK",
      "command":"get_current_profile",
      "version":1
   },
   "data":{
      "description":"The Mail Node profile provides only services and cPanel features that allow the system to serve mail.",
      "optional_roles":[
         {
            "name":"DNS",
            "module":"DNS",
            "description":"DNS allows users to create and edit Domain Name System zone files."
         },
         {
            "description":"Spam Filter allows users to use Apache SpamAssassin™ to identify, sort, and delete unsolicited mail.",
            "name":"Spam Filter",
            "module":"SpamFilter"
         }
      ],
      "enabled_roles":[
         {
            "module":"CalendarContact",
            "name":"Calendars and Contacts",
            "description":"Calendars and Contacts provides CalDAV and CardDAV services."
         },
         {
            "module":"MailReceive",
            "name":"Receive Mail",
            "description":"Receive Mail allows users to receive email, as well as create and manage their email accounts."
         },
         {
            "description":"Send Mail allows users to send email.",
            "module":"MailSend",
            "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"
         }
      ],
      "disabled_roles":[
         {
            "description":"FTP allows users to manage the files associated with their site with an FTP client.",
            "module":"FTP",
            "name":"FTP"
         },
         {
            "module":"FileStorage",
            "name":"File Storage",
            "description":"File Storage allows users to access the File Manager and Git™ Version Control features."
         },
         {
            "module":"MySQL",
            "name":"MySQL/MariaDB",
            "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."
         },
         {
            "module":"WebDisk",
            "name":"Web Disk",
            "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"
         }
      ],
      "name":"Mail Node",
      "code":"MAILNODE"
   }
}



Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote

Parameters

This function does not accept any parameters.

Returns

ReturnTypeDescriptionPossible valuesExample

name

stringThe name of the system's current profile.A valid string.Mail Node

description

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

code

stringThe code ID of the current profile

A valid string.

MAILNODE

enabled_roles

array of hashesThe enabled roles that of the current profile.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 hashesThe disabled roles of the current profile.

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 hashesThe optional roles of the current profile.

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