Return Tweak Settings option's value

This function retrieves values from the /var/cpanel/cpanel.config file.

Note:

In cPanel & WHM version 86 and later, this function also retrieves values from the user's Exim configuration.

Authorizations:
query Parameters
key
required
string

The Tweak Settings option.

Example: key=defaultmailaction
module
string
Default: "Main"

One of the following Tweak Settings module names:

  • Apache
  • Basic
  • Mail
  • Main
Enum: "Apache" "Basic" "Mail" "Main"
Example: module=Main

Responses

Response Schema: application/json
object
object

Request samples

whmapi1 --output=jsonpretty \
  get_tweaksetting \
  key='defaultmailaction'

Response samples

Content type
application/json
{
  • "data": {
    • "tweaksetting": {
      • "key": "defaultmailaction",
      • "value": "localuser"
      }
    },
  • "metadata": {
    • "command": "get_tweaksetting",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}