WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
This function changes a PostgreSQL® database's name.
Warning:
The system requires more time to rename larger and more complex databases.
Important:
When you disable the PostgreSQL role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/rename_postgresql_database
- A server running WHM.
https://whm-server.tld:2087/json-api/rename_postgresql_database
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
rename_postgresql_database \
oldname='database' \
newname='database2'{ "metadata": { "command": "rename_postgresql_database", "reason": "OK", "result": 1, "version": 1 } }
Request
This function changes a PostgreSQL® database user's name.
Important:
When you disable the PostgreSQL role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/rename_postgresql_user
- A server running WHM.
https://whm-server.tld:2087/json-api/rename_postgresql_user
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
rename_postgresql_user \
oldname='username' \
newname='username2' \
password='12345luggage'{ "metadata": { "command": "rename_postgresql_user", "reason": "OK", "result": 1, "version": 1 } }
Request
This function changes a PostgreSQL® database user's password.
Important:
When you disable the PostgreSQL role, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/set_postgresql_password
- A server running WHM.
https://whm-server.tld:2087/json-api/set_postgresql_password
- CLI
- URL
- curl
- JavaScript
- Node.js
- Python
- Java
- Java8+Apache
- C#
- C#+Newtonsoft
- PHP
- Go
- Ruby
- R
whmapi1 --output=jsonpretty \
set_postgresql_password \
user='username' \
password='12345luggage'{ "metadata": { "command": "set_postgresql_password", "reason": "OK", "result": 1, "version": 1 } }