WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/remote_mysql_create_profile
- A server running WHM.
https://whm-server.tld:2087/json-api/remote_mysql_create_profile
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
remote_mysql_create_profile \
name='MyProfile' \
mysql_host='192.168.0.1' \
mysql_user='username' \
mysql_pass='12345luggage' \
mysql_port='3306'{ "data": { "profile_details": { … }, "profile_saved": "MyProfile" }, "metadata": { "command": "remote_mysql_create_profile", "reason": "OK", "result": 1, "version": 1 } }
The MySQL server's IP address or hostname.
Whether the remote database profile is a cPanel Cloud deployment.
1— Is cPanel Cloud.0— Not cPanel Cloud.
The SSH username's password.
Warning:
You must specify either the password or the sshkey_name parameter.
The escalation method to use to authenticate the account.
Warning:
This parameter is required if the user parameter's value is not root.
The MySQL server's root user's password.
Warning:
This parameter is required if the root_escalation_method parameter's value is su.
The name of the SSH key.
Warning:
You must specify either the password or the sshkey_name parameter.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/remote_mysql_create_profile_via_ssh
- A server running WHM.
https://whm-server.tld:2087/json-api/remote_mysql_create_profile_via_ssh
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
remote_mysql_create_profile_via_ssh \
name='MyProfileSSH' \
user='SSHuser' \
host='192.168.0.1' \
port='22'{ "data": { "profile_details": { … }, "profile_saved": "MyProfileSSH" }, "metadata": { "command": "remote_mysql_create_profile_via_ssh", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/remote_mysql_delete_profile
- A server running WHM.
https://whm-server.tld:2087/json-api/remote_mysql_delete_profile
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
remote_mysql_delete_profile \
name='MyProfile'{ "data": { "profile_deleted": "MyProfile", "profile_details": { … } }, "metadata": { "command": "remote_mysql_delete_profile", "reason": "OK", "result": 1, "version": 1 } }