UAPI accesses the cPanel interface's features. Use this API to access and modify cPanel account data and settings.
Download OpenAPI description
Overview
URL
WebPros International, LLC
License
Languages
Servers
Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/
A server running cPanel.
https://{host}:{port}/execute/
Request
This function lists an account's PostgreSQL® databases.
Important:
When you disable the Postgres role, the system disables this function.
Security
BasicAuth
- 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_databasesResponse
application/json
{ "apiversion": 3, "func": "list_databases", "module": "Postgresql", "result": { "data": [ … ], "errors": null, "messages": null, "metadata": { … }, "status": 1, "warnings": null } }
Request
This function renames a PostgreSQL® database.
Important:
When you disable the PostgreSQL role, the system disables this function.
Security
BasicAuth
- Mock server
https://api.docs.cpanel.net/_mock/specifications/cpanel.openapi/Postgresql/rename_database
- A server running cPanel.
https://cpanel-server.tld:2083/execute/Postgresql/rename_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/rename_database?newname=database2&oldname=database'Response
application/json
{ "apiversion": 3, "func": "rename_database", "module": "Postgresql", "result": { "data": null, "errors": null, "messages": null, "metadata": {}, "status": 1, "warnings": null } }