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 renames a PostgreSQL® database user.
Warning:
- If you rename a PostgreSQL user, you must set the password for the database user. This is required because of the md5 hash that PostgreSQL creates to store user passwords.
- We strongly recommend that you use the
Postgresql::rename_user functioninstead of this one.
Important:
When you disable the PostgreSQL role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Postgresql/rename_user_no_password
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Postgresql/rename_user_no_password
- 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/Postgresql/rename_user_no_password?newname=dbuser2&oldname=dbuser'{ "apiversion": 3, "func": "rename_user_no_password", "module": "Postgresql", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function revokes all privileges for a PostgreSQL® database from a database user.
Important:
When you disable the PostgreSQL role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Postgresql/revoke_all_privileges
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Postgresql/revoke_all_privileges
- 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/Postgresql/revoke_all_privileges?database=example_database&user=example_dbuser'{ "apiversion": 3, "func": "revoke_all_privileges", "module": "Postgresql", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function changes a PostgreSQL® database user's password.
Important:
When you disable the Postgres role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Postgresql/set_password
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Postgresql/set_password
- 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/Postgresql/set_password?password=12345luggage&user=dbuser'{ "apiversion": 3, "func": "set_password", "module": "Postgresql", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }