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`](../../../../../../api-reference/schemas/reset-primary-keys).

Authentication

AuthorizationBasic

This is the Polytomic deployment key (on-premises only)

OR
AuthorizationBearer
This is the Polytomic API key

Path parameters

connection_idstringRequiredformat: "uuid"
Unique identifier of the connection.
schema_idstringRequired
Identifier of the schema whose primary keys are being overridden.

Headers

X-Polytomic-VersionstringRequired

Request

This endpoint expects an object.
fieldslist of objects or nullOptional

Ordered list of source fields that together form the primary key. Replaces any existing override; supply an empty list to clear.

Response headers

locationstring

Response

Accepted

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
500
Internal Server Error