Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Description

Excerpt

This function adds feature overrides to a cPanel account.

Panel
bgColor#F2F2F2
borderStylenone

Examples 


Panel
bgColor#FFFFFF
borderStylenone
Expand
titleJSON API
Code Block
languagexml
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
Expand
titleXML API
Code Block
languagexml
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
Expand
titleCommand Line
Code Block
languagebash
whmapi1 add_override_features_for_user user=example features=%7B%22videotut%22%3A0%2C%22sslinstall%22%3A1%7D

Include Page
_WHMAPI1CLINote
_WHMAPI1CLINote

Expand
titleOutput (JSON)
Code Block
languagetext
linenumberstrue
{  
   "metadata":{  
      "command":"add_override_features_for_user",
      "version":1,
      "reason":"OK",
      "result":1
   }
}
Expand
titleOutput (XML)
Code Block
languagetext
linenumberstrue
<result>
    <metadata>
        <result>1</result>
        <version>1</version>
        <reason>OK</reason>
        <command>add_override_features_for_user</command>
    </metadata>
</result>

Include Page
LIB:_WHMAPIShellNote
LIB:_WHMAPIShellNote

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
titleNote:
The feature's name is the parameter's name.

The function includes this parameter in the features hash.

  • 1 — Enable.
  • 0 — Disable.
Note
titleNote:

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

1

Returns

This function only returns metadata.