Update PostgreSQL user password

This function changes a PostgreSQL® database user's password.

Important:

When you disable the PostgreSQL role, the system disables this function.

SecurityBasicAuth
Request
query Parameters
password
required
string

The database user's new password.

Example: password=12345luggage
user
required
string

The account's username.

Example: user=username
cpuser
string

The database user's owner.

Example: cpuser=example
Responses
200

HTTP Request was successful.

Response Schema: application/json
object
get/set_postgresql_password
Request samples
whmapi1 --output=jsonpretty \
  set_postgresql_password \
  user='username' \
  password='12345luggage'
Response samples
application/json
{
  • "metadata": {
    • "command": "set_postgresql_password",
    • "reason": "OK",
    • "result": 1,
    • "version": 1
    }
}