---
title: "Set Replica Identity Decisions Endpoint"
method: PUT
path: "/v1/connectors/{connector_id}/replica-identity-decisions"
tags: ["v1-connectors"]
---

# Set Replica Identity Decisions Endpoint

`PUT /v1/connectors/{connector_id}/replica-identity-decisions`

Record the customer's per-table decisions for ARD-999 preflight.

Every entry in ``request_body.decisions`` must:
  - have a key that matches a discovered no-replication-identity
    table for this connector (``"<database>.<schema>.<table>"`` FQN), and
  - have a value of ``"exclude"``, ``"add_pk"``, or
    ``"replica_identity_full"``.

Validation fails loud (400) on any mismatch — silent acceptance of
keys that don't match would let a typo persist as a dead entry that
looks correct in the connector record but has no effect at engine
setup time. Tables that exist in the discovered no-replication-
identity list but are absent from ``decisions`` revert to the
default ``"exclude"`` (the pre-ARD-999 behavior). This endpoint is
a full replace: submit the complete decision set for every table
that should keep a non-default decision, because omitted FQNs revert
to ``"exclude"`` even if a prior PUT recorded a different decision.

Response carries the updated connector with the refreshed
``replica_identity_preflight`` block (same shape as GET) so the CLI
and the web wizard can render the post-write state without a follow-
up round-trip.

## Path parameters

- `connector_id` string, required

## Request body

- ReplicaIdentityDecisionsRequest — Body for PUT /v1/connectors/{id}/replica-identity-decisions (ARD-999). ``decisions`` is the FULL set of per-table decisions for the connector's currently-discovered no-replication-identity tables. The endpoint replaces (not merges) the persisted dict — customers submit a complete view of their choices, and re-discovery deliberately invalidates stale decisions so the customer re-confirms after a schema change. Pydantic-side validation only verifies the dict shape (str -> str); semantic validation (key matches a discovered table, value is one of the allowed decisions) runs inside the route handler via the policy module so error messages can reference the discovered list.
  - `decisions` object, required — Per-table decision: `exclude`, `add_pk`, or `replica_identity_full`.

## Response `200`

The refreshed connector row, including `replica_identity_preflight`.

- ConnectorRow — Loose core of a connector response. The connector row is the most dynamic shape in the system; extra="allow" is the contract — responses carry many more columns and clients must tolerate fields not listed here. can_update/can_delete are added by the permission projection on create/get/update/list responses.
  - `id` string, required — Connector ID.
  - `org_id` string, required — Organization the connector belongs to.
  - `project_id` string, nullable — Project the connector belongs to.
  - `name` string, required — Connector name.
  - `service_name` string, required — Service type. `postgresql` today.
  - `status` string, nullable — Current connector status.
  - `created_at` string, nullable — When the connector was created.
  - `can_update` boolean, nullable — Whether the caller may update this connector.
  - `can_delete` boolean, nullable — Whether the caller may delete this connector.

## Other responses

- `400` — A decision is invalid, covers an unknown table, or the map is incomplete.
- `403` — No update permission on this connector.
- `404` — Connector not found (or not visible to the caller).
- `409` — The decisions could not be applied — state changed underneath; retry.
- `422` — Validation Error

---

[API](https://skmtc.net/tryardent/apis/fastapi.md) · [All operations](https://skmtc.net/tryardent/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tryardent/fastapi/revisions/f92d8d54bae2/schema)
