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

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

# List first page
cases = TestCases.list(limit=50)
for tc in cases.data:
    print(f"{tc.fullyQualifiedName}")

# List all with auto-pagination
for tc in TestCases.list_all():
    print(f"{tc.name}: {tc.entityLink}")

# Filter by test suite
cases = TestCases.list(
    testSuiteId="e86a9a11-852f-4bac-b5a7-993b2bbbb572",
    fields=["owners", "testDefinition", "testCaseResult"],
    limit=50
)

for tc in cases.data:
    print(f"{tc.name} - {tc.testDefinition.name}")

# Filter by entity link
cases = TestCases.list(
    entityLink="<#E::table::sample_data.ecommerce_db.shopify.dim_address>",
    fields=["testCaseResult"],
    limit=50
)
{
  "data": [
    {
      "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": []
    }
  ],
  "paging": {
    "after": "...",
    "total": 8
  }
}

List Test Cases

List all test cases 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, testSuite, testDefinition, testCaseResult.
include
string
default:"non-deleted"
Include all, deleted, or non-deleted entities.
testSuiteId
string
Filter by test suite UUID.
Filter by entity link (URL-encoded). Returns test cases for a specific table or column.
includeAllTests
boolean
default:"false"
Include test cases from all test suites, not just the primary executable suite.
orderByLastExecutionDate
boolean
default:"false"
Order results by the most recent test execution date.
GET /v1/dataQuality/testCases
from metadata.sdk import configure
from metadata.sdk.entities import TestCases

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

# List first page
cases = TestCases.list(limit=50)
for tc in cases.data:
    print(f"{tc.fullyQualifiedName}")

# List all with auto-pagination
for tc in TestCases.list_all():
    print(f"{tc.name}: {tc.entityLink}")

# Filter by test suite
cases = TestCases.list(
    testSuiteId="e86a9a11-852f-4bac-b5a7-993b2bbbb572",
    fields=["owners", "testDefinition", "testCaseResult"],
    limit=50
)

for tc in cases.data:
    print(f"{tc.name} - {tc.testDefinition.name}")

# Filter by entity link
cases = TestCases.list(
    entityLink="<#E::table::sample_data.ecommerce_db.shopify.dim_address>",
    fields=["testCaseResult"],
    limit=50
)
{
  "data": [
    {
      "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": []
    }
  ],
  "paging": {
    "after": "...",
    "total": 8
  }
}

Returns

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

Response

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

Error Handling

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