POST /v1/dataQuality/testDefinitions
Create a Test Definition
Create a custom test definition for data quality validation
POST
POST /v1/dataQuality/testDefinitions
Documentation Index
Fetch the complete documentation index at: https://openmetadata-codex-audit-docs-codebase-alignment.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Create a Test Definition
Create a custom test definition to define organization-specific data quality validation logic.Body Parameters
Name of the test definition. Must be unique across all test definitions.
Human-readable display name for the test definition.
Description of what this test validates, in Markdown format.
The entity type this test targets:
TABLE or COLUMN.Array of supported test platforms. Typically
["OpenMetadata"].Array of data types this test can be applied to (e.g.,
STRING, INT, DOUBLE, VARCHAR, CHAR, TEXT, NUMBER, FLOAT, BOOLEAN). Only applicable when entityType is COLUMN.Array of parameter definitions that this test accepts.
Array of owner references (users or teams) to assign.
POST /v1/dataQuality/testDefinitions
Returns
Returns the created test definition object with all specified properties and system-generated fields.Response
Unique identifier for the test definition (UUID format).
Test definition name.
Fully qualified name (same as name for test definitions).
Human-readable display name.
Description of what the test validates.
Target entity type:
TABLE or COLUMN.Supported test platforms.
Data types this test can be applied to.
Parameters accepted by this test definition.
Always
user for custom test definitions.Version number for the entity (starts at 0.1).
Create or Update (PUT)
UsePUT /v1/dataQuality/testDefinitions instead of POST to perform an upsert. If a test definition with the same name already exists, it will be updated; otherwise, a new test definition is created. The request body is the same as POST.
PUT will not return a 409 conflict error if the entity already exists — it will update the existing entity instead.Error Handling
| Code | Error Type | Description |
|---|---|---|
400 | BAD_REQUEST | Invalid request body or missing required fields |
401 | UNAUTHORIZED | Invalid or missing authentication token |
403 | FORBIDDEN | User lacks permission to create test definitions |
409 | ENTITY_ALREADY_EXISTS | Test definition with same name already exists (POST only) |