Get a PostgreSQL user's credentials

Get a user's password, its connection URIs and the ca_certificate to verify the server with.

GET https://{availability_zone}.betterstackcloud.com/v1/postgres/{postgres_id}/users/{id}/credentials
postgres_id string required

The ID of the PostgreSQL instance.

id string required

The ID of the PostgreSQL user.

Authorization string required

Bearer $TOKEN

200 OK
{
  "user": "jane@example.com",
  "password": "example",
  "database": "example",
  "uri": "example",
  "pooled_uri": "example",
  "public_uri": "example",
  "public_pooled_uri": "example",
  "ca_certificate": "example"
}

Returns the user's connection details.

user string

The user name.

password string

The user's password.

database string

The database the URIs connect to, defaultdb when the instance has it, or else the first database by name.

uri string

The URI to connect to PostgreSQL directly from your networks, with the password and sslmode=verify-full.

pooled_uri string

The URI to connect through the PgBouncer connection pool from your networks, with the password and sslmode=verify-full.

public_uri string or null

The URI to connect to PostgreSQL directly from the internet, with the password and sslmode=verify-full, or null when public_access is off.

public_pooled_uri string or null

The URI to connect through the PgBouncer connection pool from the internet, with the password and sslmode=verify-full, or null when public_access is off.

ca_certificate string

The CA certificate that signed the server's certificate, in PEM format.