Update PostgreSQL user password

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

Important:

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

SecurityBasicAuth
Request
query Parameters
password
required
string

The user's new password.

Example: password=12345luggage
user
required
string

The database user's name.

Note:

If database prefixing is enabled, this parameter must include the database prefix for the account.

Example: user=dbuser
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/Postgresql/set_password
Request samples
uapi --output=jsonpretty \
  --user=username \
  Postgresql \
  set_password \
  user='dbuser' \
  password='12345luggage'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "set_password",
  • "module": "Postgresql",
  • "result": {
    • "data": null,
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}