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 creates a PostgreSQL® 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/create_user
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Postgresql/create_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/Postgresql/create_user?name=dbuser&password=123456luggage'{ "apiversion": 3, "func": "create_user", "module": "Postgresql", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function deletes a PostgreSQL® 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/delete_user
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Postgresql/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/Postgresql/delete_user?name=example'{ "apiversion": 3, "func": "delete_user", "module": "Postgresql", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function grants all privileges for a PostgreSQL® database to 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/grant_all_privileges
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Postgresql/grant_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/grant_all_privileges?database=example_database&user=example_dbuser'{ "apiversion": 3, "func": "grant_all_privileges", "module": "Postgresql", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }