Description

This function adds feature overrides to a cPanel account.

Examples 


https://hostname.example.com:2087/cpsess##########/json-api/add_override_features_for_user?api.version=1&user=example&features=%7B%22videotut%22%3A0%2C%22sslinstall%22%3A1%7D
https://hostname.example.com:2087/cpsess##########/xml-api/add_override_features_for_user?api.version=1&user=example&features=%7B%22videotut%22%3A0%2C%22sslinstall%22%3A1%7D
whmapi1 add_override_features_for_user user=example features=%7B%22videotut%22%3A0%2C%22sslinstall%22%3A1%7D

{  
   "metadata":{  
      "command":"add_override_features_for_user",
      "version":1,
      "reason":"OK",
      "result":1
   }
}
<result>
    <metadata>
        <result>1</result>
        <version>1</version>
        <reason>OK</reason>
        <command>add_override_features_for_user</command>
    </metadata>
</result>

Parameters

ParameterTypeDescriptionPossible valuesExample

user

string

Required

The user's username.

A valid cPanel username.username
featureshash

Required

A hash that lists features to override and whether to enable or disable them.

 

This JSON-encoded hash includes the feature_name parameter.


 

{"videotut":0,"sslinstall":1}

feature_name

Boolean

Required

Whether to enable or disable the feature.

The feature's name is the parameter's name.

The function includes this parameter in the features hash.

  • 1 — Enable.
  • 0 — Disable.

Call WHM API 1's get_feature_names function to view available features.

1

Returns

This function only returns metadata.