WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
This function retrieves the server's version of MySQL® or MariaDB®.
Important:
When you disable the MySQL/MariaDB role and remote MySQL is not already configured, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/current_mysql_version
- A server running WHM.
https://whm-server.tld:2087/json-api/current_mysql_version
- 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/current_mysql_version{ "data": { "server": "mysql", "version": "8.0" }, "metadata": { "command": "current_mysql_version", "reason": "OK", "result": 1, "version": 1 } }
Request
This function lists all available versions of MySQL® and MariaDB.
Important:
When you disable the MySQL/MariaDB role and remote MySQL is not already configured, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/installable_mysql_versions
- A server running WHM.
https://whm-server.tld:2087/json-api/installable_mysql_versions
- 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/installable_mysql_versions{ "data": { "versions": [ … ] }, "metadata": { "command": "installable_mysql_versions", "reason": "OK", "result": 1, "version": 1 } }
Request
This function retrieves the latest available version of MySQL® or MariaDB®.
Important:
When you disable the MySQL/MariaDB role and remote MySQL is not already configured, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/latest_available_mysql_version
- A server running WHM.
https://whm-server.tld:2087/json-api/latest_available_mysql_version
- 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/latest_available_mysql_version{ "data": { "server": "mariadb", "version": "10.0" }, "metadata": { "command": "latest_available_mysql_version", "reason": "OK", "result": 1, "version": 1 } }