Return Tweak Settings option's value

This function retrieves values from the /var/cpanel/cpanel.config file and the server's Exim configuration.

SecurityBasicAuth
Request
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
200

HTTP Request was successful.

Response Schema: application/json
object
object
get/get_tweaksetting
Request samples
whmapi1 --output=jsonpretty \
  get_tweaksetting \
  key='defaultmailaction'
Response samples
application/json
{
  • "data": {
    • "tweaksetting": {
      • "key": "defaultmailaction",
      • "value": "localuser"
      }
    },
  • "metadata": {
    • "command": "get_tweaksetting",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}