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/
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/remote_mysql_read_profile
- A server running WHM.
https://whm-server.tld:2087/json-api/remote_mysql_read_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_read_profile?name=MyProfile'Response
application/json
{ "data": { "profile_details": { … }, "profile_name": "MyProfile" }, "metadata": { "command": "remote_mysql_read_profile", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/remote_mysql_read_profiles
- A server running WHM.
https://whm-server.tld:2087/json-api/remote_mysql_read_profiles
- 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_read_profilesHTTP Request was successful.
Example: {"MyProfile":{"active":0,"is_localhost_profile":1,"mysql_host":"192.168.0.1","mysql_pass":"123456luggage","mysql_port":3306,"mysql_user":"username","mysql_version_is_supported":0,"setup_via":"Main terminal"},"MyProfile2":{"active":0,"is_localhost_profile":"1","mysql_host":"192.168.0.2","mysql_pass":"123456luggage","mysql_port":3306,"mysql_user":"username","mysql_version_is_supported":"0","setup_via":"Main terminal"},"localhost":{"active":1,"is_localhost_profile":1,"mysql_host":"localhost","mysql_pass":"#1mpll-C","mysql_port":3306,"mysql_user":"root","mysql_version_is_supported":0,"setup_via":"Auto-Migrated active profile"}}
Response
application/json
{ "data": { "MyProfile": { … }, "MyProfile2": { … }, "localhost": { … } }, "metadata": { "command": "remote_mysql_read_profiles", "reason": "OK", "result": 1, "version": 1 } }
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/remote_mysql_update_profile
- A server running WHM.
https://whm-server.tld:2087/json-api/remote_mysql_update_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_update_profile?name=MyProfile&mysql_host=192.168.0.1&mysql_pass=12345luggage&mysql_port=3306&mysql_user=username&setup_via=Main+terminal'Response
application/json
{ "data": { "profile_details": { … }, "profile_saved": "MyProfile" }, "metadata": { "command": "remote_mysql_update_profile", "reason": "OK", "result": 1, "version": 1 } }