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 authorizes a remote MySQL® host to access the account's databases.
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/add_host
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Mysql/add_host
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Mysql \
add_host \
host='192.168.1.6'{ "apiversion": 3, "func": "add_host", "module": "Mysql", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function adds a note about a remote MySQL® server.
Important:
- If you attempt to add a note to an unauthorized remote MySQL server, the function will fail.
- When you disable the MySQL role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Mysql/add_host_note
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Mysql/add_host_note
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Mysql \
add_host_note \
host='192.168.1.6' \
note='A remote mysql server for storing my data'{ "apiversion": 3, "func": "add_host_note", "module": "Mysql", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function removes a remote MySQL® host's access to the account's databases.
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_host
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Mysql/delete_host
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
uapi --output=jsonpretty \
--user=username \
Mysql \
delete_host \
host='remote.example.com'{ "apiversion": 3, "func": "delete_host", "module": "Mysql", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }