WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/update_featurelist
- A server running WHM.
https://whm-server.tld:2087/json-api/update_featurelist
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
update_featurelist \
featurelist='TheBlackLagoon'{ "data": { "featurelist": "TheBlackLagoon", "invalid_features": [ … ], "updated_features": { … } }, "metadata": { "command": "update_featurelist", "reason": "OK", "result": 1, "version": 1 } }
Request
DEPRECATED: Use get_featurelists instead.
This function lists the authenticated user's available feature lists.
Notes:
- This function is deprecated because it treats a lack of available feature lists as an error for non-admin resellers, which is incorrect behavior.
- When you call this function with the
rootaccount, it returns all feature lists on the server. - When you call this function with a reseller account, it only returns feature lists that the account owns.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/get_available_featurelists
- A server running WHM.
https://whm-server.tld:2087/json-api/get_available_featurelists
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
get_available_featurelists{ "metadata": { "command": "get_available_featurelists", "reason": "OK", "result": 1, "version": 1 }, "data": { "available_featurelists": [ … ] } }
Request
DEPRECATED: Use get_featurelist_data instead.
This function reads a feature list and returns a hash that maps feature IDs to values indicating whether each feature is enabled.
Notes:
- The function requires the
featurelistparameter to specify which feature list to read. - Access is controlled based on user permissions. Resellers can only access their own feature lists.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/read_featurelist
- A server running WHM.
https://whm-server.tld:2087/json-api/read_featurelist
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
read_featurelist \
featurelist='default'{ "metadata": { "command": "read_featurelist", "reason": "OK", "result": 1, "version": 1 }, "data": { "featurelist": "default", "features": { … } } }