DELETE /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"
)
# Soft delete by ID
TestCases.delete("c1bce355-fa2f-48c6-ab4d-fad722a56ed7")
# Hard delete
TestCases.delete(
"c1bce355-fa2f-48c6-ab4d-fad722a56ed7",
hard_delete=True
)
# Delete by name
TestCases.delete_by_name(
"sample_data.ecommerce_db.shopify.dim_address.shop_id.column_value_max_to_be_between"
)
# Restore a soft-deleted test case
TestCases.restore("c1bce355-fa2f-48c6-ab4d-fad722a56ed7")
import static org.openmetadata.sdk.fluent.TestCases.*;
// Soft delete
TestCases.delete("c1bce355-fa2f-48c6-ab4d-fad722a56ed7").execute();
// Hard delete
TestCases.delete("c1bce355-fa2f-48c6-ab4d-fad722a56ed7")
.hardDelete()
.execute();
// Restore
TestCases.restore("c1bce355-fa2f-48c6-ab4d-fad722a56ed7");
# Soft delete by ID
curl -X DELETE "{base_url}/api/v1/dataQuality/testCases/c1bce355-fa2f-48c6-ab4d-fad722a56ed7" \
-H "Authorization: Bearer {access_token}"
# Hard delete
curl -X DELETE "{base_url}/api/v1/dataQuality/testCases/c1bce355-fa2f-48c6-ab4d-fad722a56ed7?hardDelete=true" \
-H "Authorization: Bearer {access_token}"
# Delete by name
curl -X DELETE "{base_url}/api/v1/dataQuality/testCases/name/sample_data.ecommerce_db.shopify.dim_address.shop_id.column_value_max_to_be_between" \
-H "Authorization: Bearer {access_token}"
# Restore soft-deleted test case
curl -X PUT "{base_url}/api/v1/dataQuality/testCases/restore" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{"id": "c1bce355-fa2f-48c6-ab4d-fad722a56ed7"}'
{
"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.2,
"updatedAt": 1769982800000,
"updatedBy": "admin",
"testDefinition": {
"id": "def-id",
"type": "testDefinition",
"name": "columnValueMaxToBeBetween"
},
"testSuite": {
"id": "suite-id",
"type": "testSuite",
"name": "b5fcae09-02c2-4c0b-8c4a-5b52d650e592"
},
"entityLink": "<#E::table::sample_data.ecommerce_db.shopify.dim_address::columns::shop_id>",
"deleted": true,
"owners": []
}
Delete a Test Case
Delete a test case by ID or name, with soft/hard delete options
DELETE
/
v1
/
dataQuality
/
testCases
/
{id}
DELETE /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"
)
# Soft delete by ID
TestCases.delete("c1bce355-fa2f-48c6-ab4d-fad722a56ed7")
# Hard delete
TestCases.delete(
"c1bce355-fa2f-48c6-ab4d-fad722a56ed7",
hard_delete=True
)
# Delete by name
TestCases.delete_by_name(
"sample_data.ecommerce_db.shopify.dim_address.shop_id.column_value_max_to_be_between"
)
# Restore a soft-deleted test case
TestCases.restore("c1bce355-fa2f-48c6-ab4d-fad722a56ed7")
import static org.openmetadata.sdk.fluent.TestCases.*;
// Soft delete
TestCases.delete("c1bce355-fa2f-48c6-ab4d-fad722a56ed7").execute();
// Hard delete
TestCases.delete("c1bce355-fa2f-48c6-ab4d-fad722a56ed7")
.hardDelete()
.execute();
// Restore
TestCases.restore("c1bce355-fa2f-48c6-ab4d-fad722a56ed7");
# Soft delete by ID
curl -X DELETE "{base_url}/api/v1/dataQuality/testCases/c1bce355-fa2f-48c6-ab4d-fad722a56ed7" \
-H "Authorization: Bearer {access_token}"
# Hard delete
curl -X DELETE "{base_url}/api/v1/dataQuality/testCases/c1bce355-fa2f-48c6-ab4d-fad722a56ed7?hardDelete=true" \
-H "Authorization: Bearer {access_token}"
# Delete by name
curl -X DELETE "{base_url}/api/v1/dataQuality/testCases/name/sample_data.ecommerce_db.shopify.dim_address.shop_id.column_value_max_to_be_between" \
-H "Authorization: Bearer {access_token}"
# Restore soft-deleted test case
curl -X PUT "{base_url}/api/v1/dataQuality/testCases/restore" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{"id": "c1bce355-fa2f-48c6-ab4d-fad722a56ed7"}'
{
"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.2,
"updatedAt": 1769982800000,
"updatedBy": "admin",
"testDefinition": {
"id": "def-id",
"type": "testDefinition",
"name": "columnValueMaxToBeBetween"
},
"testSuite": {
"id": "suite-id",
"type": "testSuite",
"name": "b5fcae09-02c2-4c0b-8c4a-5b52d650e592"
},
"entityLink": "<#E::table::sample_data.ecommerce_db.shopify.dim_address::columns::shop_id>",
"deleted": true,
"owners": []
}
Delete a Test Case
Delete a test case by ID or fully qualified name. Supports soft delete (default), hard delete, and restore operations.Delete by ID
string
required
UUID of the test case to delete.
boolean
default:"false"
Recursively delete child entities.
boolean
default:"false"
Permanently delete the test case. If
false, the test case is soft-deleted and can be restored.Delete by Name
UseDELETE /v1/dataQuality/testCases/name/{fqn} to delete by fully qualified name.
string
required
Fully qualified name of the test case.
boolean
default:"false"
Recursively delete child entities.
boolean
default:"false"
Permanently delete the test case.
Restore a Soft-Deleted Test Case
UsePUT /v1/dataQuality/testCases/restore to restore a soft-deleted test case.
string
required
UUID of the soft-deleted test case to restore.
DELETE /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"
)
# Soft delete by ID
TestCases.delete("c1bce355-fa2f-48c6-ab4d-fad722a56ed7")
# Hard delete
TestCases.delete(
"c1bce355-fa2f-48c6-ab4d-fad722a56ed7",
hard_delete=True
)
# Delete by name
TestCases.delete_by_name(
"sample_data.ecommerce_db.shopify.dim_address.shop_id.column_value_max_to_be_between"
)
# Restore a soft-deleted test case
TestCases.restore("c1bce355-fa2f-48c6-ab4d-fad722a56ed7")
import static org.openmetadata.sdk.fluent.TestCases.*;
// Soft delete
TestCases.delete("c1bce355-fa2f-48c6-ab4d-fad722a56ed7").execute();
// Hard delete
TestCases.delete("c1bce355-fa2f-48c6-ab4d-fad722a56ed7")
.hardDelete()
.execute();
// Restore
TestCases.restore("c1bce355-fa2f-48c6-ab4d-fad722a56ed7");
# Soft delete by ID
curl -X DELETE "{base_url}/api/v1/dataQuality/testCases/c1bce355-fa2f-48c6-ab4d-fad722a56ed7" \
-H "Authorization: Bearer {access_token}"
# Hard delete
curl -X DELETE "{base_url}/api/v1/dataQuality/testCases/c1bce355-fa2f-48c6-ab4d-fad722a56ed7?hardDelete=true" \
-H "Authorization: Bearer {access_token}"
# Delete by name
curl -X DELETE "{base_url}/api/v1/dataQuality/testCases/name/sample_data.ecommerce_db.shopify.dim_address.shop_id.column_value_max_to_be_between" \
-H "Authorization: Bearer {access_token}"
# Restore soft-deleted test case
curl -X PUT "{base_url}/api/v1/dataQuality/testCases/restore" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{"id": "c1bce355-fa2f-48c6-ab4d-fad722a56ed7"}'
{
"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.2,
"updatedAt": 1769982800000,
"updatedBy": "admin",
"testDefinition": {
"id": "def-id",
"type": "testDefinition",
"name": "columnValueMaxToBeBetween"
},
"testSuite": {
"id": "suite-id",
"type": "testSuite",
"name": "b5fcae09-02c2-4c0b-8c4a-5b52d650e592"
},
"entityLink": "<#E::table::sample_data.ecommerce_db.shopify.dim_address::columns::shop_id>",
"deleted": true,
"owners": []
}
Returns
Soft delete returns the test case object withdeleted: true. Hard delete returns no content (204). Restore returns the restored test case object.
Error Handling
| Code | Error Type | Description |
|---|---|---|
401 | UNAUTHORIZED | Invalid or missing authentication token |
403 | FORBIDDEN | User lacks permission to delete this test case |
404 | NOT_FOUND | Test case with given ID or FQN does not exist |
Was this page helpful?
⌘I