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/forcepasswordchange
- A server running WHM.
https://whm-server.tld:2087/json-api/forcepasswordchange
- 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/forcepasswordchange?users_json={%22user1%22%3A1%2C%22user2%22%3A1%2C%22user3%22%3A1}&stop_on_failure=1'Response
application/json
{ "data": { "updated": [ … ] }, "metadata": { "command": "forcepasswordchange", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/get_password_strength
- A server running WHM.
https://whm-server.tld:2087/json-api/get_password_strength
- 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/get_password_strength?password=12345luggage'Response
application/json
{ "data": { "strength": 21 }, "metadata": { "command": "get_password_strength", "reason": "OK", "result": 1, "version": 1 } }
Query
The service for which to display the minimum password value. If you do not use this parameter, this function returns the minimum password setting for all values.
default- All servicescpaddons- cPAddonscreateacct- New cPanel accountslist- Mailing listsmysql- MySQL® database userspasswd- WHM user or system accountspostgres- PostgreSQL database userssshkey- SSH keysvirtual- Mail, FTP, Web Disk, and WebDAV accounts
Enum"default""cpaddons""createacct""list""mysql""passwd""postgres""sshkey""virtual"
Example: name=default
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/getminimumpasswordstrengths
- A server running WHM.
https://whm-server.tld:2087/json-api/getminimumpasswordstrengths
- 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/getminimumpasswordstrengths?name=default'Response
application/json
{ "data": { "cpaddons": 50, "createacct": 50, "default": 50, "list": 50, "mysql": 50, "passwd": 50, "postgres": 50, "sshkey": 50, "virtual": 50 }, "metadata": { "command": "getminimumpasswordstrengths", "reason": "OK", "result": 1, "version": 1 } }