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
- 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/passwd?password=12345luggage&user=username&db_pass_update=0&digestauth=1&enabledigest=1'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
- 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/setminimumpasswordstrengths?cpaddons=50&createacct=50&default=50&ftp=50&list=50&mysql=50&passwd=50&postgres=50&sshkey=50&virtual=50'Response
application/json
{ "metadata": { "command": "setminimumpasswordstrengths", "reason": "OK", "result": 1, "version": 1 } }