Child pages
  • WHM API 1 Functions - add_override_features_for_user
Skip to end of metadata
Go to start of metadata

 

Description

This function adds feature overrides to a cPanel account.

Examples 


 JSON API
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
 XML API
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
 Command Line
whmapi1 add_override_features_for_user user=example features=%7B%22videotut%22%3A0%2C%22sslinstall%22%3A1%7D


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command. 

 Output (JSON)
{  
   "metadata":{  
      "command":"add_override_features_for_user",
      "version":1,
      "reason":"OK",
      "result":1
   }
}
 Output (XML)
<result>
    <metadata>
        <result>1</result>
        <version>1</version>
        <reason>OK</reason>
        <command>add_override_features_for_user</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

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.

Note:

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

The function includes this parameter in the features hash.

  • 1 — Enable.
  • 0 — Disable.

Note:

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

1

Returns

This function only returns metadata.