WHM API.
Download OpenAPI description
Overview
URL
WebPros International, LLC
License
Languages
Servers
Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
A server running WHM.
https://{host}:{port}/json-api/
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.
Security
BasicAuth
- 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_featurelistsResponse
application/json
{ "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.
Security
BasicAuth
- 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'Response
application/json
{ "metadata": { "command": "read_featurelist", "reason": "OK", "result": 1, "version": 1 }, "data": { "featurelist": "default", "features": { … } } }