GET /v1/dataQuality/testDefinitions
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.data:
print(f"{td.name} ({td.entityType})")
# List all with auto-pagination
for td in TestDefinitions.list_all():
print(f"{td.name}: {td.description}")
# Filter by entity type
column_defs = TestDefinitions.list(
entityType="COLUMN",
fields=["owners"],
limit=50
)
for td in column_defs.data:
print(f"{td.name} - supports: {td.supportedDataTypes}")
import static org.openmetadata.sdk.fluent.TestDefinitions.*;
// List first page
var result = TestDefinitions.list()
.limit(50)
.execute();
for (var td : result.getData()) {
System.out.println(td.getName() + " (" + td.getEntityType() + ")");
}
// Filter by entity type
var result = TestDefinitions.list()
.entityType("COLUMN")
.limit(50)
.execute();
# 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}"
{
"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
}
}
List Test Definitions
List all test definitions with optional filtering and pagination
GET
/
v1
/
dataQuality
/
testDefinitions
GET /v1/dataQuality/testDefinitions
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.data:
print(f"{td.name} ({td.entityType})")
# List all with auto-pagination
for td in TestDefinitions.list_all():
print(f"{td.name}: {td.description}")
# Filter by entity type
column_defs = TestDefinitions.list(
entityType="COLUMN",
fields=["owners"],
limit=50
)
for td in column_defs.data:
print(f"{td.name} - supports: {td.supportedDataTypes}")
import static org.openmetadata.sdk.fluent.TestDefinitions.*;
// List first page
var result = TestDefinitions.list()
.limit(50)
.execute();
for (var td : result.getData()) {
System.out.println(td.getName() + " (" + td.getEntityType() + ")");
}
// Filter by entity type
var result = TestDefinitions.list()
.entityType("COLUMN")
.limit(50)
.execute();
# 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}"
{
"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
}
}
List Test Definitions
List all test definitions with optional filtering and pagination.Query Parameters
Maximum number of results to return (max: 1000000).
Cursor for backward pagination.
Cursor for forward pagination.
Comma-separated list of fields to include:
owners.Include
all, deleted, or non-deleted entities.Filter by test platform (e.g.,
OpenMetadata).Filter by entity type:
TABLE or COLUMN.Filter by supported data type (e.g.,
STRING, INT, DOUBLE).GET /v1/dataQuality/testDefinitions
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.data:
print(f"{td.name} ({td.entityType})")
# List all with auto-pagination
for td in TestDefinitions.list_all():
print(f"{td.name}: {td.description}")
# Filter by entity type
column_defs = TestDefinitions.list(
entityType="COLUMN",
fields=["owners"],
limit=50
)
for td in column_defs.data:
print(f"{td.name} - supports: {td.supportedDataTypes}")
import static org.openmetadata.sdk.fluent.TestDefinitions.*;
// List first page
var result = TestDefinitions.list()
.limit(50)
.execute();
for (var td : result.getData()) {
System.out.println(td.getName() + " (" + td.getEntityType() + ")");
}
// Filter by entity type
var result = TestDefinitions.list()
.entityType("COLUMN")
.limit(50)
.execute();
# 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}"
{
"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 thefields parameter to request additional data.
Response
Array of test definition objects.
Show properties
Show properties
Unique identifier for the test definition (UUID format).
Test definition name.
Fully qualified name (same as name for test definitions).
Human-readable display name.
Description of what the test validates.
Target entity type:
TABLE or COLUMN.Supported test platforms (e.g.,
OpenMetadata).Data types this test can be applied to.
Whether the definition is
system (built-in) or user (custom).List of owners. Only included when
fields contains owners.Error Handling
| Code | Error Type | Description |
|---|---|---|
401 | UNAUTHORIZED | Invalid or missing authentication token |
403 | FORBIDDEN | User lacks permission to list test definitions |
Was this page helpful?
⌘I