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 changes a MySQL® database user's name.
Important:
When you disable the MySQL/MariaDB role and remote MySQL is not already configured, the system disables this function.
Security
BasicAuth
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/rename_mysql_user
- A server running WHM.
https://whm-server.tld:2087/json-api/rename_mysql_user
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
rename_mysql_user \
oldname='username' \
newname='username2'Response
application/json
{ "metadata": { "command": "rename_mysql_user", "reason": "OK", "result": 1, "version": 1 } }
Request
This function changes a MySQL® database user's password.
Important:
When you disable the MySQL/MariaDB role and remote MySQL is not already configured, the system disables this function.
Security
BasicAuth
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/set_mysql_password
- A server running WHM.
https://whm-server.tld:2087/json-api/set_mysql_password
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
set_mysql_password \
user='username' \
password='123456luggage'Response
application/json
{ "metadata": { "command": "set_mysql_password", "reason": "OK", "result": 1, "version": 1 } }