PATCH
/
v1
/
targets
/
postgres
/
{id}
curl --request PATCH \
  --url https://api.sequin.io/v1/targets/db/8ff58ef0-d376-4ae8-b2e2-9f0206aa65b8 \
  --header 'Authorization: Bearer YOUR_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "arakkis_prod",
    "connection": {
      "host": "db.example.com",
      "port": 5432,
      "database": "sequin",
      "username": "sequin",
      "password": "8ff58ef0-d376-4ae8-b2e2-9f0206aa65b8"
    },
    "ssh_tunnel_id": "8ff58ef0-d376-4ae8-b2e2-9f0206aa65b8",
    "metadata": { "custom_property": 42 }
  }'
{
  "id": "8ff58ef0-d376-4ae8-b2e2-9f0206aa65b8",
  "name": "arakkis_prod",
  "health": {
    "status": "ok",
    "notes": [],
    "time": "2023-12-15 01:29:29"
  },
  "kind": "postgres",
  "connection": {
    "host": "db.example.com",
    "port": 5432,
    "database": "sequin",
    "username": "sequin",
    "password": "8ff5...65b8"
  },
  "ssh_tunnel_id": "8ff58ef0-d376-4ae8-b2e2-9f0206aa65b8",
  "metadata": { "custom_property": 42 },
  "created_at": "2023-12-15 01:29:29",
  "updated_at": "2023-12-15 01:29:29"
}

Request parameters

name
string

Name of the target.

connection
object
required

Connection details for the Postgres database.

ssh_tunnel_id
string

ID of the SSH tunnel to use for the target. See more on SSH tunnels.

metadata
object

Metadata for the target. This is a free-form object that you can use to store any additional information you want to associate with the target.

Response fields

id
string

ID of the target.

name
string

Name of the target.

health
object

Health status of the target. Learn more about the health object.

connection
object

Connection details for the Postgres database.

ssh_tunnel_id
string

ID of the SSH tunnel to use for the target. See more on SSH tunnels.

metadata
object

Metadata for the target. This is a free-form object that you can use to store any additional information you want to associate with the target.

created_at
string

Timestamp of when the target was created, in ISO 8601 format.

updated_at
string

Timestamp of when the target was last updated, in ISO 8601 format.