Skip to main content
POST
https://sandbox.getcollate.io/api
/
v1
/
dataQuality
/
testSuites
POST /v1/dataQuality/testSuites
from metadata.sdk import configure
from metadata.sdk.entities import TestSuites
from metadata.generated.schema.api.tests.createTestSuite import CreateTestSuiteRequest

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

# Create a logical test suite
request = CreateTestSuiteRequest(
    name="critical_data_quality_checks",
    displayName="Critical Data Quality Checks",
    description="Groups all critical data quality test cases across production tables",
    executable=False
)

test_suite = TestSuites.create(request)
print(f"Created: {test_suite.name}")

# Create an executable test suite
request = CreateTestSuiteRequest(
    name="dim_address_test_suite",
    displayName="Data Contract - dim_address",
    description="Executable test suite for dim_address table",
    executable=True
)

test_suite = TestSuites.create(request)
print(f"Created: {test_suite.fullyQualifiedName}")
{
  "id": "e86a9a11-852f-4bac-b5a7-993b2bbbb572",
  "name": "critical_data_quality_checks",
  "displayName": "Critical Data Quality Checks",
  "fullyQualifiedName": "critical_data_quality_checks",
  "description": "Groups all critical data quality test cases across production tables",
  "version": 0.1,
  "updatedAt": 1769982757893,
  "updatedBy": "admin",
  "deleted": false,
  "owners": [],
  "executable": false
}

Create a Test Suite

Create a new test suite. Logical test suites group test cases across multiple tables. Executable test suites are tied to a specific table.

Body Parameters

name
string
required
Name of the test suite. Must be unique.
displayName
string
Human-readable display name for the test suite.
description
string
Description of the test suite in Markdown format.
executable
boolean
required
Set to true for an executable test suite (tied to a table), false for a logical test suite (user-defined grouping).
owners
array
Array of owner references (users or teams) to assign.
POST /v1/dataQuality/testSuites
from metadata.sdk import configure
from metadata.sdk.entities import TestSuites
from metadata.generated.schema.api.tests.createTestSuite import CreateTestSuiteRequest

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

# Create a logical test suite
request = CreateTestSuiteRequest(
    name="critical_data_quality_checks",
    displayName="Critical Data Quality Checks",
    description="Groups all critical data quality test cases across production tables",
    executable=False
)

test_suite = TestSuites.create(request)
print(f"Created: {test_suite.name}")

# Create an executable test suite
request = CreateTestSuiteRequest(
    name="dim_address_test_suite",
    displayName="Data Contract - dim_address",
    description="Executable test suite for dim_address table",
    executable=True
)

test_suite = TestSuites.create(request)
print(f"Created: {test_suite.fullyQualifiedName}")
{
  "id": "e86a9a11-852f-4bac-b5a7-993b2bbbb572",
  "name": "critical_data_quality_checks",
  "displayName": "Critical Data Quality Checks",
  "fullyQualifiedName": "critical_data_quality_checks",
  "description": "Groups all critical data quality test cases across production tables",
  "version": 0.1,
  "updatedAt": 1769982757893,
  "updatedBy": "admin",
  "deleted": false,
  "owners": [],
  "executable": false
}

Returns

Returns the created test suite object with all specified properties and system-generated fields.

Response

id
string
Unique identifier for the test suite (UUID format).
name
string
Test suite name.
fullyQualifiedName
string
Fully qualified name of the test suite.
displayName
string
Human-readable display name.
description
string
Description of the test suite.
executable
boolean
Whether this is an executable (true) or logical (false) test suite.
owners
array
List of owners assigned to the test suite.
version
number
Version number for the entity (starts at 0.1).

Create or Update (PUT)

Use PUT /v1/dataQuality/testSuites instead of POST to perform an upsert. If a test suite with the same name already exists, it will be updated; otherwise, a new test suite is created. The request body is the same as POST.
curl -X PUT "{base_url}/api/v1/dataQuality/testSuites" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{ ... same body as POST ... }'
PUT will not return a 409 conflict error if the entity already exists — it will update the existing entity instead.

Error Handling

CodeError TypeDescription
400BAD_REQUESTInvalid request body or missing required fields
401UNAUTHORIZEDInvalid or missing authentication token
403FORBIDDENUser lacks permission to create test suites
409ENTITY_ALREADY_EXISTSTest suite with same name already exists (POST only)