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
This function determines if your system requires a reboot to apply quotas, software package updates, or kernel updates.
Important:
This function cannot detect whether your system needs a reboot if you use cPanel & WHM inside of a Linux Container (LXC).
Security
BasicAuth
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/system_needs_reboot
- A server running WHM.
https://whm-server.tld:2087/json-api/system_needs_reboot
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/system_needs_rebootResponse
application/json
{ "details": { "kernel": { … }, "quota": 1, "updates": { … } }, "metadata": { "command": "system_needs_reboot", "reason": "OK", "result": 1, "version": 1 }, "needs_reboot": 1 }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/systemloadavg
- A server running WHM.
https://whm-server.tld:2087/json-api/systemloadavg
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/systemloadavgResponse
application/json
{ "data": { "fifteen": 0.19, "five": 0.18, "one": 0.17 }, "metadata": { "command": "systemloadavg", "reason": "OK", "result": 1, "version": 1 } }