Path parameters
The database ID or name to update
Request body
For updates, the replication_slots
array is optional. If provided, it must contain a single replication slot object. If you include a replication slot, it must have an id
field to identify which slot to update.
A name for this database connection. You can use this name to identify the database across the API.
The full connection URL for the database, e.g. postgresql://postgres:secret-password@db.example.com:5432/postgres
. Pass in either this parameter or database
, hostname
, port
, username
, password
. To specify SSL, use the separate ssl
field.
The database server hostname.
The name of the logical database in Postgres.
The database server port.
Whether to use SSL for the connection.
Whether to use IPv6 for the connection.
Connection details for the primary database, only needed when connecting to a replica. The primary database server hostname.
The name of the logical database in the primary Postgres instance.
The primary database username.
The primary database password.
The primary database server port. Defaults to 5432
.
Whether to use SSL for the primary connection. Defaults to true
.
Optional metadata as key-value pairs.
The ID of the replication slot to update.
The name of the publication to use for this replication slot.
The name of the replication slot.
The replication slot status. Possible values: “active”, “disabled”.
Response
The ID of the database connection.
The user-defined name for the database connection.
The hostname of the database server.
The port number for the database connection.
The name of the logical Postgres database to connect to.
The username for authenticating with the database.
The password for authenticating with the database. This will be obfuscated unless show_sensitive=true
is used.
Indicates whether SSL is enabled for the connection.
Indicates whether the hostname resolves to an IPv6 address.
Database connection pool size (internal setting).
Database connection pool queue interval (internal setting).
Database connection pool queue target (internal setting).
Details about the associated replication slot. Will be an empty array if no slot exists. The ID of the replication slot.
The name of the Postgres publication used for replication.
The name of the Postgres replication slot.
status
string (enum: active | disabled)
The current status of the replication slot.
Using URL
Updating database and replication slot
Using connection params
Updating replica connection
curl --request PUT \
--url https://api.sequinstream.com/api/postgres_databases/example-db \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"name": "example-db-renamed",
"url": "postgresql://postgres:secret-password@new-db.example.com:5432/postgres"
}'
{
"id" : "db_01HRMW3ZNE5EFGW9SDXW01TT92" ,
"name" : "example-db-renamed" ,
"hostname" : "new-db.example.com" ,
"database" : "postgres" ,
"username" : "postgres" ,
"password" : "************" ,
"port" : 5432 ,
"ssl" : true ,
"use_local_tunnel" : false ,
"ipv6" : false ,
"replication_slots" : [
{
"id" : "rs_01HRMW3ZNE5EFGW9SDXW01TT93" ,
"publication_name" : "new_sequin_pub" ,
"slot_name" : "new_sequin_slot" ,
"status" : "active"
}
]
}