> For the complete documentation index, see [llms.txt](https://developer.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.collibra.com/api/references/data-quality/rule-templates.md).

# Rule Templates

Manage reusable rule templates and their deployments to monitors. Paths are keyed on the rule template name (ruleTemplateName) for consistency with jobName and ruleName. A template name is mutable, so renaming a template changes its URL - requests using the old name return 404 (no alias is kept).

## List rule templates

> Returns rule templates the user can view, sorted and paginated.\
> \
> \*\*Permissions\*\*\
> \- \*\*Required:\*\* \`DATA\_QUALITY\` and \`DATA\_QUALITY\_DEPLOY\_TEMPLATES\`\
> \- Or: \`DATA\_QUALITY\` and \`GLOBAL\_MANAGE\_ALL\_RESOURCES\`

```json
{"openapi":"3.0.3","info":{"title":"Data Quality Collibra API","version":"1.3.0"},"tags":[{"name":"Rule Templates","description":"Manage reusable rule templates and their deployments to monitors. Paths are keyed on the rule template name (ruleTemplateName) for consistency with jobName and ruleName. A template name is mutable, so renaming a template changes its URL - requests using the old name return 404 (no alias is kept)."}],"servers":[{"description":"Data Quality API","url":"/rest/dq/1.0"}],"security":[{"basicAuth":[]},{"jwtAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"description":"Collibra REST API authentication using Basic Authentication.","type":"http","scheme":"basic"},"jwtAuth":{"description":"Collibra REST API authentication using JSON Web Token.","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"RuleTemplatePaginated":{"type":"object","description":"Paged list of rule templates.","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/RuleTemplate"}},"total":{"type":"integer","format":"int64","minimum":0,"description":"Total number of matching items."},"offset":{"type":"integer","format":"int64","minimum":0,"description":"Current offset."},"limit":{"type":"integer","format":"int64","minimum":0,"description":"Page size."}},"required":["results","total","offset","limit"]},"RuleTemplate":{"type":"object","description":"A reusable rule template.","properties":{"id":{"type":"string","format":"uuid","description":"Server-generated identifier."},"ruleTemplateName":{"type":"string","description":"Unique, human-readable template name. Used as the path key."},"description":{"type":"string","description":"Template description."},"sql":{"type":"string","description":"Parameterized SQL query with a {{column}} placeholder."},"dialect":{"type":"string","description":"SQL dialect the query was authored in."},"dimensions":{"type":"array","maxItems":20,"description":"Data quality dimensions.","items":{"type":"string"}},"tolerance":{"type":"integer","minimum":0,"description":"Number of breaking records tolerated before the rule reports breaking (non-negative integer)."},"isSystem":{"type":"boolean","description":"True if this template is system-defined (ships with the product and is read-only)."},"deployedRuleCount":{"type":"integer","format":"int64","minimum":0,"description":"Number of rules currently deployed from this template."},"businessRuleAssetIds":{"type":"array","maxItems":100,"description":"Linked business rule asset ids.","items":{"type":"string","format":"uuid"}},"translatedQueries":{"type":"object","description":"Translated SQL queries per database dialect (dialect to SQL).","additionalProperties":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"$ref":"#/components/schemas/UserReference"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"$ref":"#/components/schemas/UserReference"}},"required":["id","ruleTemplateName"]},"UserReference":{"type":"object","description":"Minimal user reference. The public API exposes only the id and userName - not the full user profile (no email, avatar, or first/last name).","properties":{"id":{"type":"string","format":"uuid","description":"The user's id."},"userName":{"type":"string","maxLength":255,"description":"The user's login name."}},"required":["id","userName"]},"StandardErrorResponse":{"type":"object","description":"Error response returned by the Data Quality API.","required":["statusCode","errorCode","titleMessage","userMessage"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code corresponding to the error."},"errorCode":{"type":"string","description":"Internal error code representing the specific error type."},"titleMessage":{"type":"string","description":"A brief title summarizing the error."},"userMessage":{"type":"string","description":"Detailed, user-friendly message explaining the error and possible remediation steps."}}}},"responses":{"BadRequest":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}}}},"paths":{"/ruleTemplates":{"get":{"tags":["Rule Templates"],"summary":"List rule templates","description":"Returns rule templates the user can view, sorted and paginated.\n\n**Permissions**\n- **Required:** `DATA_QUALITY` and `DATA_QUALITY_DEPLOY_TEMPLATES`\n- Or: `DATA_QUALITY` and `GLOBAL_MANAGE_ALL_RESOURCES`","operationId":"listRuleTemplates","parameters":[{"in":"query","name":"name","required":false,"description":"Case-insensitive partial match on template name.","schema":{"type":"string"}},{"in":"query","name":"dimension","required":false,"description":"Exact match on a data quality dimension.","schema":{"type":"string"}},{"in":"query","name":"createdBy","required":false,"description":"Filter by creator username.","schema":{"type":"string"}},{"in":"query","name":"isSystem","required":false,"description":"Filter on system-defined vs user-created templates.","schema":{"type":"boolean"}},{"in":"query","name":"sortBy","required":false,"description":"Field to sort by.","schema":{"type":"string","enum":["ruleTemplateName","description","createdBy","updatedAt","isSystem","dimensions"],"default":"dimensions"}},{"in":"query","name":"sortDir","required":false,"description":"Sort direction.","schema":{"type":"string","enum":["ASC","DESC"],"default":"ASC"}},{"in":"query","name":"offset","required":false,"description":"Number of items to skip.","schema":{"type":"integer","minimum":0,"default":0}},{"in":"query","name":"limit","required":false,"description":"Maximum number of items to return.","schema":{"type":"integer","minimum":1,"maximum":1000,"default":100}}],"responses":{"200":{"description":"A paged list of rule templates.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleTemplatePaginated"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Create a rule template

> Creates a rule template and returns the full template (the same schema\
> as \`GET\`) with the generated \`id\` populated. The \`ruleTemplateName\` must\
> be unique; creating one with a name that already exists fails with \`409\`.\
> \
> A \`400\` is returned on validation failure, untranslatable SQL, or a\
> \`businessRuleAssetIds\` entry that is not a Business Rule asset.\
> \
> \*\*Permissions\*\*\
> \- \*\*Required:\*\* \`DATA\_QUALITY\` and \`DATA\_QUALITY\_MANAGE\_TEMPLATES\`\
> \- Or: \`DATA\_QUALITY\` and \`GLOBAL\_MANAGE\_ALL\_RESOURCES\`

```json
{"openapi":"3.0.3","info":{"title":"Data Quality Collibra API","version":"1.3.0"},"tags":[{"name":"Rule Templates","description":"Manage reusable rule templates and their deployments to monitors. Paths are keyed on the rule template name (ruleTemplateName) for consistency with jobName and ruleName. A template name is mutable, so renaming a template changes its URL - requests using the old name return 404 (no alias is kept)."}],"servers":[{"description":"Data Quality API","url":"/rest/dq/1.0"}],"security":[{"basicAuth":[]},{"jwtAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"description":"Collibra REST API authentication using Basic Authentication.","type":"http","scheme":"basic"},"jwtAuth":{"description":"Collibra REST API authentication using JSON Web Token.","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"RuleTemplateWriteRequest":{"type":"object","description":"Create or update payload. On create, ruleTemplateName must be unique. On update, supplying a different ruleTemplateName renames the template - which changes its URL (the old name then returns 404, no alias is kept).","properties":{"ruleTemplateName":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":1000},"sql":{"type":"string","minLength":1,"maxLength":10000},"dialect":{"type":"string","minLength":1,"maxLength":255},"dimensions":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"string","maxLength":255}},"tolerance":{"type":"integer","minimum":0,"description":"Number of breaking records tolerated before the rule reports breaking (non-negative integer)."},"businessRuleAssetIds":{"type":"array","maxItems":100,"items":{"type":"string","format":"uuid"}}},"required":["ruleTemplateName","sql","dialect","description","dimensions"]},"RuleTemplate":{"type":"object","description":"A reusable rule template.","properties":{"id":{"type":"string","format":"uuid","description":"Server-generated identifier."},"ruleTemplateName":{"type":"string","description":"Unique, human-readable template name. Used as the path key."},"description":{"type":"string","description":"Template description."},"sql":{"type":"string","description":"Parameterized SQL query with a {{column}} placeholder."},"dialect":{"type":"string","description":"SQL dialect the query was authored in."},"dimensions":{"type":"array","maxItems":20,"description":"Data quality dimensions.","items":{"type":"string"}},"tolerance":{"type":"integer","minimum":0,"description":"Number of breaking records tolerated before the rule reports breaking (non-negative integer)."},"isSystem":{"type":"boolean","description":"True if this template is system-defined (ships with the product and is read-only)."},"deployedRuleCount":{"type":"integer","format":"int64","minimum":0,"description":"Number of rules currently deployed from this template."},"businessRuleAssetIds":{"type":"array","maxItems":100,"description":"Linked business rule asset ids.","items":{"type":"string","format":"uuid"}},"translatedQueries":{"type":"object","description":"Translated SQL queries per database dialect (dialect to SQL).","additionalProperties":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"$ref":"#/components/schemas/UserReference"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"$ref":"#/components/schemas/UserReference"}},"required":["id","ruleTemplateName"]},"UserReference":{"type":"object","description":"Minimal user reference. The public API exposes only the id and userName - not the full user profile (no email, avatar, or first/last name).","properties":{"id":{"type":"string","format":"uuid","description":"The user's id."},"userName":{"type":"string","maxLength":255,"description":"The user's login name."}},"required":["id","userName"]},"StandardErrorResponse":{"type":"object","description":"Error response returned by the Data Quality API.","required":["statusCode","errorCode","titleMessage","userMessage"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code corresponding to the error."},"errorCode":{"type":"string","description":"Internal error code representing the specific error type."},"titleMessage":{"type":"string","description":"A brief title summarizing the error."},"userMessage":{"type":"string","description":"Detailed, user-friendly message explaining the error and possible remediation steps."}}}},"responses":{"BadRequest":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"Conflict":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}}}},"paths":{"/ruleTemplates":{"post":{"tags":["Rule Templates"],"summary":"Create a rule template","description":"Creates a rule template and returns the full template (the same schema\nas `GET`) with the generated `id` populated. The `ruleTemplateName` must\nbe unique; creating one with a name that already exists fails with `409`.\n\nA `400` is returned on validation failure, untranslatable SQL, or a\n`businessRuleAssetIds` entry that is not a Business Rule asset.\n\n**Permissions**\n- **Required:** `DATA_QUALITY` and `DATA_QUALITY_MANAGE_TEMPLATES`\n- Or: `DATA_QUALITY` and `GLOBAL_MANAGE_ALL_RESOURCES`","operationId":"createRuleTemplate","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleTemplateWriteRequest"}}}},"responses":{"201":{"description":"The created rule template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleTemplate"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Get a rule template

> Returns a single rule template by name.\
> \
> \*\*Permissions\*\*\
> \- \*\*Required:\*\* \`DATA\_QUALITY\` and \`DATA\_QUALITY\_DEPLOY\_TEMPLATES\`\
> \- Or: \`DATA\_QUALITY\` and \`GLOBAL\_MANAGE\_ALL\_RESOURCES\`

```json
{"openapi":"3.0.3","info":{"title":"Data Quality Collibra API","version":"1.3.0"},"tags":[{"name":"Rule Templates","description":"Manage reusable rule templates and their deployments to monitors. Paths are keyed on the rule template name (ruleTemplateName) for consistency with jobName and ruleName. A template name is mutable, so renaming a template changes its URL - requests using the old name return 404 (no alias is kept)."}],"servers":[{"description":"Data Quality API","url":"/rest/dq/1.0"}],"security":[{"basicAuth":[]},{"jwtAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"description":"Collibra REST API authentication using Basic Authentication.","type":"http","scheme":"basic"},"jwtAuth":{"description":"Collibra REST API authentication using JSON Web Token.","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"RuleTemplate":{"type":"object","description":"A reusable rule template.","properties":{"id":{"type":"string","format":"uuid","description":"Server-generated identifier."},"ruleTemplateName":{"type":"string","description":"Unique, human-readable template name. Used as the path key."},"description":{"type":"string","description":"Template description."},"sql":{"type":"string","description":"Parameterized SQL query with a {{column}} placeholder."},"dialect":{"type":"string","description":"SQL dialect the query was authored in."},"dimensions":{"type":"array","maxItems":20,"description":"Data quality dimensions.","items":{"type":"string"}},"tolerance":{"type":"integer","minimum":0,"description":"Number of breaking records tolerated before the rule reports breaking (non-negative integer)."},"isSystem":{"type":"boolean","description":"True if this template is system-defined (ships with the product and is read-only)."},"deployedRuleCount":{"type":"integer","format":"int64","minimum":0,"description":"Number of rules currently deployed from this template."},"businessRuleAssetIds":{"type":"array","maxItems":100,"description":"Linked business rule asset ids.","items":{"type":"string","format":"uuid"}},"translatedQueries":{"type":"object","description":"Translated SQL queries per database dialect (dialect to SQL).","additionalProperties":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"$ref":"#/components/schemas/UserReference"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"$ref":"#/components/schemas/UserReference"}},"required":["id","ruleTemplateName"]},"UserReference":{"type":"object","description":"Minimal user reference. The public API exposes only the id and userName - not the full user profile (no email, avatar, or first/last name).","properties":{"id":{"type":"string","format":"uuid","description":"The user's id."},"userName":{"type":"string","maxLength":255,"description":"The user's login name."}},"required":["id","userName"]},"StandardErrorResponse":{"type":"object","description":"Error response returned by the Data Quality API.","required":["statusCode","errorCode","titleMessage","userMessage"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code corresponding to the error."},"errorCode":{"type":"string","description":"Internal error code representing the specific error type."},"titleMessage":{"type":"string","description":"A brief title summarizing the error."},"userMessage":{"type":"string","description":"Detailed, user-friendly message explaining the error and possible remediation steps."}}}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"NotFound":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}}}},"paths":{"/ruleTemplates/{ruleTemplateName}":{"get":{"tags":["Rule Templates"],"summary":"Get a rule template","description":"Returns a single rule template by name.\n\n**Permissions**\n- **Required:** `DATA_QUALITY` and `DATA_QUALITY_DEPLOY_TEMPLATES`\n- Or: `DATA_QUALITY` and `GLOBAL_MANAGE_ALL_RESOURCES`","operationId":"getRuleTemplate","responses":{"200":{"description":"The rule template.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleTemplate"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Update a rule template

> Updates a rule template and cascades the change to its deployed rules in\
> a single transaction. The response enumerates per-deployment results so\
> partial updates are visible: deployments that cannot be resolved (for\
> example a missing dialect) are reported as \`SKIPPED\` rather than failing\
> the whole update.\
> \
> A \`400\` is returned on validation failure, when renaming to a name that\
> already exists, or when attempting to modify an out-of-the-box template.\
> \
> \*\*Permissions\*\*\
> \- \*\*Required:\*\* \`DATA\_QUALITY\` and \`DATA\_QUALITY\_MANAGE\_TEMPLATES\`\
> \- Or: \`DATA\_QUALITY\` and \`GLOBAL\_MANAGE\_ALL\_RESOURCES\`

```json
{"openapi":"3.0.3","info":{"title":"Data Quality Collibra API","version":"1.3.0"},"tags":[{"name":"Rule Templates","description":"Manage reusable rule templates and their deployments to monitors. Paths are keyed on the rule template name (ruleTemplateName) for consistency with jobName and ruleName. A template name is mutable, so renaming a template changes its URL - requests using the old name return 404 (no alias is kept)."}],"servers":[{"description":"Data Quality API","url":"/rest/dq/1.0"}],"security":[{"basicAuth":[]},{"jwtAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"description":"Collibra REST API authentication using Basic Authentication.","type":"http","scheme":"basic"},"jwtAuth":{"description":"Collibra REST API authentication using JSON Web Token.","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"RuleTemplateWriteRequest":{"type":"object","description":"Create or update payload. On create, ruleTemplateName must be unique. On update, supplying a different ruleTemplateName renames the template - which changes its URL (the old name then returns 404, no alias is kept).","properties":{"ruleTemplateName":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":1000},"sql":{"type":"string","minLength":1,"maxLength":10000},"dialect":{"type":"string","minLength":1,"maxLength":255},"dimensions":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"string","maxLength":255}},"tolerance":{"type":"integer","minimum":0,"description":"Number of breaking records tolerated before the rule reports breaking (non-negative integer)."},"businessRuleAssetIds":{"type":"array","maxItems":100,"items":{"type":"string","format":"uuid"}}},"required":["ruleTemplateName","sql","dialect","description","dimensions"]},"RuleTemplateUpdateResult":{"type":"object","description":"The updated template plus the per-deployment cascade results, so a partial update (some deployments skipped) is visible to the caller.","properties":{"ruleTemplate":{"$ref":"#/components/schemas/RuleTemplate"},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/RuleTemplateDeploymentOutcome"}}},"required":["ruleTemplate","deployments"]},"RuleTemplate":{"type":"object","description":"A reusable rule template.","properties":{"id":{"type":"string","format":"uuid","description":"Server-generated identifier."},"ruleTemplateName":{"type":"string","description":"Unique, human-readable template name. Used as the path key."},"description":{"type":"string","description":"Template description."},"sql":{"type":"string","description":"Parameterized SQL query with a {{column}} placeholder."},"dialect":{"type":"string","description":"SQL dialect the query was authored in."},"dimensions":{"type":"array","maxItems":20,"description":"Data quality dimensions.","items":{"type":"string"}},"tolerance":{"type":"integer","minimum":0,"description":"Number of breaking records tolerated before the rule reports breaking (non-negative integer)."},"isSystem":{"type":"boolean","description":"True if this template is system-defined (ships with the product and is read-only)."},"deployedRuleCount":{"type":"integer","format":"int64","minimum":0,"description":"Number of rules currently deployed from this template."},"businessRuleAssetIds":{"type":"array","maxItems":100,"description":"Linked business rule asset ids.","items":{"type":"string","format":"uuid"}},"translatedQueries":{"type":"object","description":"Translated SQL queries per database dialect (dialect to SQL).","additionalProperties":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"$ref":"#/components/schemas/UserReference"},"updatedAt":{"type":"string","format":"date-time"},"updatedBy":{"$ref":"#/components/schemas/UserReference"}},"required":["id","ruleTemplateName"]},"UserReference":{"type":"object","description":"Minimal user reference. The public API exposes only the id and userName - not the full user profile (no email, avatar, or first/last name).","properties":{"id":{"type":"string","format":"uuid","description":"The user's id."},"userName":{"type":"string","maxLength":255,"description":"The user's login name."}},"required":["id","userName"]},"RuleTemplateDeploymentOutcome":{"type":"object","description":"The result of deploying to, or cascading an update onto, one rule. `jobName` (plus `columnName` when present) identifies the originating target so the caller can map the outcome back to the target it submitted.","properties":{"jobName":{"$ref":"#/components/schemas/JobName"},"columnName":{"type":"string","maxLength":255,"description":"Echoes the target's column when present; disambiguates the outcome when a job has multiple column targets."},"deployedRuleName":{"type":"string","maxLength":255},"status":{"$ref":"#/components/schemas/RuleTemplateDeploymentStatus"},"reason":{"type":"string","maxLength":1000,"description":"Why the deployment was skipped or failed (for example, a missing dialect)."}},"required":["jobName","status"]},"JobName":{"type":"string","description":"Job name. Allowed characters by default: letters, digits, `_`, `.`, `-`. **Configurable** via the server env variable `VALIDATION_PATTERN_JOB_NAME`. Default pattern: `^[a-zA-Z0-9_.-]+$`.\n","minLength":1,"maxLength":255,"pattern":"^[a-zA-Z0-9_.-]+$"},"RuleTemplateDeploymentStatus":{"type":"string","description":"Outcome of deploying or cascading to a single rule.","enum":["DEPLOYED","SKIPPED","FAILED"]},"StandardErrorResponse":{"type":"object","description":"Error response returned by the Data Quality API.","required":["statusCode","errorCode","titleMessage","userMessage"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code corresponding to the error."},"errorCode":{"type":"string","description":"Internal error code representing the specific error type."},"titleMessage":{"type":"string","description":"A brief title summarizing the error."},"userMessage":{"type":"string","description":"Detailed, user-friendly message explaining the error and possible remediation steps."}}}},"responses":{"BadRequest":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"NotFound":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}}}},"paths":{"/ruleTemplates/{ruleTemplateName}":{"put":{"tags":["Rule Templates"],"summary":"Update a rule template","description":"Updates a rule template and cascades the change to its deployed rules in\na single transaction. The response enumerates per-deployment results so\npartial updates are visible: deployments that cannot be resolved (for\nexample a missing dialect) are reported as `SKIPPED` rather than failing\nthe whole update.\n\nA `400` is returned on validation failure, when renaming to a name that\nalready exists, or when attempting to modify an out-of-the-box template.\n\n**Permissions**\n- **Required:** `DATA_QUALITY` and `DATA_QUALITY_MANAGE_TEMPLATES`\n- Or: `DATA_QUALITY` and `GLOBAL_MANAGE_ALL_RESOURCES`","operationId":"updateRuleTemplate","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleTemplateWriteRequest"}}}},"responses":{"200":{"description":"The updated template plus the per-deployment cascade results.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleTemplateUpdateResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"description":"The update failed for a reason other than invalid input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}}}}}}}
```

## Delete a rule template

> Deletes a rule template. The operation is idempotent: if no template with\
> that name exists, it still returns \`204 No Content\`.\
> \
> A \`400\` is returned when the template is out-of-the-box: out-of-the-box\
> templates cannot be deleted.\
> \
> \*\*Permissions\*\*\
> \- \*\*Required:\*\* \`DATA\_QUALITY\` and \`DATA\_QUALITY\_MANAGE\_TEMPLATES\`\
> \- Or: \`DATA\_QUALITY\` and \`GLOBAL\_MANAGE\_ALL\_RESOURCES\`

```json
{"openapi":"3.0.3","info":{"title":"Data Quality Collibra API","version":"1.3.0"},"tags":[{"name":"Rule Templates","description":"Manage reusable rule templates and their deployments to monitors. Paths are keyed on the rule template name (ruleTemplateName) for consistency with jobName and ruleName. A template name is mutable, so renaming a template changes its URL - requests using the old name return 404 (no alias is kept)."}],"servers":[{"description":"Data Quality API","url":"/rest/dq/1.0"}],"security":[{"basicAuth":[]},{"jwtAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"description":"Collibra REST API authentication using Basic Authentication.","type":"http","scheme":"basic"},"jwtAuth":{"description":"Collibra REST API authentication using JSON Web Token.","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"responses":{"BadRequest":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}}},"schemas":{"StandardErrorResponse":{"type":"object","description":"Error response returned by the Data Quality API.","required":["statusCode","errorCode","titleMessage","userMessage"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code corresponding to the error."},"errorCode":{"type":"string","description":"Internal error code representing the specific error type."},"titleMessage":{"type":"string","description":"A brief title summarizing the error."},"userMessage":{"type":"string","description":"Detailed, user-friendly message explaining the error and possible remediation steps."}}}}},"paths":{"/ruleTemplates/{ruleTemplateName}":{"delete":{"tags":["Rule Templates"],"summary":"Delete a rule template","description":"Deletes a rule template. The operation is idempotent: if no template with\nthat name exists, it still returns `204 No Content`.\n\nA `400` is returned when the template is out-of-the-box: out-of-the-box\ntemplates cannot be deleted.\n\n**Permissions**\n- **Required:** `DATA_QUALITY` and `DATA_QUALITY_MANAGE_TEMPLATES`\n- Or: `DATA_QUALITY` and `GLOBAL_MANAGE_ALL_RESOURCES`","operationId":"deleteRuleTemplate","parameters":[{"in":"query","name":"deleteDeployments","required":false,"description":"Also delete every rule deployed from this template.","schema":{"type":"boolean","default":false}}],"responses":{"204":{"description":"The template was deleted, or no matching template existed."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Deploy a rule template to targets

> Deploys the template to one or more targets, creating a rule on each. The\
> response reports a per-target outcome. A batch deploy is handled\
> gracefully: targets that cannot be deployed (for example a missing\
> dialect) are reported as \`SKIPPED\` while the others still deploy.\
> \
> A \`400\` is returned on validation failure of the deploy request.\
> \
> \*\*Permissions\*\*\
> \- \*\*Required:\*\* \`DATA\_QUALITY\` and \`DATA\_QUALITY\_DEPLOY\_TEMPLATES\`\
> \- Or: \`DATA\_QUALITY\` and \`GLOBAL\_MANAGE\_ALL\_RESOURCES\`

```json
{"openapi":"3.0.3","info":{"title":"Data Quality Collibra API","version":"1.3.0"},"tags":[{"name":"Rule Templates","description":"Manage reusable rule templates and their deployments to monitors. Paths are keyed on the rule template name (ruleTemplateName) for consistency with jobName and ruleName. A template name is mutable, so renaming a template changes its URL - requests using the old name return 404 (no alias is kept)."}],"servers":[{"description":"Data Quality API","url":"/rest/dq/1.0"}],"security":[{"basicAuth":[]},{"jwtAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"description":"Collibra REST API authentication using Basic Authentication.","type":"http","scheme":"basic"},"jwtAuth":{"description":"Collibra REST API authentication using JSON Web Token.","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"RuleTemplateDeployRequest":{"type":"object","description":"A request to deploy a template to one or more targets.","properties":{"targets":{"type":"array","minItems":1,"maxItems":100,"items":{"$ref":"#/components/schemas/RuleTemplateDeployTarget"}}},"required":["targets"]},"RuleTemplateDeployTarget":{"type":"object","description":"A single deploy target.","properties":{"jobName":{"$ref":"#/components/schemas/JobName"},"columnName":{"type":"string","maxLength":255},"connectionName":{"type":"string","maxLength":255}},"required":["jobName"]},"JobName":{"type":"string","description":"Job name. Allowed characters by default: letters, digits, `_`, `.`, `-`. **Configurable** via the server env variable `VALIDATION_PATTERN_JOB_NAME`. Default pattern: `^[a-zA-Z0-9_.-]+$`.\n","minLength":1,"maxLength":255,"pattern":"^[a-zA-Z0-9_.-]+$"},"RuleTemplateDeployResult":{"type":"object","description":"Per-target deploy outcomes.","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/RuleTemplateDeploymentOutcome"}}},"required":["results"]},"RuleTemplateDeploymentOutcome":{"type":"object","description":"The result of deploying to, or cascading an update onto, one rule. `jobName` (plus `columnName` when present) identifies the originating target so the caller can map the outcome back to the target it submitted.","properties":{"jobName":{"$ref":"#/components/schemas/JobName"},"columnName":{"type":"string","maxLength":255,"description":"Echoes the target's column when present; disambiguates the outcome when a job has multiple column targets."},"deployedRuleName":{"type":"string","maxLength":255},"status":{"$ref":"#/components/schemas/RuleTemplateDeploymentStatus"},"reason":{"type":"string","maxLength":1000,"description":"Why the deployment was skipped or failed (for example, a missing dialect)."}},"required":["jobName","status"]},"RuleTemplateDeploymentStatus":{"type":"string","description":"Outcome of deploying or cascading to a single rule.","enum":["DEPLOYED","SKIPPED","FAILED"]},"StandardErrorResponse":{"type":"object","description":"Error response returned by the Data Quality API.","required":["statusCode","errorCode","titleMessage","userMessage"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code corresponding to the error."},"errorCode":{"type":"string","description":"Internal error code representing the specific error type."},"titleMessage":{"type":"string","description":"A brief title summarizing the error."},"userMessage":{"type":"string","description":"Detailed, user-friendly message explaining the error and possible remediation steps."}}}},"responses":{"BadRequest":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"NotFound":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}}}},"paths":{"/ruleTemplates/{ruleTemplateName}/deploy":{"post":{"tags":["Rule Templates"],"summary":"Deploy a rule template to targets","description":"Deploys the template to one or more targets, creating a rule on each. The\nresponse reports a per-target outcome. A batch deploy is handled\ngracefully: targets that cannot be deployed (for example a missing\ndialect) are reported as `SKIPPED` while the others still deploy.\n\nA `400` is returned on validation failure of the deploy request.\n\n**Permissions**\n- **Required:** `DATA_QUALITY` and `DATA_QUALITY_DEPLOY_TEMPLATES`\n- Or: `DATA_QUALITY` and `GLOBAL_MANAGE_ALL_RESOURCES`","operationId":"deployRuleTemplate","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleTemplateDeployRequest"}}}},"responses":{"200":{"description":"Per-target deploy outcomes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleTemplateDeployResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## List a rule template's deployments

> Returns the rules currently deployed from this template.\
> \
> \*\*Permissions\*\*\
> \- \*\*Required:\*\* \`DATA\_QUALITY\` and \`DATA\_QUALITY\_DEPLOY\_TEMPLATES\`\
> \- Or: \`DATA\_QUALITY\` and \`GLOBAL\_MANAGE\_ALL\_RESOURCES\`

```json
{"openapi":"3.0.3","info":{"title":"Data Quality Collibra API","version":"1.3.0"},"tags":[{"name":"Rule Templates","description":"Manage reusable rule templates and their deployments to monitors. Paths are keyed on the rule template name (ruleTemplateName) for consistency with jobName and ruleName. A template name is mutable, so renaming a template changes its URL - requests using the old name return 404 (no alias is kept)."}],"servers":[{"description":"Data Quality API","url":"/rest/dq/1.0"}],"security":[{"basicAuth":[]},{"jwtAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"description":"Collibra REST API authentication using Basic Authentication.","type":"http","scheme":"basic"},"jwtAuth":{"description":"Collibra REST API authentication using JSON Web Token.","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"RuleTemplateDeploymentPaginated":{"type":"object","description":"Paged list of a rule template's deployments.","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/RuleTemplateDeployment"}},"total":{"type":"integer","format":"int64","minimum":0,"description":"Total number of matching items."},"offset":{"type":"integer","format":"int64","minimum":0,"description":"Current offset."},"limit":{"type":"integer","format":"int64","minimum":0,"description":"Page size."}},"required":["results","total","offset","limit"]},"RuleTemplateDeployment":{"type":"object","description":"A rule currently deployed from a template.","properties":{"jobName":{"$ref":"#/components/schemas/JobName"},"deployedRuleName":{"type":"string","maxLength":255},"columnName":{"type":"string","maxLength":255},"connectionId":{"type":"string","format":"uuid","description":"Edge connection of the job."},"edgeSiteId":{"type":"string","format":"uuid","description":"Edge site of the connection."},"lastRun":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp of the last run; null if never run."},"lastRunStatus":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/RuleStatus"},{"description":"Latest evaluation status."}]},"creator":{"$ref":"#/components/schemas/UserReference"},"relatedAssetIds":{"type":"array","maxItems":100,"description":"Linked Business Rule assets.","items":{"type":"string","format":"uuid"}}},"required":["jobName","deployedRuleName"]},"JobName":{"type":"string","description":"Job name. Allowed characters by default: letters, digits, `_`, `.`, `-`. **Configurable** via the server env variable `VALIDATION_PATTERN_JOB_NAME`. Default pattern: `^[a-zA-Z0-9_.-]+$`.\n","minLength":1,"maxLength":255,"pattern":"^[a-zA-Z0-9_.-]+$"},"RuleStatus":{"type":"string","description":"Latest evaluation status of a deployed rule.","enum":["passing","breaking","exception","suppressed","pending_run"]},"UserReference":{"type":"object","description":"Minimal user reference. The public API exposes only the id and userName - not the full user profile (no email, avatar, or first/last name).","properties":{"id":{"type":"string","format":"uuid","description":"The user's id."},"userName":{"type":"string","maxLength":255,"description":"The user's login name."}},"required":["id","userName"]},"StandardErrorResponse":{"type":"object","description":"Error response returned by the Data Quality API.","required":["statusCode","errorCode","titleMessage","userMessage"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code corresponding to the error."},"errorCode":{"type":"string","description":"Internal error code representing the specific error type."},"titleMessage":{"type":"string","description":"A brief title summarizing the error."},"userMessage":{"type":"string","description":"Detailed, user-friendly message explaining the error and possible remediation steps."}}}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"NotFound":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}}}},"paths":{"/ruleTemplates/{ruleTemplateName}/deployments":{"get":{"tags":["Rule Templates"],"summary":"List a rule template's deployments","description":"Returns the rules currently deployed from this template.\n\n**Permissions**\n- **Required:** `DATA_QUALITY` and `DATA_QUALITY_DEPLOY_TEMPLATES`\n- Or: `DATA_QUALITY` and `GLOBAL_MANAGE_ALL_RESOURCES`","operationId":"listRuleTemplateDeployments","responses":{"200":{"description":"The template's current deployments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleTemplateDeploymentPaginated"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Detach a deployed rule from a template

> Detaches a single deployed rule from the template (a soft unlink - the\
> rule and its history are preserved). The rule is identified by its\
> \`jobName\` and \`deployedRuleName\`, since one template can be deployed to\
> many rules across many jobs.\
> \
> A \`400\` is returned when the rule exists but was not deployed from this\
> template (or is already detached).\
> \
> \*\*Permissions\*\*\
> \- \*\*Required:\*\* \`DATA\_QUALITY\` and \`DATA\_QUALITY\_DEPLOY\_TEMPLATES\`\
> \- Or: \`DATA\_QUALITY\` and \`GLOBAL\_MANAGE\_ALL\_RESOURCES\`

```json
{"openapi":"3.0.3","info":{"title":"Data Quality Collibra API","version":"1.3.0"},"tags":[{"name":"Rule Templates","description":"Manage reusable rule templates and their deployments to monitors. Paths are keyed on the rule template name (ruleTemplateName) for consistency with jobName and ruleName. A template name is mutable, so renaming a template changes its URL - requests using the old name return 404 (no alias is kept)."}],"servers":[{"description":"Data Quality API","url":"/rest/dq/1.0"}],"security":[{"basicAuth":[]},{"jwtAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"description":"Collibra REST API authentication using Basic Authentication.","type":"http","scheme":"basic"},"jwtAuth":{"description":"Collibra REST API authentication using JSON Web Token.","type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"RuleTemplateDetachRequest":{"type":"object","description":"Identifies the deployed rule to detach from the template.","properties":{"jobName":{"$ref":"#/components/schemas/JobName"},"deployedRuleName":{"type":"string","maxLength":255}},"required":["jobName","deployedRuleName"]},"JobName":{"type":"string","description":"Job name. Allowed characters by default: letters, digits, `_`, `.`, `-`. **Configurable** via the server env variable `VALIDATION_PATTERN_JOB_NAME`. Default pattern: `^[a-zA-Z0-9_.-]+$`.\n","minLength":1,"maxLength":255,"pattern":"^[a-zA-Z0-9_.-]+$"},"StandardErrorResponse":{"type":"object","description":"Error response returned by the Data Quality API.","required":["statusCode","errorCode","titleMessage","userMessage"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code corresponding to the error."},"errorCode":{"type":"string","description":"Internal error code representing the specific error type."},"titleMessage":{"type":"string","description":"A brief title summarizing the error."},"userMessage":{"type":"string","description":"Detailed, user-friendly message explaining the error and possible remediation steps."}}}},"responses":{"BadRequest":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"NotFound":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardErrorResponse"}}}}}},"paths":{"/ruleTemplates/{ruleTemplateName}/detach":{"post":{"tags":["Rule Templates"],"summary":"Detach a deployed rule from a template","description":"Detaches a single deployed rule from the template (a soft unlink - the\nrule and its history are preserved). The rule is identified by its\n`jobName` and `deployedRuleName`, since one template can be deployed to\nmany rules across many jobs.\n\nA `400` is returned when the rule exists but was not deployed from this\ntemplate (or is already detached).\n\n**Permissions**\n- **Required:** `DATA_QUALITY` and `DATA_QUALITY_DEPLOY_TEMPLATES`\n- Or: `DATA_QUALITY` and `GLOBAL_MANAGE_ALL_RESOURCES`","operationId":"detachRuleTemplateDeployment","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleTemplateDetachRequest"}}}},"responses":{"204":{"description":"The rule was detached."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.collibra.com/api/references/data-quality/rule-templates.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
