from metadata.sdk import configurefrom metadata.sdk.entities import TestCasesconfigure( host="https://your-company.open-metadata.org/api", jwt_token="your-jwt-token")# List first pagecases = TestCases.list(fields=["testDefinition", "testSuite"], limit=50)for tc in cases.entities: print(f"{tc.fullyQualifiedName.root}")# List all with auto-paginationfor tc in TestCases.list_all(fields=["testDefinition", "testSuite"]): print(f"{tc.name.root}: {tc.entityLink.root}")# Filter by test suitecases = TestCases.list( filters={"testSuiteId": "e86a9a11-852f-4bac-b5a7-993b2bbbb572"}, fields=["owners", "testDefinition", "testSuite", "testCaseResult"], limit=50)for tc in cases.entities: print(f"{tc.name.root} - {tc.testDefinition.name}")# Filter by entity linkcases = TestCases.list( filters={"entityLink": "<#E::table::sample_data.ecommerce_db.shopify.dim_address>"}, fields=["testDefinition", "testSuite", "testCaseResult"], limit=50)
import org.openmetadata.sdk.models.ListParams;// client is an initialized OpenMetadataClient.// List first pagevar params = new ListParams().setLimit(50);var page = client.testCases().list(params);for (var item : page.getData()) { System.out.println(item.getFullyQualifiedName());}// Filter by test suite with fieldsvar filtered = new ListParams() .addFilter("testSuiteId", "e86a9a11-852f-4bac-b5a7-993b2bbbb572") .setFields("testCaseResult,testDefinition") .setLimit(50);var filteredPage = client.testCases().list(filtered);for (var item : filteredPage.getData()) { System.out.println(item.getFullyQualifiedName());}
# List allcurl "{base_url}/api/v1/dataQuality/testCases?limit=50" \ -H "Authorization: Bearer {access_token}"# Filter by test suitecurl "{base_url}/api/v1/dataQuality/testCases?testSuiteId=e86a9a11-852f-4bac-b5a7-993b2bbbb572&limit=50" \ -H "Authorization: Bearer {access_token}"# Filter by entity linkcurl "{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 orderingcurl "{base_url}/api/v1/dataQuality/testCases?fields=testCaseResult,testDefinition&orderByLastExecutionDate=true&limit=50" \ -H "Authorization: Bearer {access_token}"
List all test cases with optional filtering and pagination
GET
/
v1
/
dataQuality
/
testCases
GET /v1/dataQuality/testCases
from metadata.sdk import configurefrom metadata.sdk.entities import TestCasesconfigure( host="https://your-company.open-metadata.org/api", jwt_token="your-jwt-token")# List first pagecases = TestCases.list(fields=["testDefinition", "testSuite"], limit=50)for tc in cases.entities: print(f"{tc.fullyQualifiedName.root}")# List all with auto-paginationfor tc in TestCases.list_all(fields=["testDefinition", "testSuite"]): print(f"{tc.name.root}: {tc.entityLink.root}")# Filter by test suitecases = TestCases.list( filters={"testSuiteId": "e86a9a11-852f-4bac-b5a7-993b2bbbb572"}, fields=["owners", "testDefinition", "testSuite", "testCaseResult"], limit=50)for tc in cases.entities: print(f"{tc.name.root} - {tc.testDefinition.name}")# Filter by entity linkcases = TestCases.list( filters={"entityLink": "<#E::table::sample_data.ecommerce_db.shopify.dim_address>"}, fields=["testDefinition", "testSuite", "testCaseResult"], limit=50)
import org.openmetadata.sdk.models.ListParams;// client is an initialized OpenMetadataClient.// List first pagevar params = new ListParams().setLimit(50);var page = client.testCases().list(params);for (var item : page.getData()) { System.out.println(item.getFullyQualifiedName());}// Filter by test suite with fieldsvar filtered = new ListParams() .addFilter("testSuiteId", "e86a9a11-852f-4bac-b5a7-993b2bbbb572") .setFields("testCaseResult,testDefinition") .setLimit(50);var filteredPage = client.testCases().list(filtered);for (var item : filteredPage.getData()) { System.out.println(item.getFullyQualifiedName());}
# List allcurl "{base_url}/api/v1/dataQuality/testCases?limit=50" \ -H "Authorization: Bearer {access_token}"# Filter by test suitecurl "{base_url}/api/v1/dataQuality/testCases?testSuiteId=e86a9a11-852f-4bac-b5a7-993b2bbbb572&limit=50" \ -H "Authorization: Bearer {access_token}"# Filter by entity linkcurl "{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 orderingcurl "{base_url}/api/v1/dataQuality/testCases?fields=testCaseResult,testDefinition&orderByLastExecutionDate=true&limit=50" \ -H "Authorization: Bearer {access_token}"
List all test cases 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, testSuite, testDefinition, testCaseResult.
string
default:"non-deleted"
Include all, deleted, or non-deleted entities.
string
Filter by test suite UUID.
string
Filter by entity link (URL-encoded). Returns test cases for a specific table or column.
boolean
default:"false"
Include test cases from all test suites, not just the primary executable suite.
boolean
default:"false"
Order results by the most recent test execution date.
Filter by Multiple Statuses
To filter by status, use the search endpoint GET /v1/dataQuality/testCases/search/list with the testCaseStatus parameter. Pass several statuses by repeating the parameter or separating values with commas. A test case matches if it has any of the statuses.
string
One or more of Success, Failed, Aborted, Queued. Values are not case sensitive. An unknown value returns a 400 error that lists the allowed values. Other filters, such as entityLink and testCaseType, still apply together with this one.
GET /v1/dataQuality/testCases/search/list?testCaseStatus=Failed&testCaseStatus=AbortedGET /v1/dataQuality/testCases/search/list?testCaseStatus=Failed,Aborted
This endpoint (GET /v1/dataQuality/testCases) accepts only one status.
GET /v1/dataQuality/testCases
from metadata.sdk import configurefrom metadata.sdk.entities import TestCasesconfigure( host="https://your-company.open-metadata.org/api", jwt_token="your-jwt-token")# List first pagecases = TestCases.list(fields=["testDefinition", "testSuite"], limit=50)for tc in cases.entities: print(f"{tc.fullyQualifiedName.root}")# List all with auto-paginationfor tc in TestCases.list_all(fields=["testDefinition", "testSuite"]): print(f"{tc.name.root}: {tc.entityLink.root}")# Filter by test suitecases = TestCases.list( filters={"testSuiteId": "e86a9a11-852f-4bac-b5a7-993b2bbbb572"}, fields=["owners", "testDefinition", "testSuite", "testCaseResult"], limit=50)for tc in cases.entities: print(f"{tc.name.root} - {tc.testDefinition.name}")# Filter by entity linkcases = TestCases.list( filters={"entityLink": "<#E::table::sample_data.ecommerce_db.shopify.dim_address>"}, fields=["testDefinition", "testSuite", "testCaseResult"], limit=50)
import org.openmetadata.sdk.models.ListParams;// client is an initialized OpenMetadataClient.// List first pagevar params = new ListParams().setLimit(50);var page = client.testCases().list(params);for (var item : page.getData()) { System.out.println(item.getFullyQualifiedName());}// Filter by test suite with fieldsvar filtered = new ListParams() .addFilter("testSuiteId", "e86a9a11-852f-4bac-b5a7-993b2bbbb572") .setFields("testCaseResult,testDefinition") .setLimit(50);var filteredPage = client.testCases().list(filtered);for (var item : filteredPage.getData()) { System.out.println(item.getFullyQualifiedName());}
# List allcurl "{base_url}/api/v1/dataQuality/testCases?limit=50" \ -H "Authorization: Bearer {access_token}"# Filter by test suitecurl "{base_url}/api/v1/dataQuality/testCases?testSuiteId=e86a9a11-852f-4bac-b5a7-993b2bbbb572&limit=50" \ -H "Authorization: Bearer {access_token}"# Filter by entity linkcurl "{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 orderingcurl "{base_url}/api/v1/dataQuality/testCases?fields=testCaseResult,testDefinition&orderByLastExecutionDate=true&limit=50" \ -H "Authorization: Bearer {access_token}"