> For the complete documentation index, see [llms.txt](https://v2.dataos.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v2.dataos.info/concepts/foundations/activation/apis/api-reference/data-quality.md).

# Data Quality

Review quality status and inspect rules. Start with the summary; drill into rules when something looks wrong.

***

## GET /api/v1/dq

**Summary:** Quality summary

**Description:** Aggregated pass/fail/warn counts per quality dimension. Pass `as_of_ts` (Unix seconds) for a point-in-time snapshot.

**cURL:**

```bash
curl -s https://$BASE_URL/api/v1/dq \
  -H "Authorization: Bearer $TOKEN"

# Point-in-time snapshot
curl -s "https://$BASE_URL/api/v1/dq?as_of_ts=1716076800" \
  -H "Authorization: Bearer $TOKEN"
```

**Returns:** JSON with `checks_count`, `summary` (pass/fail/warn/total/pass\_rate), and `dimensions` (same breakdown per dimension: accuracy, completeness, etc.).

***

## GET /api/v1/dq/rules

**Summary:** List all quality rules

**Description:** Catalog of all rules with their latest execution results. Each rule includes up to `runs_per_rule` recent executions (default 10).

**Key query params:** `model`, `column`, `dimension`, `runs_per_rule`, `limit`, `offset`

**cURL:**

```bash
curl -s "https://$BASE_URL/api/v1/dq/rules?dimension=completeness&limit=20" \
  -H "Authorization: Bearer $TOKEN"
```

**Returns:** JSON with `rules[]` — each entry has `identity`, `name`, `dimension`, `column`, `model`, `definition`, and a `runs[]` array with recent outcomes (pass/fail/warn).

***

## GET /api/v1/dq/rules/by-name/{model}/{dimension}/{name}

**Summary:** Look up a rule by name

**Description:** Fetch a specific rule by its natural key instead of a hash. Useful when you know the rule name from an alert or report.

**cURL:**

```bash
curl -s "https://$BASE_URL/api/v1/dq/rules/by-name/orders_analytics.users/completeness/row_count_check" \
  -H "Authorization: Bearer $TOKEN"
```

**Returns:** Same structure as `GET /dq/rules/{identity}` — rule definition plus `runs[]` history.

***

## GET /api/v1/dq/rules/{identity}

**Summary:** Fetch rule by identity hash

**Description:** Returns execution history for a single rule, ordered most recent first.

**cURL:**

```bash
curl -s https://$BASE_URL/api/v1/dq/rules/dfabde6e \
  -H "Authorization: Bearer $TOKEN"
```

**Returns:** JSON with `rule` (identity, name, dimension, model, definition) and `runs[]` — each run has `outcome`, `start_ts`, `diagnostics`, and a link to the parent run.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://v2.dataos.info/concepts/foundations/activation/apis/api-reference/data-quality.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
