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 deletes a MySQL® user.
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/delete_user
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Mysql/delete_user
- 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/cpanel.openapi/Mysql/delete_user?name=example'{ "apiversion": 3, "func": "delete_user", "module": "Mysql", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function lists a MySQL® database user's privileges.
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/get_privileges_on_database
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Mysql/get_privileges_on_database
- 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/cpanel.openapi/Mysql/get_privileges_on_database?database=mydb&user=dbuser'{ "apiversion": 3, "func": "get_privileges_on_database", "module": "Mysql", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
Request
This function lists a MySQL® database's name, username length restrictions, and database prefix.
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/get_restrictions
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Mysql/get_restrictions
- 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/cpanel.openapi/Mysql/get_restrictions{ "apiversion": 3, "func": "get_restrictions", "module": "Mysql", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }