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
Request
- Base URLhttps://app.polytomic.com
- Auth
- HTTP bearer
- or HTTP basic
Path parameters
connection_idstring uuid required
Unique identifier of the connection
Example:248df4b7-aa70-47b8-a036-33ac447e668d
schema_idstring required
Identifier of the schema whose primary keys are being overridden
Example:public.users
Headers
X-Polytomic-Versionstring
Request body
Example request
{
"fields": [
{
"field_id": "id",
"is_primary_key": true
}
]
}Response
Accepted
Changes
No recorded changes to this operation across all 51 revisions of this API.