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
integer
default:"10"
Maximum number of results to return (max: 1000000).
string
Cursor for backward pagination.
string
Cursor for forward pagination.
string
Comma-separated list of fields to include:
owners.string
default:"non-deleted"
Include
all, deleted, or non-deleted entities.string
Filter by test platform (e.g.,
OpenMetadata).string
Filter by entity type:
TABLE or COLUMN.string
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
Array of test definition objects.
Show properties
Show properties
string
Unique identifier for the test definition (UUID format).
string
Test definition name.
string
Fully qualified name (same as name for test definitions).
string
Human-readable display name.
string
Description of what the test validates.
string
Target entity type:
TABLE or COLUMN.array
Supported test platforms (e.g.,
OpenMetadata).array
Data types this test can be applied to.
array
string
Whether the definition is
system (built-in) or user (custom).array
List of owners. Only included when
fields contains owners.object
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