Skip to main content
GET
https://sandbox.getcollate.io/api
/
v1
/
dataQuality
/
testDefinitions
GET /v1/dataQuality/testDefinitions
from metadata.sdk import configure
from metadata.sdk.entities import TestDefinitions

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

# List first page
definitions = TestDefinitions.list(limit=50)
for td in definitions.data:
    print(f"{td.name} ({td.entityType})")

# List all with auto-pagination
for td in TestDefinitions.list_all():
    print(f"{td.name}: {td.description}")

# Filter by entity type
column_defs = TestDefinitions.list(
    entityType="COLUMN",
    fields=["owners"],
    limit=50
)

for td in column_defs.data:
    print(f"{td.name} - supports: {td.supportedDataTypes}")
{
  "data": [
    {
      "id": "a636d153-f1e8-45be-86d3-52aa6b71730d",
      "name": "columnValueLengthsToBeBetween",
      "displayName": "Column Value Lengths To Be Between",
      "fullyQualifiedName": "columnValueLengthsToBeBetween",
      "description": "This test definition validates that the lengths of column values are between a specified range...",
      "version": 0.1,
      "updatedAt": 1769982618104,
      "updatedBy": "admin",
      "testPlatforms": ["OpenMetadata"],
      "supportedDataTypes": ["STRING", "VARCHAR", "CHAR", "TEXT"],
      "parameterDefinition": [
        {
          "name": "minLength",
          "dataType": "INT",
          "required": false,
          "description": "The min length"
        },
        {
          "name": "maxLength",
          "dataType": "INT",
          "required": false,
          "description": "The max length"
        }
      ],
      "entityType": "COLUMN",
      "provider": "system",
      "deleted": false
    }
  ],
  "paging": {
    "after": "...",
    "total": 25
  }
}

List Test Definitions

List all test definitions with optional filtering and pagination.

Query Parameters

limit
integer
default:"10"
Maximum number of results to return (max: 1000000).
before
string
Cursor for backward pagination.
after
string
Cursor for forward pagination.
fields
string
Comma-separated list of fields to include: owners.
include
string
default:"non-deleted"
Include all, deleted, or non-deleted entities.
testPlatform
string
Filter by test platform (e.g., OpenMetadata).
entityType
string
Filter by entity type: TABLE or COLUMN.
supportedDataType
string
Filter by supported data type (e.g., STRING, INT, DOUBLE).
GET /v1/dataQuality/testDefinitions
from metadata.sdk import configure
from metadata.sdk.entities import TestDefinitions

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

# List first page
definitions = TestDefinitions.list(limit=50)
for td in definitions.data:
    print(f"{td.name} ({td.entityType})")

# List all with auto-pagination
for td in TestDefinitions.list_all():
    print(f"{td.name}: {td.description}")

# Filter by entity type
column_defs = TestDefinitions.list(
    entityType="COLUMN",
    fields=["owners"],
    limit=50
)

for td in column_defs.data:
    print(f"{td.name} - supports: {td.supportedDataTypes}")
{
  "data": [
    {
      "id": "a636d153-f1e8-45be-86d3-52aa6b71730d",
      "name": "columnValueLengthsToBeBetween",
      "displayName": "Column Value Lengths To Be Between",
      "fullyQualifiedName": "columnValueLengthsToBeBetween",
      "description": "This test definition validates that the lengths of column values are between a specified range...",
      "version": 0.1,
      "updatedAt": 1769982618104,
      "updatedBy": "admin",
      "testPlatforms": ["OpenMetadata"],
      "supportedDataTypes": ["STRING", "VARCHAR", "CHAR", "TEXT"],
      "parameterDefinition": [
        {
          "name": "minLength",
          "dataType": "INT",
          "required": false,
          "description": "The min length"
        },
        {
          "name": "maxLength",
          "dataType": "INT",
          "required": false,
          "description": "The max length"
        }
      ],
      "entityType": "COLUMN",
      "provider": "system",
      "deleted": false
    }
  ],
  "paging": {
    "after": "...",
    "total": 25
  }
}

Returns

Returns a paginated list of test definition objects. Use the fields parameter to request additional data.

Response

data
array
Array of test definition objects.
paging
object
Pagination information.

Error Handling

CodeError TypeDescription
401UNAUTHORIZEDInvalid or missing authentication token
403FORBIDDENUser lacks permission to list test definitions