Skip to content

API

Automate data profiling and data quality testing by integrating TestGen into your CI/CD pipelines, orchestration tools, or custom workflows.

The TestGen API lets you drive TestGen programmatically over HTTP. Any system that can make HTTP requests can submit jobs, track their progress, retrieve results, and manage test definitions.

What you can do

  • Trigger profiling and test runs — profile a table group or run a test suite, then poll for status or list recent runs. See Run Profiling and Tests for the end-to-end workflow.
  • Onboard a dataset — create a table group and test suite for a new schema or set of files, then profile it, generate tests, and run them. See Onboard a Dataset for the end-to-end steps.
  • Import and export tests — move test definitions between environments for promotion, bulk-calibrate thresholds, or seed a new suite from a file. See Import and Export Tests for details.
  • Manage table groups, test suites, and schedules — look up the IDs the other endpoints need, create a table group or test suite for a new dataset, and schedule its profiling and test runs with a cron expression. See Scheduling for cron examples.
  • Retrieve run results — fetch profiling and test run summaries by job ID, and page through the individual test results of a run.
  • Read profiling detail — for a profiling run, list its per-column profiles, filtered by table; its hygiene issues, filtered by issue type, likelihood, or disposition; and the columns flagged as potential PII, filtered by risk or disposition.
  • Read quality scores — fetch a project's score rollup, filtered by catalog attribute, with an optional breakdown showing which groups contribute most to the affected data.
  • Set up and read monitors — enable monitoring for a table group and change its settings and schedule, list its monitors with their per-type anomaly counts, and fetch the time series behind a single monitor.

Tip

For AI-driven access (assistants, copilots), use the MCP Server instead — it provides structured prompts, tools, and resources designed for large language models (LLMs).

Getting started

  1. Get an access token — create a personal access token or set up an OAuth client. See Access Tokens.
  2. Make API requests with the token in the Authorization: Bearer header.

See Authentication for how to choose and use a token.

Once authenticated, verify your connection with a health check:

curl -H "Authorization: Bearer $TOKEN" <testgen-api-url>/api/v1/health
{
  "status": "ok",
  "edition": "Enterprise",
  "version": "5.32.0"
}

Note

<testgen-api-url> is the URL of the TestGen API and MCP server: http://<host>:8530 by default on a Docker or pip install, or https://<API domain> on Kubernetes. It is not the UI URL.

To call the API from other machines, see Access TestGen from Another Machine.

Full reference

The complete endpoint reference with request and response schemas is available in the API Reference. This reference is also served at <testgen-api-url>/api/docs on any running TestGen instance, where it always reflects the installed version's endpoints.