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/
Query
Whether to also change the account's MySQL® password.
1— Also update the account's MySQL password to match thepasswordvalue.0— Do not update.
Default 1
Enum01
Example: db_pass_update=0
Whether to enable Digest Authentication for the account. If you do not specify a value, the account retains its current Digest Authentication setting. This is an alias for the enabledigest parameter.
1— Enable.0— Disable.
Enum01
Example: digestauth=1
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/passwd
- A server running WHM.
https://whm-server.tld:2087/json-api/passwd
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
passwd \
user='username' \
password='12345luggage'Response
application/json
{ "data": { "app": [ … ] }, "metadata": { "command": "passwd", "reason": "Password changed for user “username”.", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/setminimumpasswordstrengths
- A server running WHM.
https://whm-server.tld:2087/json-api/setminimumpasswordstrengths
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
setminimumpasswordstrengthsResponse
application/json
{ "metadata": { "command": "setminimumpasswordstrengths", "reason": "OK", "result": 1, "version": 1 } }