Fly.io
Postgres Clusters

Rotate User Password

View as Markdown

Rotate a specific Postgres user's password within a cluster, optionally terminating the user's existing sessions.

POST
/v1/postgres/{postgres_cluster_id}/users/{username}/rotate_password

Rotate a specific Postgres user's password within a cluster, optionally terminating the user's existing sessions.

Authorization

bearerAuth
AuthorizationBearer <token>

A Fly.io access token. Create one with fly tokens create.

In: header

Path Parameters

postgres_cluster_id*string

Managed Postgres Cluster ID

username*string

Postgres User Name

Request Body

application/json

Password rotation details

kill_sessions?boolean

Terminate the user's existing sessions after rotating.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/postgres/string/users/string/rotate_password" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "password": "string",    "username": "string"  }}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}