> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# List Test Definitions

> List all test definitions with optional filtering and pagination

# List Test Definitions

List all test definitions with optional filtering and pagination.

## Query Parameters

**limit** `integer` (default: 10)

Maximum number of results to return (max: 1000000).

**before** `string`

Cursor for backward pagination.

**after** `string`

Cursor for forward pagination.

**fields** `string`

Comma-separated list of fields to include: `owners`.

**include** `string` (default: non-deleted)

Include `all`, `deleted`, or `non-deleted` entities.

**testPlatform** `string`

Filter by test platform, for example `OpenMetadata`.

**entityType** `string`

Filter by entity type: `TABLE` or `COLUMN`.

**supportedDataType** `string`

Filter by supported data type, for example `STRING`, `INT`, `DOUBLE`.

```python GET /v1/dataQuality/testDefinitions theme={null}
from metadata.sdk import configure
from metadata.sdk.entities import TestDefinitions

configure(
    host="https://your-company.open-metadata.org/api",
    jwt_token="your-jwt-token"
)

# List first page
definitions = TestDefinitions.list(limit=50)
for td in definitions.entities:
    print(f"{td.name.root} ({td.entityType.value})")

# List all with auto-pagination
for td in TestDefinitions.list_all():
    print(f"{td.name.root}: {td.description.root}")

# Filter by entity type
column_defs = TestDefinitions.list(
    filters={"entityType": "COLUMN"},
    fields=["owners"],
    limit=50
)

for td in column_defs.entities:
    print(f"{td.name.root} - supports: {td.supportedDataTypes}")
```

```java GET /v1/dataQuality/testDefinitions theme={null}
import org.openmetadata.sdk.models.ListParams;

// client is an initialized OpenMetadataClient.
// List first page
var params = new ListParams().setLimit(50);
var page = client.testDefinitions().list(params);
for (var item : page.getData()) {
    System.out.println(item.getName());
}

// Filter by entity type
var filtered = new ListParams()
    .addFilter("entityType", "COLUMN")
    .setLimit(50);
var filteredPage = client.testDefinitions().list(filtered);
for (var item : filteredPage.getData()) {
    System.out.println(item.getName());
}
```

```bash GET /v1/dataQuality/testDefinitions theme={null}
# List all
curl "{base_url}/api/v1/dataQuality/testDefinitions?limit=50" \
  -H "Authorization: Bearer {access_token}"

# Filter by entity type
curl "{base_url}/api/v1/dataQuality/testDefinitions?entityType=COLUMN&limit=50" \
  -H "Authorization: Bearer {access_token}"

# Filter by supported data type
curl "{base_url}/api/v1/dataQuality/testDefinitions?supportedDataType=STRING&limit=50" \
  -H "Authorization: Bearer {access_token}"
```

```json Response theme={null}
{
  "data": [
    {
      "id": "a636d153-f1e8-45be-86d3-52aa6b71730d",
      "name": "columnValueLengthsToBeBetween",
      "displayName": "Column Value Lengths To Be Between",
      "fullyQualifiedName": "columnValueLengthsToBeBetween",
      "description": "This test definition validates that the lengths of column values are between a specified range...",
      "version": 0.1,
      "updatedAt": 1769982618104,
      "updatedBy": "admin",
      "testPlatforms": ["OpenMetadata"],
      "supportedDataTypes": ["STRING", "VARCHAR", "CHAR", "TEXT"],
      "parameterDefinition": [
        {
          "name": "minLength",
          "dataType": "INT",
          "required": false,
          "description": "The min length"
        },
        {
          "name": "maxLength",
          "dataType": "INT",
          "required": false,
          "description": "The max length"
        }
      ],
      "entityType": "COLUMN",
      "provider": "system",
      "deleted": false
    }
  ],
  "paging": {
    "after": "...",
    "total": 25
  }
}
```

***

## Returns

Returns a paginated list of test definition objects. Use the `fields` parameter to request additional data.

## Response

**data** `array`

Array of test definition objects.

**properties**

**id** `string`

Unique identifier for the test definition (UUID format).

**name** `string`

Test definition name.

**fullyQualifiedName** `string`

Fully qualified name (same as name for test definitions).

**displayName** `string`

Human-readable display name.

**description** `string`

Description of what the test validates.

**entityType** `string`

Target entity type: `TABLE` or `COLUMN`.

**testPlatforms** `array`

Supported test platforms, for example `OpenMetadata`.

**supportedDataTypes** `array`

Data types this test can be applied to.

**parameterDefinition** `array`

Parameters accepted by this test definition.

**properties**

**name** `string`

Parameter name.

**dataType** `string`

Data type of the parameter, for example `INT`, `STRING`, `BOOLEAN`.

**required** `boolean`

Whether this parameter is required.

**description** `string`

Description of the parameter.

**provider** `string`

Whether the definition is `system` (built-in) or `user` (custom).

**owners** `array`

List of owners. Only included when `fields` contains `owners`.

**paging** `object`

Pagination information.

**properties**

**total** `integer`

Total count of test definitions matching the query.

**after** `string`

Cursor for the next page of results.

**before** `string`

Cursor for the previous page of results.

***

## Error Handling

| Code | Error Type | Description |
| - | - | - |
| `401` | `UNAUTHORIZED` | Invalid or missing authentication token |
| `403` | `FORBIDDEN` | User lacks permission to list test definitions |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.