Description

This function retrieves the value of an option from WHM's Tweak Settings interface (Home >> Server Configuration >> Tweak Settings)

 The system stores the keys and values that this function updates in the /var/cpanel/cpanel.config file.

Examples 




https://hostname.example.com:2087/cpsess##########/json-api/set_tweaksetting?api.version=1&key=proxysubdomains&value=1




https://hostname.example.com:2087/cpsess##########/xml-api/set_tweaksetting?api.version=1&key=proxysubdomains&value=1




whmapi1 set_tweaksetting key=proxysubdomains value=1



{
    result:{
        metadata:{
            version:1,
            reason:'OK',
            result:1,
            command:'set_tweaksetting'
        }
    }
}




<result>
  <metadata>
    <version>1</version>
    <reason>OK</reason>
    <result>1</result>
    <command>set_tweaksetting</command>
  </metadata>
</result>



   

Parameters

ParameterTypeDescriptionPossible valuesExample
keystring

Required

The cpanel.config setting name that corresponds to the desired setting in WHM's Tweak Settings interface (Home >> Server Configuration >> Tweak Settings).

The name of a setting that exists in the /var/cpanel/cpanel.config file. proxysubdomains
module string

The Tweak Settings interface section.

The name of a Tweak Settings interface section. Main
valuestring

The value to assign to the setting.

  • If you do not include this parameter in the call, the value defaults to undef.
  • If you include this parameter in the call but do not set a value, the value defaults to an empty value.

A valid string.

For more information about the requirements for values in the cpanel.config settings, read our The cpanel.config File documentation.

example.com

 

Returns

This function only returns metadata.