Update rule
Update a rule using JSON Merge Patch (RFC 7396).
The following rules apply to both the rule fields and its sub-entities (input groups, inputs, conditions, group-by inputs, parameters, and variables with their transformations):
- To change a field or a sub-entity, send only the new values. For a sub-entity, send them under the sub-entity's ID.
- To clear a field or delete a sub-entity, set it to null. The name field is the exception: it cannot be null, only replaced with another non-empty value.
- To add a sub-entity, use a new_<id> key.
- To keep anything unchanged, do not mention it in the request.
A single request can combine all of these anywhere in the rule, for example, update the description, rename one input, and delete another. New sub-entities appear in the response under their new IDs, with your temporary key returned in the correlationId field.
If you build the update from a retrieved rule, you can send the edited body back without removing the read-only fields, such as urn and draftType. The API checks only the urn of each sub-entity: it must match the ID under which the sub-entity is stored, as it does before you edit the body. A mismatch is rejected with 400 Bad Request. This happens, for example, when you move a sub-entity under a different key and leave the sub-entity's urn unchanged.
Updates are applied to the current draft. Patching a published rule opens a new draft (draftType: CHANGE) on top of the latest published version.
Request
- Base URLhttps://your-environment.ataccama.one/api
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
A URN identifying the data quality rule resource in the Data Quality API.
Format: urn:ata:{tenant}:data-quality:rule:{uuid}
Example: urn:ata:acme-corp:data-quality:rule:123e4567-e89b-12d3-a456-426614174000.
Rule URN.
Request body
Example request
{
"defaultDqThreshold": {
"severity": "WARNING",
"urn": "urn:ata:acme-corp:data-quality:dq-threshold:123e4567-e89b-12d3-a456-426614174000"
},
"stewardship": {
"groupUrn": "urn:ata:acme-corp:iam:group:123e4567-e89b-12d3-a456-426614174000"
},
"implementation": {
"ruleType": "SINGLE_TABLE",
"dqDimensionUrn": "urn:ata:acme-corp:data-quality:dq-dimension:123e4567-e89b-12d3-a456-426614174000",
"fallback": {
"resultUrn": "urn:ata:acme-corp:data-quality:dq-dimension-result:123e4567-e89b-12d3-a456-426614174000"
}
}
}Response
The updated DQ rule draft (draftType=CHANGE) version.
In the example, one input attribute was merged (only its description changed), one was deleted and is therefore absent, and one was created under a server-assigned id with its temporary new_<id> key returned as correlationId.
Example response
{
"draftType": "NEW",
"defaultDqThreshold": {
"severity": "WARNING",
"urn": "urn:ata:acme-corp:data-quality:dq-threshold:123e4567-e89b-12d3-a456-426614174000",
"correlationId": "new_email"
},
"stewardship": {
"groupUrn": "urn:ata:acme-corp:iam:group:123e4567-e89b-12d3-a456-426614174000"
},
"implementation": {
"ruleType": "SINGLE_TABLE",
"dqDimensionUrn": "urn:ata:acme-corp:data-quality:dq-dimension:123e4567-e89b-12d3-a456-426614174000",
"fallback": {
"resultUrn": "urn:ata:acme-corp:data-quality:dq-dimension-result:123e4567-e89b-12d3-a456-426614174000"
}
},
"urn": "urn:ata:acme-corp:data-quality:rule:123e4567-e89b-12d3-a456-426614174000"
}Changes
No recorded changes to this operation across all 1 revision of this API.