Description

This function retrieves a value from the /var/cpanel/cpanel.config file.


Examples 




https://hostname.example.com:2087/cpsess##########/json-api/get_tweaksetting?api.version=1&key=update_log_analysis_retention_strength




https://hostname.example.com:2087/cpsess##########/xml-api/get_tweaksetting?api.version=1&key=update_log_analysis_retention_strength




whmapi1 get_tweaksetting key=update_log_analysis_retention_strength



{
    result:{
        data:{
            tweaksetting:{
                value:90,
                key:'update_log_analysis_retention_length'
            }
        },
        metadata:{
            version:1,
            reason:'OK',
            result:1,
            command:'get_tweaksetting'
        }
    }
}




<result>
  <data>
    <tweaksetting>
      <value>90</value>
      <key>update_log_analysis_retention_length</key>
    </tweaksetting>
  </data>
  <metadata>
    <version>1</version>
    <reason>OK</reason>
    <result>1</result>
    <command>get_tweaksetting</command>
  </metadata>
</result>



   

Parameters

ParameterTypeDescriptionPossible valuesExample
key string

Required

The Tweak Settings option.

A valid string.update_log_analysis_retention_length

module

string

The Tweak Settings section.

This value defaults to Main.

A valid string.

Main

Returns

ReturnTypeDescriptionPossible valuesExample
tweaksettinghashA hash of the tweak setting information.This hash includes the value and key returns. 

value

string

The value.

The function returns this value in the tweaksetting hash.

This value depends on the key's requirements.90

key

string

The key.

The function returns this value in the tweaksetting hash.

A valid key name in the cpanel.config file.
update_log_analysis_retention_length