v1

latestOpenAPI 3.0.32026-08-06138294578.6 KB
Schemas

Set Primary Keys

Overrides the primary key detected on a schema.

This is a full replacement: the keys you supply become the complete override set, replacing any previously configured overrides. Omitting a key that was previously set removes it.

Primary key overrides are useful when the source does not expose a primary key or when the source-detected key is not the correct deduplication identifier for your use case.

📘 To revert to the source-detected primary keys and remove all overrides, use DELETE /api/connections/{connection_id}/schemas/{schema_id}/primary_keys.

put/api/connections/{connection_id}/schemas/{schema_id}/primary_keys

Path parameters

connection_idstring uuid required

Unique identifier of the connection.

Example:248df4b7-aa70-47b8-a036-33ac447e668d

Unique identifier of the connection.

schema_idstring required

Identifier of the schema whose primary keys are being overridden.

Example:public.users

Identifier of the schema whose primary keys are being overridden.

Headers

X-Polytomic-Versionstring

Request body

Example request

{
  "fields": [
    {
      "field_id": "id",
      "is_primary_key": true
    }
  ]
}

Response

Accepted