> 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.12/api-integrations/data-quality-apis/segment-results.md).

# Segment Results

## Search segment results

> Returns segment results for a rule result or across the catalog, depending on the request path.\
> \
> Requires the \*\*'View quality'\*\* permission. The segment results returned are limited to those associated with rule implementations on domains where the caller can view quality rules. Administrators and service accounts see everything.\
> \
> \*\*Two use modes:\*\*\
> \- \*\*By parent rule result\*\* (\`/rule\_results/:rule\_result\_id/segment\_results\`): returns all segment results belonging to the specified rule result. Pagination parameters are accepted but ignored; the full set for that rule result is returned without an \`x-total-count\` header.\
> \- \*\*Global search\*\* (\`/segment\_results\`): returns segment results across the catalog. Supports pagination via \`page\` (default \`0\`) and \`size\` (default \`20\`), and includes the \`x-total-count\` header with the total number of matching records.\
> \
> \*\*Request body:\*\*\
> \- \`page\`, \`size\` (optional) – Pagination, only honored in the global search mode.\
> \- \`filters\` (optional, object) – Filter criteria (for example, \`parent\_id\` or \`segment\_name\`).\
> \
> When no filters are provided in global search mode, the endpoint behaves as an unfiltered listing limited only by the caller's permissions.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dq","version":"Truedat 8.11.0"},"paths":{"/api/rule_results/{rule_result_id}/segment_results":{"get":{"description":"Returns segment results for a rule result or across the catalog, depending on the request path.\n\nRequires the **'View quality'** permission. The segment results returned are limited to those associated with rule implementations on domains where the caller can view quality rules. Administrators and service accounts see everything.\n\n**Two use modes:**\n- **By parent rule result** (`/rule_results/:rule_result_id/segment_results`): returns all segment results belonging to the specified rule result. Pagination parameters are accepted but ignored; the full set for that rule result is returned without an `x-total-count` header.\n- **Global search** (`/segment_results`): returns segment results across the catalog. Supports pagination via `page` (default `0`) and `size` (default `20`), and includes the `x-total-count` header with the total number of matching records.\n\n**Request body:**\n- `page`, `size` (optional) – Pagination, only honored in the global search mode.\n- `filters` (optional, object) – Filter criteria (for example, `parent_id` or `segment_name`).\n\nWhen no filters are provided in global search mode, the endpoint behaves as an unfiltered listing limited only by the caller's permissions.\n","operationId":"TdDqWeb.SegmentResultController.index (2)","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/SegmentResultSearchRequest"}}},"description":"Segment result search request","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentResultSearchResponse"}}},"description":"Segment 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 segment results","tags":["Segment Results"]}}},"components":{"schemas":{"SegmentResultSearchRequest":{"additionalProperties":false,"properties":{"filters":{"additionalProperties":true,"description":"Filter criteria (e.g., parent_id, segment_name)","type":"object"},"page":{"default":0,"description":"Page number","minimum":0,"type":"integer"},"size":{"default":20,"description":"Page size","minimum":1,"type":"integer"}},"title":"SegmentResultSearchRequest","type":"object"},"SegmentResultSearchResponse":{"additionalProperties":false,"properties":{"data":{"items":{"additionalProperties":false,"properties":{"date":{"nullable":true,"type":"string"},"details":{"additionalProperties":true,"nullable":true,"type":"object"},"errors":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"inserted_at":{"nullable":true,"type":"string"},"params":{"additionalProperties":true,"nullable":true,"type":"object"},"parent_id":{"type":"integer"},"records":{"nullable":true,"type":"integer"},"result":{"nullable":true,"type":"number"},"segment_name":{"nullable":true,"type":"string"},"updated_at":{"nullable":true,"type":"string"}},"required":["id","parent_id"],"type":"object"},"type":"array"}},"required":["data"],"title":"SegmentResultSearchResponse","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"}}}}
```

## Search segment results

> Returns segment results for a rule result or across the catalog, depending on the request path.\
> \
> Requires the \*\*'View quality'\*\* permission. The segment results returned are limited to those associated with rule implementations on domains where the caller can view quality rules. Administrators and service accounts see everything.\
> \
> \*\*Two use modes:\*\*\
> \- \*\*By parent rule result\*\* (\`/rule\_results/:rule\_result\_id/segment\_results\`): returns all segment results belonging to the specified rule result. Pagination parameters are accepted but ignored; the full set for that rule result is returned without an \`x-total-count\` header.\
> \- \*\*Global search\*\* (\`/segment\_results\`): returns segment results across the catalog. Supports pagination via \`page\` (default \`0\`) and \`size\` (default \`20\`), and includes the \`x-total-count\` header with the total number of matching records.\
> \
> \*\*Request body:\*\*\
> \- \`page\`, \`size\` (optional) – Pagination, only honored in the global search mode.\
> \- \`filters\` (optional, object) – Filter criteria (for example, \`parent\_id\` or \`segment\_name\`).\
> \
> When no filters are provided in global search mode, the endpoint behaves as an unfiltered listing limited only by the caller's permissions.<br>

```json
{"openapi":"3.0.0","info":{"title":"td-dq","version":"Truedat 8.11.0"},"paths":{"/api/segment_results":{"post":{"description":"Returns segment results for a rule result or across the catalog, depending on the request path.\n\nRequires the **'View quality'** permission. The segment results returned are limited to those associated with rule implementations on domains where the caller can view quality rules. Administrators and service accounts see everything.\n\n**Two use modes:**\n- **By parent rule result** (`/rule_results/:rule_result_id/segment_results`): returns all segment results belonging to the specified rule result. Pagination parameters are accepted but ignored; the full set for that rule result is returned without an `x-total-count` header.\n- **Global search** (`/segment_results`): returns segment results across the catalog. Supports pagination via `page` (default `0`) and `size` (default `20`), and includes the `x-total-count` header with the total number of matching records.\n\n**Request body:**\n- `page`, `size` (optional) – Pagination, only honored in the global search mode.\n- `filters` (optional, object) – Filter criteria (for example, `parent_id` or `segment_name`).\n\nWhen no filters are provided in global search mode, the endpoint behaves as an unfiltered listing limited only by the caller's permissions.\n","operationId":"TdDqWeb.SegmentResultController.index","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/SegmentResultSearchRequest"}}},"description":"Segment result search request","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentResultSearchResponse"}}},"description":"Segment 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 segment results","tags":["Segment Results"]}}},"components":{"schemas":{"SegmentResultSearchRequest":{"additionalProperties":false,"properties":{"filters":{"additionalProperties":true,"description":"Filter criteria (e.g., parent_id, segment_name)","type":"object"},"page":{"default":0,"description":"Page number","minimum":0,"type":"integer"},"size":{"default":20,"description":"Page size","minimum":1,"type":"integer"}},"title":"SegmentResultSearchRequest","type":"object"},"SegmentResultSearchResponse":{"additionalProperties":false,"properties":{"data":{"items":{"additionalProperties":false,"properties":{"date":{"nullable":true,"type":"string"},"details":{"additionalProperties":true,"nullable":true,"type":"object"},"errors":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"inserted_at":{"nullable":true,"type":"string"},"params":{"additionalProperties":true,"nullable":true,"type":"object"},"parent_id":{"type":"integer"},"records":{"nullable":true,"type":"integer"},"result":{"nullable":true,"type":"number"},"segment_name":{"nullable":true,"type":"string"},"updated_at":{"nullable":true,"type":"string"}},"required":["id","parent_id"],"type":"object"},"type":"array"}},"required":["data"],"title":"SegmentResultSearchResponse","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"}}}}
```
