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
- 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/remote_mysql_create_profile?mysql_host=192.168.0.1&mysql_pass=12345luggage&mysql_port=3306&mysql_user=username&name=MyProfile&cpcloud=1&setup_via=Main+terminal'{ "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
- 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/remote_mysql_create_profile_via_ssh?host=192.168.0.1&name=MyProfileSSH&port=22&user=SSHuser&cpcloud=1&password=12345luggage&root_escalation_method=su&root_password=username&sshkey_name=VinzClortho&sshkey_passphrase=Gozer'{ "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
- 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/remote_mysql_delete_profile?name=MyProfile'{ "data": { "profile_deleted": "MyProfile", "profile_details": { … } }, "metadata": { "command": "remote_mysql_delete_profile", "reason": "OK", "result": 1, "version": 1 } }