GET /v1/dataQuality/testCases
from metadata.sdk import configure
from metadata.sdk.entities import TestCases
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
# List first page
cases = TestCases.list(limit=50)
for tc in cases.data:
print(f"{tc.fullyQualifiedName}")
# List all with auto-pagination
for tc in TestCases.list_all():
print(f"{tc.name}: {tc.entityLink}")
# Filter by test suite
cases = TestCases.list(
testSuiteId="e86a9a11-852f-4bac-b5a7-993b2bbbb572",
fields=["owners", "testDefinition", "testCaseResult"],
limit=50
)
for tc in cases.data:
print(f"{tc.name} - {tc.testDefinition.name}")
# Filter by entity link
cases = TestCases.list(
entityLink="<#E::table::sample_data.ecommerce_db.shopify.dim_address>",
fields=["testCaseResult"],
limit=50
)
import static org.openmetadata.sdk.fluent.TestCases.*;
// List first page
var result = TestCases.list()
.limit(50)
.execute();
for (var tc : result.getData()) {
System.out.println(tc.getFullyQualifiedName());
}
// Filter by test suite
var result = TestCases.list()
.testSuiteId("e86a9a11-852f-4bac-b5a7-993b2bbbb572")
.fields("owners", "testDefinition", "testCaseResult")
.limit(50)
.execute();
# List all
curl "{base_url}/api/v1/dataQuality/testCases?limit=50" \
-H "Authorization: Bearer {access_token}"
# Filter by test suite
curl "{base_url}/api/v1/dataQuality/testCases?testSuiteId=e86a9a11-852f-4bac-b5a7-993b2bbbb572&limit=50" \
-H "Authorization: Bearer {access_token}"
# Filter by entity link
curl "{base_url}/api/v1/dataQuality/testCases?entityLink=%3C%23E%3A%3Atable%3A%3Asample_data.ecommerce_db.shopify.dim_address%3E&limit=50" \
-H "Authorization: Bearer {access_token}"
# With fields and ordering
curl "{base_url}/api/v1/dataQuality/testCases?fields=testCaseResult,testDefinition&orderByLastExecutionDate=true&limit=50" \
-H "Authorization: Bearer {access_token}"
{
"data": [
{
"id": "c1bce355-fa2f-48c6-ab4d-fad722a56ed7",
"name": "column_value_max_to_be_between",
"fullyQualifiedName": "sample_data.ecommerce_db.shopify.dim_address.shop_id.column_value_max_to_be_between",
"version": 0.1,
"updatedAt": 1769982759035,
"updatedBy": "admin",
"testDefinition": {
"id": "def-id",
"type": "testDefinition",
"name": "columnValueMaxToBeBetween",
"fullyQualifiedName": "columnValueMaxToBeBetween",
"deleted": false
},
"testSuite": {
"id": "suite-id",
"type": "testSuite",
"name": "b5fcae09-02c2-4c0b-8c4a-5b52d650e592",
"deleted": false
},
"entityLink": "<#E::table::sample_data.ecommerce_db.shopify.dim_address::columns::shop_id>",
"parameterValues": [
{"name": "minValueForMaxInCol", "value": "1"},
{"name": "maxValueForMaxInCol", "value": "100"}
],
"deleted": false,
"owners": []
}
],
"paging": {
"after": "...",
"total": 8
}
}
List Test Cases
List all test cases with optional filtering and pagination
GET
/
v1
/
dataQuality
/
testCases
GET /v1/dataQuality/testCases
from metadata.sdk import configure
from metadata.sdk.entities import TestCases
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
# List first page
cases = TestCases.list(limit=50)
for tc in cases.data:
print(f"{tc.fullyQualifiedName}")
# List all with auto-pagination
for tc in TestCases.list_all():
print(f"{tc.name}: {tc.entityLink}")
# Filter by test suite
cases = TestCases.list(
testSuiteId="e86a9a11-852f-4bac-b5a7-993b2bbbb572",
fields=["owners", "testDefinition", "testCaseResult"],
limit=50
)
for tc in cases.data:
print(f"{tc.name} - {tc.testDefinition.name}")
# Filter by entity link
cases = TestCases.list(
entityLink="<#E::table::sample_data.ecommerce_db.shopify.dim_address>",
fields=["testCaseResult"],
limit=50
)
import static org.openmetadata.sdk.fluent.TestCases.*;
// List first page
var result = TestCases.list()
.limit(50)
.execute();
for (var tc : result.getData()) {
System.out.println(tc.getFullyQualifiedName());
}
// Filter by test suite
var result = TestCases.list()
.testSuiteId("e86a9a11-852f-4bac-b5a7-993b2bbbb572")
.fields("owners", "testDefinition", "testCaseResult")
.limit(50)
.execute();
# List all
curl "{base_url}/api/v1/dataQuality/testCases?limit=50" \
-H "Authorization: Bearer {access_token}"
# Filter by test suite
curl "{base_url}/api/v1/dataQuality/testCases?testSuiteId=e86a9a11-852f-4bac-b5a7-993b2bbbb572&limit=50" \
-H "Authorization: Bearer {access_token}"
# Filter by entity link
curl "{base_url}/api/v1/dataQuality/testCases?entityLink=%3C%23E%3A%3Atable%3A%3Asample_data.ecommerce_db.shopify.dim_address%3E&limit=50" \
-H "Authorization: Bearer {access_token}"
# With fields and ordering
curl "{base_url}/api/v1/dataQuality/testCases?fields=testCaseResult,testDefinition&orderByLastExecutionDate=true&limit=50" \
-H "Authorization: Bearer {access_token}"
{
"data": [
{
"id": "c1bce355-fa2f-48c6-ab4d-fad722a56ed7",
"name": "column_value_max_to_be_between",
"fullyQualifiedName": "sample_data.ecommerce_db.shopify.dim_address.shop_id.column_value_max_to_be_between",
"version": 0.1,
"updatedAt": 1769982759035,
"updatedBy": "admin",
"testDefinition": {
"id": "def-id",
"type": "testDefinition",
"name": "columnValueMaxToBeBetween",
"fullyQualifiedName": "columnValueMaxToBeBetween",
"deleted": false
},
"testSuite": {
"id": "suite-id",
"type": "testSuite",
"name": "b5fcae09-02c2-4c0b-8c4a-5b52d650e592",
"deleted": false
},
"entityLink": "<#E::table::sample_data.ecommerce_db.shopify.dim_address::columns::shop_id>",
"parameterValues": [
{"name": "minValueForMaxInCol", "value": "1"},
{"name": "maxValueForMaxInCol", "value": "100"}
],
"deleted": false,
"owners": []
}
],
"paging": {
"after": "...",
"total": 8
}
}
List Test Cases
List all test cases 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, testSuite, testDefinition, testCaseResult.Include
all, deleted, or non-deleted entities.Filter by test suite UUID.
Filter by entity link (URL-encoded). Returns test cases for a specific table or column.
Include test cases from all test suites, not just the primary executable suite.
Order results by the most recent test execution date.
GET /v1/dataQuality/testCases
from metadata.sdk import configure
from metadata.sdk.entities import TestCases
configure(
host="https://your-company.open-metadata.org/api",
jwt_token="your-jwt-token"
)
# List first page
cases = TestCases.list(limit=50)
for tc in cases.data:
print(f"{tc.fullyQualifiedName}")
# List all with auto-pagination
for tc in TestCases.list_all():
print(f"{tc.name}: {tc.entityLink}")
# Filter by test suite
cases = TestCases.list(
testSuiteId="e86a9a11-852f-4bac-b5a7-993b2bbbb572",
fields=["owners", "testDefinition", "testCaseResult"],
limit=50
)
for tc in cases.data:
print(f"{tc.name} - {tc.testDefinition.name}")
# Filter by entity link
cases = TestCases.list(
entityLink="<#E::table::sample_data.ecommerce_db.shopify.dim_address>",
fields=["testCaseResult"],
limit=50
)
import static org.openmetadata.sdk.fluent.TestCases.*;
// List first page
var result = TestCases.list()
.limit(50)
.execute();
for (var tc : result.getData()) {
System.out.println(tc.getFullyQualifiedName());
}
// Filter by test suite
var result = TestCases.list()
.testSuiteId("e86a9a11-852f-4bac-b5a7-993b2bbbb572")
.fields("owners", "testDefinition", "testCaseResult")
.limit(50)
.execute();
# List all
curl "{base_url}/api/v1/dataQuality/testCases?limit=50" \
-H "Authorization: Bearer {access_token}"
# Filter by test suite
curl "{base_url}/api/v1/dataQuality/testCases?testSuiteId=e86a9a11-852f-4bac-b5a7-993b2bbbb572&limit=50" \
-H "Authorization: Bearer {access_token}"
# Filter by entity link
curl "{base_url}/api/v1/dataQuality/testCases?entityLink=%3C%23E%3A%3Atable%3A%3Asample_data.ecommerce_db.shopify.dim_address%3E&limit=50" \
-H "Authorization: Bearer {access_token}"
# With fields and ordering
curl "{base_url}/api/v1/dataQuality/testCases?fields=testCaseResult,testDefinition&orderByLastExecutionDate=true&limit=50" \
-H "Authorization: Bearer {access_token}"
{
"data": [
{
"id": "c1bce355-fa2f-48c6-ab4d-fad722a56ed7",
"name": "column_value_max_to_be_between",
"fullyQualifiedName": "sample_data.ecommerce_db.shopify.dim_address.shop_id.column_value_max_to_be_between",
"version": 0.1,
"updatedAt": 1769982759035,
"updatedBy": "admin",
"testDefinition": {
"id": "def-id",
"type": "testDefinition",
"name": "columnValueMaxToBeBetween",
"fullyQualifiedName": "columnValueMaxToBeBetween",
"deleted": false
},
"testSuite": {
"id": "suite-id",
"type": "testSuite",
"name": "b5fcae09-02c2-4c0b-8c4a-5b52d650e592",
"deleted": false
},
"entityLink": "<#E::table::sample_data.ecommerce_db.shopify.dim_address::columns::shop_id>",
"parameterValues": [
{"name": "minValueForMaxInCol", "value": "1"},
{"name": "maxValueForMaxInCol", "value": "100"}
],
"deleted": false,
"owners": []
}
],
"paging": {
"after": "...",
"total": 8
}
}
Returns
Returns a paginated list of test case objects. Use thefields parameter to request additional data.
Response
Array of test case objects.
Show properties
Show properties
Unique identifier for the test case (UUID format).
Test case name.
Fully qualified name of the test case.
Entity link to the target table or column.
Reference to the test definition. Only included when
fields contains testDefinition.Reference to the test suite. Only included when
fields contains testSuite.Parameter values for this test case.
Most recent test result. Only included when
fields contains testCaseResult.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 cases |
Was this page helpful?
⌘I