Is Replica Of Check API
Deprecated: use Data Diff instead
The Is Replica Of rule is no longer maintained. Data Diff replaces it with the same row-by-row comparison plus change-type filtering. This page is kept as a reference for checks that already exist; new checks should use Data Diff.
This page documents how to create and manage an Is Replica Of check via the REST API. The check uses the standard Quality Checks endpoints with rule set to isReplicaOf. It is documented for existing integrations; new integrations should target dataDiff. All endpoints share the base URL of your deployment (for example, https://your-instance.qualytics.io/api) and require a Bearer token.
Tip
For complete API documentation, including request and response schemas, visit the API docs.
Permissions
All endpoints require the Member role plus a team permission on the check's datastore: Reporter to read, Author to create or update an Active check, archive, or delete, and Drafter to create or update a Draft. See Permissions for the full matrix.
The properties object
Is Replica Of carries its rule-specific configuration under properties:
| Field | Required | Type | Description |
|---|---|---|---|
ref_datastore_id |
No | int |
Datastore holding the reference container. Omit when it lives in the same datastore as the target. |
ref_container_id |
Yes | int |
The reference container compared against the target. |
ref_filter |
No | string |
SQL WHERE expression applied to the reference container before the comparison. |
id_field_names |
No | array |
Field names that pair target rows with reference rows. Strongly recommended. |
passthrough_field_names |
No | array |
Extra field names carried into the comparison output for context, never compared. |
numeric_comparator |
No | object |
Tolerance applied when comparing numeric fields. |
duration_comparator |
No | object |
Tolerance applied when comparing date and timestamp fields. |
string_comparator |
No | object |
Normalization applied when comparing string fields. |
Create
Endpoint: POST /api/quality-checks
Permission: Member role + Author team permission on the container's datastore (Drafter when status is "Draft").
Create an Is Replica Of check (every accepted field)
curl -X POST "https://your-instance.qualytics.io/api/quality-checks" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"description": "Ensure NATION matches its replica.",
"rule": "isReplicaOf",
"fields": ["N_NATIONKEY", "N_NATIONNAME"],
"container_id": 145,
"filter": null,
"properties": {"ref_datastore_id": 22, "ref_container_id": 803, "id_field_names": ["N_NATIONKEY"]},
"tags": ["replication", "legacy"],
"additional_metadata": {"jira": "DATA-9601"},
"template_id": null,
"status": "Active",
"owner_id": 7,
"default_anomaly_assignee_id": 12
}'
Field notes
| Field | Required | Notes |
|---|---|---|
description |
Yes | Free-text description shown in the UI. |
rule |
Yes | Must be "isReplicaOf". |
fields |
Yes | Array of field names compared between target and reference. Every field must exist on both containers. |
container_id |
Yes | ID of the container (table or file) the check runs against. |
filter |
No | SQL WHERE expression. Applied before the evaluation, so only filtered rows are evaluated. Send null for no filter. |
properties |
Yes | Object holding the reference target and matching behavior. See above. |
tags |
No | List of tag names applied to the check for filtering and organization. |
additional_metadata |
No | Free-form key-value pairs (typically links to catalog entries, tickets, governance records). |
template_id |
No | ID of a Check Template to associate the check with. null if not using a template. |
status |
No | "Active" (default) or "Draft". Draft checks are not evaluated by Scans. |
owner_id |
No | ID of the user who owns the check. Defaults to the user creating the check when omitted. |
default_anomaly_assignee_id |
No | ID of the user automatically assigned to anomalies produced by the check. |
Two payload fields exist for other rule types but do not apply here:
coveragedoes not apply. Any difference the Comparators do not tolerate is reported; there is no per-row violation rate. Sendnullor1; any other value is rejected with422.anomaly_message_fieldis ignored. Is Replica Of emits a Shape Anomaly only, and Shape Anomalies always use the fixed message.
Read
Endpoint: GET /api/quality-checks/{id}
Permission: Member role + Reporter team permission on the check's datastore.
Retrieve a check by ID
Update
Endpoint: PUT /api/quality-checks/{id}
Permission: Member role + Author team permission on the check's datastore (Drafter when the check stays Draft).
The PUT endpoint requires description; include the check's current description (or a new one) along with the fields you want to change. Send the whole properties object: partial property updates are not merged.
Add Row Identifiers to an existing check
curl -X PUT "https://your-instance.qualytics.io/api/quality-checks/101" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"description": "Ensure NATION matches its replica.",
"properties": {
"ref_datastore_id": 22,
"ref_container_id": 803,
"id_field_names": ["N_NATIONKEY"]
}
}'
A PUT can update most fields on an existing Is Replica Of check. Three values stay immutable: the rule type, the container the check is attached to, and the associated Check Template. If any of these needs to change, delete the check and create a new one.
Editable vs Immutable on PUT
Editable
descriptionfilterfields(the compared fields)- every key under
properties tagsadditional_metadatastatusowner_iddefault_anomaly_assignee_id
Immutable
rulecontainer_idtemplate_id
Delete
Endpoint: DELETE /api/quality-checks/{id}
Permission: Member role + Author team permission on the check's datastore.
Three query parameters control what happens, mirroring the two-stage flow in the UI:
| Parameter | Default | Description |
|---|---|---|
archive |
true |
When true, the check is archived and can be restored later. When false, the check is permanently deleted. |
status |
Discarded |
The archive resolution: Discarded (no longer relevant) or Invalid (wrong and suppressed from future AI generation). Only used when archive=true. |
delete_anomalies |
true |
Whether to permanently delete the anomalies the check produced. A permanent delete (archive=false) always removes them. |
Archive a check, keeping its anomalies
Delete a check permanently
Error responses
| Status | Description |
|---|---|
400 Bad Request |
A business-logic conflict prevents the operation (for example, changing properties while the check is archived, or switching an archived check between Discarded and Invalid). |
401 Unauthorized |
Missing or invalid API token. |
403 Forbidden |
The caller lacks the required team permission on the check's datastore. |
404 Not Found |
The check ID does not exist, or properties.ref_container_id (or properties.ref_datastore_id) references an asset that does not exist. |
422 Unprocessable Entity |
The payload fails schema validation (for example, description missing on PUT, properties.ref_container_id missing, fields empty, or a coverage other than 1). |