Child pages
  • WHM API 1 Functions - get_service_config_key

Versions Compared

Key

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

Description

Excerpt

This function returns a specific configuration key for a service.


Panel
bgColor#F2F2F2
borderStylenone

Examples


Panel
bgColor#FFFFFF
borderStylenone


Expand
titleJSON API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/json-api/get_service_config_key?api.version=1&service=dovecot&key=mail_process_size



Expand
titleXML API


Code Block
languagexml
https://hostname.example.com:2087/cpsess##########/xml-api/get_service_config_key?api.version=1&service=dovecot&key=mail_process_size



Expand
titleCommand Line


Code Block
languagebash
whmapi1 get_service_config_key service=dovecot key=mail_process_size

Include Page
LIB:_WHMAPI1CLINote
LIB:_WHMAPI1CLINote


Expand
titleOutput (JSON)


Code Block
languagetext
linenumberstrue
{  
   "data":{  
      "mail_process_size":"256"
   },
   "metadata":{  
      "command":"get_service_config_key",
      "version":1,
      "reason":"OK",
      "result":1
   }
}



Expand
titleOutput (XML)


Code Block
languagetext
linenumberstrue
<result>
    <data>
        <mail_process_size>256</mail_process_size>
    </data>
    <metadata>
        <reason>OK</reason>
        <version>1</version>
        <result>1</result>
        <command>get_service_config_key</command>
    </metadata>
</result>



Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote

Parameters

ParameterTypeDescriptionPossible valuesExample
servicestring

Required

The service's name.

A valid cPanel & WHM service name.

Warning
titleWarning:

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


dovecot
keystring

Required

The configuration key's name.

A valid configuration key for the service.

Note
titleNote:

This function currently only supports top-level configuration keys and not subkeys.


mail_process_size

Returns

Note
titleNote:

Each service and key returns a different set of values.


ReturnTypeDescriptionPossible valuesExample
key namevaries

Required

A configuration key's setting.

Note
titleNote:

The key name is the return's name.


This return's possible values depend on the service and key.
256