Documentation Index
Fetch the complete documentation index at: https://openmetadata-feat-feat-2mbfixdeploy.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Retrieve a Test Case
Get a single test case by its unique ID or fully qualified name.
Get by ID
UUID of the test case to retrieve.
Comma-separated list of fields to include: owners, testSuite, testDefinition, testCaseResult.
include
string
default:"non-deleted"
Include all, deleted, or non-deleted entities.
Get by Fully Qualified Name
Use GET /v1/dataQuality/testCases/name/{fqn} to retrieve by fully qualified name.
Fully qualified name of the test case (e.g., sample_data.ecommerce_db.shopify.dim_address.shop_id.column_value_max_to_be_between).
Comma-separated list of fields to include: owners, testSuite, testDefinition, testCaseResult.
include
string
default:"non-deleted"
Include all, deleted, or non-deleted entities.
GET /v1/dataQuality/testCases/{id}
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"
)
# Get by ID
tc = TestCases.retrieve("c1bce355-fa2f-48c6-ab4d-fad722a56ed7")
print(f"{tc.fullyQualifiedName}: {tc.entityLink}")
# Get by ID with fields
tc = TestCases.retrieve(
"c1bce355-fa2f-48c6-ab4d-fad722a56ed7",
fields=["owners", "testDefinition", "testCaseResult"]
)
# Get by fully qualified name
tc = TestCases.retrieve_by_name(
"sample_data.ecommerce_db.shopify.dim_address.shop_id.column_value_max_to_be_between"
)
# Get by name with fields
tc = TestCases.retrieve_by_name(
"sample_data.ecommerce_db.shopify.dim_address.shop_id.column_value_max_to_be_between",
fields=["testCaseResult", "testDefinition"]
)
{
"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": []
}
Returns
Returns a test case object with all requested fields populated.
Response
Unique identifier for the test case (UUID format).
Fully qualified name of the test case.
Entity link to the target table or column.
Reference to the test definition.
Reference to the test suite.
Parameter values for this test case.
Most recent test result. Only included when fields contains testCaseResult.
Version number for the entity.
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 view this test case |
404 | NOT_FOUND | Test case with given ID or FQN does not exist |