Change the Login Password

To change the login password for a user in your PostgreSQL cluster, send a PATCH request to the user endpoint.

Note: The sample UUID in all following request examples is 498ae72f-411f-11eb-9d07-046c59cc737e.

Endpoint

Use the following endpoint to change the login password for a specific user in your PostgreSQL cluster:

https://api.ionos.com/databases/postgresql/clusters/{clusterId}/users/{username}

Request

curl --request PATCH \
    --user "[email protected]:Mb2.r5oHf-0t" \
    --header "Content-Type: application/json" \
    --data-binary '{
        "properties":{
            "password": "newMin10CharPw"
        }
    }' \
    https://api.ionos.com/databases/postgresql/clusters/498ae72f-411f-11eb-9d07-046c59cc737e/users/someuser

Response

The updated user is returned. The password is never returned, though.

Last updated

Was this helpful?