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

 

Description

This function returns a service's configuration settings.

Examples


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


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":{  
      "login_max_processes_count":"50",
      "auth_cache_ttl":"3600",
      "mdbox_rotate_size":"2M",
      "auth_cache_negative_ttl":"3600",
      "ssl_protocols":"!SSLv2 !SSLv3",
      "login_processes_count":"2",
      "mailbox_idle_check_interval":"30",
      "mdbox_rotate_interval":"12w",
      "ipv6":"on",
      "protocols":"imap pop3",
      "login_process_per_connection":"no",
      "expire_trash_ttl":"30",
      "disable_plaintext_auth":"no",
      "mail_process_size":"256",
      "ssl_cipher_list":"ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA",
      "max_mail_processes":"512",
      "expire_trash":"1",
      "protocol_pop3":{  
         "mail_max_userip_connections":"3"
      },
      "login_process_size":"64",
      "auth_cache_size":"8192",
      "protocol_imap":{  
         "mail_max_userip_connections":"20",
         "imap_idle_notify_interval":"24"
      }
   },
   "metadata":{  
      "result":1,
      "command":"get_service_config",
      "reason":"OK",
      "version":1
   }
}
 Output (XML)
<result>
    <metadata>
        <version>1</version>
        <result>1</result>
        <reason>OK</reason>
        <command>get_service_config</command>
    </metadata>
    <data>
        <auth_cache_ttl>3600</auth_cache_ttl>
        <ipv6>on</ipv6>
        <auth_cache_size>8192</auth_cache_size>
        <max_mail_processes>512</max_mail_processes>
        <mail_process_size>256</mail_process_size>
        <expire_trash_ttl>30</expire_trash_ttl>
        <login_processes_count>2</login_processes_count>
        <protocol_imap>
            <imap_idle_notify_interval>24</imap_idle_notify_interval>
            <mail_max_userip_connections>20</mail_max_userip_connections>
        </protocol_imap>
        <expire_trash>1</expire_trash>
        <ssl_protocols>!SSLv2 !SSLv3</ssl_protocols>
        <disable_plaintext_auth>no</disable_plaintext_auth>
        <login_process_per_connection>no</login_process_per_connection>
        <protocol_pop3>
            <mail_max_userip_connections>3</mail_max_userip_connections>
        </protocol_pop3>
        <mdbox_rotate_size>2M</mdbox_rotate_size>
        <mailbox_idle_check_interval>30</mailbox_idle_check_interval>
        <auth_cache_negative_ttl>3600</auth_cache_negative_ttl>
        <login_max_processes_count>50</login_max_processes_count>
        <login_process_size>64</login_process_size>
        <protocols>imap pop3</protocols>
        <ssl_cipher_list>
            ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
        </ssl_cipher_list>
        <mdbox_rotate_interval>12w</mdbox_rotate_interval>
    </data>
</result>


Note:

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

     

Parameters

ParameterTypeDescriptionPossible valuesExample
servicestring

Required

The service's name.

A valid cPanel & WHM service name.

Warning:

As of cPanel & WHM version 58, only the dovecot service is compatible with this function.

dovecot

Returns

Note:

Each service outputs a different set of returns and values.


ReturnTypeDescriptionPossible valuesExample
key namevaries

A configuration key's setting.

Note:

The key name is the return's name.

Varies, depending on the service and key.
This is what it sounds like when the dovecots cry.