> For the complete documentation index, see [llms.txt](https://docs.truedat.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.truedat.io/v8.8/api-integrations/data-quality-apis/rule-results.md).

# Rule Results

## List rule results

> Return paginated rule results, optionally filtering by date and comparison field.

```json
{"openapi":"3.0.0","info":{"title":"td-dq","version":"Truedat 8.8.2"},"paths":{"/api/rule_results":{"get":{"description":"Return paginated rule results, optionally filtering by date and comparison field.","operationId":"TdDqWeb.RuleResultController.index","parameters":[{"description":"Filter results since this date (ISO 8601)","in":"query","name":"since","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"Field to compare 'since' against ('date' or 'updated_at')","in":"query","name":"from","required":false,"schema":{"enum":["date","updated_at"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleResultsIndexResponse"}}},"description":"Rule results response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDqUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDqForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDqInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List rule results","tags":["Rule Results"]}}},"components":{"schemas":{"RuleResultsIndexResponse":{"additionalProperties":false,"properties":{"data":{"items":{"$ref":"#/components/schemas/RuleResult"},"type":"array"}},"required":["data"],"title":"RuleResultsIndexResponse","type":"object"},"RuleResult":{"additionalProperties":false,"properties":{"date":{"format":"date-time","nullable":true,"type":"string"},"details":{"additionalProperties":true,"nullable":true,"type":"object"},"errors":{"nullable":true,"type":"integer"},"has_remediation":{"nullable":true,"type":"boolean"},"id":{"type":"integer"},"implementation_id":{"nullable":true,"type":"integer"},"inserted_at":{"nullable":true,"type":"string"},"params":{"additionalProperties":true,"nullable":true,"type":"object"},"records":{"nullable":true,"type":"integer"},"result":{"nullable":true,"type":"number"},"result_type":{"nullable":true,"type":"string"},"rule_id":{"nullable":true,"type":"integer"},"updated_at":{"nullable":true,"type":"string"}},"required":["id"],"title":"RuleResult","type":"object"},"TdDqUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdDqUnauthorizedResponse","type":"object"},"TdDqForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdDqForbiddenResponse","type":"object"},"TdDqInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdDqInternalServerErrorResponse","type":"object"}}}}
```

## Upload rule results

> Upload a CSV file with rule result records and process them into the system.

```json
{"openapi":"3.0.0","info":{"title":"td-dq","version":"Truedat 8.8.2"},"paths":{"/api/rule_results":{"post":{"description":"Upload a CSV file with rule result records and process them into the system.","operationId":"TdDqWeb.RuleResultController.create","parameters":[],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/RuleResultUploadRequest"}}},"description":"Rule result upload request","required":false},"responses":{"200":{"description":"Rule result upload successful"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDqUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDqForbiddenResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDqUnprocessableEntityResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDqInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Upload rule results","tags":["Rule Results"]}}},"components":{"schemas":{"RuleResultUploadRequest":{"additionalProperties":false,"properties":{"rule_results":{"description":"CSV file with rule results (columns: implementation_key, date, result, records, errors, m:param1, ...)","format":"binary","type":"string"}},"required":["rule_results"],"title":"RuleResultUploadRequest","type":"object"},"TdDqUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdDqUnauthorizedResponse","type":"object"},"TdDqForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdDqForbiddenResponse","type":"object"},"TdDqUnprocessableEntityResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdDqUnprocessableEntityResponse","type":"object"},"TdDqInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdDqInternalServerErrorResponse","type":"object"}}}}
```

## Search rule results

> Perform a search for rule results with optional pagination and return the matching results.

```json
{"openapi":"3.0.0","info":{"title":"td-dq","version":"Truedat 8.8.2"},"paths":{"/api/rule_results/search":{"post":{"description":"Perform a search for rule results with optional pagination and return the matching results.","operationId":"TdDqWeb.RuleResultSearchController.create","parameters":[{"description":"Page number","in":"query","name":"page","required":false,"schema":{"default":0,"minimum":0,"type":"integer"}},{"description":"Page size","in":"query","name":"size","required":false,"schema":{"default":20,"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleResultSearchRequest"}}},"description":"Rule result search request","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleResultSearchResponse"}}},"description":"Rule result search response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDqUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDqForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDqInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Search rule results","tags":["Rule Results"]}}},"components":{"schemas":{"RuleResultSearchRequest":{"additionalProperties":false,"properties":{"filters":{"additionalProperties":true,"description":"Filter criteria (e.g., status, implementation_id, date range)","type":"object"},"page":{"default":0,"description":"Page number","minimum":0,"type":"integer"},"size":{"default":20,"description":"Page size","minimum":1,"type":"integer"}},"title":"RuleResultSearchRequest","type":"object"},"RuleResultSearchResponse":{"additionalProperties":false,"properties":{"data":{"items":{"$ref":"#/components/schemas/RuleResult"},"type":"array"}},"required":["data"],"title":"RuleResultSearchResponse","type":"object"},"RuleResult":{"additionalProperties":false,"properties":{"date":{"format":"date-time","nullable":true,"type":"string"},"details":{"additionalProperties":true,"nullable":true,"type":"object"},"errors":{"nullable":true,"type":"integer"},"has_remediation":{"nullable":true,"type":"boolean"},"id":{"type":"integer"},"implementation_id":{"nullable":true,"type":"integer"},"inserted_at":{"nullable":true,"type":"string"},"params":{"additionalProperties":true,"nullable":true,"type":"object"},"records":{"nullable":true,"type":"integer"},"result":{"nullable":true,"type":"number"},"result_type":{"nullable":true,"type":"string"},"rule_id":{"nullable":true,"type":"integer"},"updated_at":{"nullable":true,"type":"string"}},"required":["id"],"title":"RuleResult","type":"object"},"TdDqUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdDqUnauthorizedResponse","type":"object"},"TdDqForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdDqForbiddenResponse","type":"object"},"TdDqInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdDqInternalServerErrorResponse","type":"object"}}}}
```

## Get a rule result

> Retrieve a specific rule result by its ID if the current user can view it.

```json
{"openapi":"3.0.0","info":{"title":"td-dq","version":"Truedat 8.8.2"},"paths":{"/api/rule_results/{id}":{"get":{"description":"Retrieve a specific rule result by its ID if the current user can view it.","operationId":"TdDqWeb.RuleResultController.show","parameters":[{"description":"Rule result ID","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleResultResponse"}}},"description":"Rule result response"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDqUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDqForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDqInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Get a rule result","tags":["Rule Results"]}}},"components":{"schemas":{"RuleResultResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/RuleResult"}},"required":["data"],"title":"RuleResultResponse","type":"object"},"RuleResult":{"additionalProperties":false,"properties":{"date":{"format":"date-time","nullable":true,"type":"string"},"details":{"additionalProperties":true,"nullable":true,"type":"object"},"errors":{"nullable":true,"type":"integer"},"has_remediation":{"nullable":true,"type":"boolean"},"id":{"type":"integer"},"implementation_id":{"nullable":true,"type":"integer"},"inserted_at":{"nullable":true,"type":"string"},"params":{"additionalProperties":true,"nullable":true,"type":"object"},"records":{"nullable":true,"type":"integer"},"result":{"nullable":true,"type":"number"},"result_type":{"nullable":true,"type":"string"},"rule_id":{"nullable":true,"type":"integer"},"updated_at":{"nullable":true,"type":"string"}},"required":["id"],"title":"RuleResult","type":"object"},"TdDqUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdDqUnauthorizedResponse","type":"object"},"TdDqForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdDqForbiddenResponse","type":"object"},"TdDqInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdDqInternalServerErrorResponse","type":"object"}}}}
```

## Delete a rule result

> Delete the specified rule result record after authorization.

```json
{"openapi":"3.0.0","info":{"title":"td-dq","version":"Truedat 8.8.2"},"paths":{"/api/rule_results/{id}":{"delete":{"description":"Delete the specified rule result record after authorization.","operationId":"TdDqWeb.RuleResultController.delete","parameters":[{"description":"Rule result ID","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Rule result deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDqUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDqForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdDqInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Delete a rule result","tags":["Rule Results"]}}},"components":{"schemas":{"TdDqUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdDqUnauthorizedResponse","type":"object"},"TdDqForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdDqForbiddenResponse","type":"object"},"TdDqInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdDqInternalServerErrorResponse","type":"object"}}}}
```
