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"
}'
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",
"hostname": "new-db.example.com",
"replication_slots": [
{
"id": "rs_01HRMW3ZNE5EFGW9SDXW01TT93",
"publication_name": "new_sequin_pub",
"slot_name": "new_sequin_slot"
}
]
}'
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",
"hostname": "new-db.example.com"
}'
curl --request PUT \
--url https://api.sequinstream.com/api/postgres_databases/replica-db \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"name": "replica-db-renamed",
"hostname": "new-replica.example.com",
"primary": {
"hostname": "new-primary.example.com"
}
}'
{
"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"
}
]
}
Postgres databases
Update database
Update an existing Postgres database connection and optionally its replication slot.
PUT
/
api
/
postgres_databases
/
{id_or_name}
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"
}'
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",
"hostname": "new-db.example.com",
"replication_slots": [
{
"id": "rs_01HRMW3ZNE5EFGW9SDXW01TT93",
"publication_name": "new_sequin_pub",
"slot_name": "new_sequin_slot"
}
]
}'
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",
"hostname": "new-db.example.com"
}'
curl --request PUT \
--url https://api.sequinstream.com/api/postgres_databases/replica-db \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"name": "replica-db-renamed",
"hostname": "new-replica.example.com",
"primary": {
"hostname": "new-primary.example.com"
}
}'
{
"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"
}
]
}
Path parameters
string
required
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.string
A name for this database connection. You can use this name to identify the database across the API.
string
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.string
The database server hostname.
string
The name of the logical database in Postgres.
string
The database username.
string
The database password.
integer
The database server port.
boolean
Whether to use SSL for the connection.
boolean
Whether to use IPv6 for the connection.
object
Connection details for the primary database, only needed when connecting to a replica.
Show primary properties
Show primary properties
string
required
The primary database server hostname.
string
required
The name of the logical database in the primary Postgres instance.
string
required
The primary database username.
string
required
The primary database password.
integer
The primary database server port. Defaults to
5432.boolean
Whether to use SSL for the primary connection. Defaults to
true.object
Optional metadata as key-value pairs.
array
Response
Show properties
Show properties
string (uuid)
The ID of the database connection.
string
The user-defined name for the database connection.
string
The hostname of the database server.
integer
The port number for the database connection.
string
The name of the logical Postgres database to connect to.
string
The username for authenticating with the database.
string
The password for authenticating with the database. This will be obfuscated unless
show_sensitive=true is used.boolean
Indicates whether SSL is enabled for the connection.
boolean
Indicates whether the hostname resolves to an IPv6 address.
boolean
Indicates whether this database connection uses the Sequin local tunnel.
integer
Database connection pool size (internal setting).
integer
Database connection pool queue interval (internal setting).
integer
Database connection pool queue target (internal setting).
array
Details about the associated replication slot. Will be an empty array if no slot exists.
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"
}'
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",
"hostname": "new-db.example.com",
"replication_slots": [
{
"id": "rs_01HRMW3ZNE5EFGW9SDXW01TT93",
"publication_name": "new_sequin_pub",
"slot_name": "new_sequin_slot"
}
]
}'
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",
"hostname": "new-db.example.com"
}'
curl --request PUT \
--url https://api.sequinstream.com/api/postgres_databases/replica-db \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"name": "replica-db-renamed",
"hostname": "new-replica.example.com",
"primary": {
"hostname": "new-primary.example.com"
}
}'
{
"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"
}
]
}
⌘I

