WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
The name of the function to call on the remote server.
The name of the parameter for the function.
Note:
You must enter the same number of parameter_name and parameter_value parameters.
The value of the parameter for the function.
Note:
You must enter the same number of parameter_name and parameter_value parameters.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/execute_remote_whmapi1_with_password
- A server running WHM.
https://whm-server.tld:2087/json-api/execute_remote_whmapi1_with_password
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
execute_remote_whmapi1_with_password \
host='host.example.com' \
username='username' \
password='luggage12345' \
function='passwd' \
parameter_name='user' \
parameter_value='username2'{ "data": { "app": [ … ], "key-name*": "system" }, "metadata": { "command": "execute_remote_whmapi1_with_password", "reason": "OK", "result": 1, "version": 1 } }
The UAPI function to call.
Note:
You must include the UAPI function's required parameters. You can also include its optional parameters.
For example, to call the UAPI get_stats function with its required display parameter and the bandwidthusage and diskusage values:
display=bandwidthusage|diskusage
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/uapi_cpanel
- A server running WHM.
https://whm-server.tld:2087/json-api/uapi_cpanel
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
uapi_cpanel \
cpanel.function='get_stats' \
cpanel.module='StatsBar' \
cpanel.user='username'{ "data": { "uapi": { … } }, "metadata": { "command": "uapi_cpanel", "reason": "OK", "result": 1, "version": 1 } }