WHM API.
Download OpenAPI description
Overview
URL
WebPros International, LLC
License
Languages
Servers
Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
A server running WHM.
https://{host}:{port}/json-api/
Request
This function changes a PostgreSQL® database user's name.
Important:
When you disable the PostgreSQL role, the system disables this function.
Security
BasicAuth
- 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
- 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/whm.openapi/rename_postgresql_user?newname=username2&oldname=username&password=12345luggage&cpuser=example'Response
application/json
{ "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.
Security
BasicAuth
- 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
- 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/whm.openapi/set_postgresql_password?password=12345luggage&user=username&cpuser=example'Response
application/json
{ "metadata": { "command": "set_postgresql_password", "reason": "OK", "result": 1, "version": 1 } }