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 PostgreSQL® database.
Important:
When you disable the Postgres role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Postgresql/delete_database
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Postgresql/delete_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/Postgresql/delete_database?name=database'{ "apiversion": 3, "func": "delete_database", "module": "Postgresql", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function retrieves the PostgreSQL® user and database name length restrictions.
Important:
When you disable the PostgreSQL role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Postgresql/get_restrictions
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Postgresql/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/Postgresql/get_restrictions{ "apiversion": 3, "func": "get_restrictions", "module": "Postgresql", "result": { "data": { … }, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }
Request
This function lists an account's PostgreSQL® databases.
Important:
When you disable the Postgres role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Postgresql/list_databases
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Postgresql/list_databases
- 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/list_databases{ "apiversion": 3, "func": "list_databases", "module": "Postgresql", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }