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/
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/getdiskusage
- A server running WHM.
https://whm-server.tld:2087/json-api/getdiskusage
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
getdiskusageResponse
application/json
{ "data": { "partition": [ … ] }, "metadata": { "command": "getdiskusage", "reason": "Successfully retrieved disk usage", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/gethostname
- A server running WHM.
https://whm-server.tld:2087/json-api/gethostname
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
gethostnameResponse
application/json
{ "data": { "hostname": "hostname.example.com" }, "metadata": { "command": "gethostname", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/reboot
- A server running WHM.
https://whm-server.tld:2087/json-api/reboot
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
rebootResponse
application/json
{ "metadata": { "command": "reboot", "reason": "OK", "result": 1, "version": 1 } }