UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/
https://{host}:{port}/execute/
Request
This function checks for errors in all of the tables in a MySQL® database.
Important:
When you disable the MySQL role and remote MySQL is not already configured, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Mysql/check_database
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Mysql/check_database
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Mysql \
check_database \
name='example_test'{ "apiversion": 3, "func": "check_database", "module": "Mysql", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
Request
This function creates a MySQL® database.
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/cpanel.openapi/Mysql/create_database
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Mysql/create_database
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Mysql \
create_database \
name='newdb'{ "apiversion": 3, "func": "create_database", "module": "Mysql", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function deletes a MySQL® database.
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/cpanel.openapi/Mysql/delete_database
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Mysql/delete_database
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Mysql \
delete_database \
name='example'{ "apiversion": 3, "func": "delete_database", "module": "Mysql", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }