Orchestration Integrations

Prev Next

An orchestrator such as Airflow, Azure Data Factory or Control-M can start a Validatar job through the Execution API, wait for it to finish, and stop the pipeline when tests fail, so bad data is caught before it moves downstream. This page is the API reference for that pattern: endpoints, request and response bodies, and how to read a result.

For scripts you can run as they are, see:

To drive Validatar from an AI assistant instead of a script, see Connecting to the Validatar MCP Server.

Authentication

Every call sends a user token in a custom header:

x-val-api-token: <your token>

To create the token, click the user icon in the top right of Validatar, choose User Profile, open Tokens and select New Token. Set Type to API and give it the Execution scope; add Authoring if the same token also looks up ids or creates tests. User Tokens covers the other settings. Security admins can review every user's tokens under Settings > User Tokens, but each token is created from its owner's profile.

The token acts as its user, so that user must have access to the project that holds the job. Scopes other than Execution need the full API add-on.

Base URL

Every endpoint lives under /core/api/v1/ on your Validatar address, followed by the scope name:

https://<your-instance>.cloud.validatar.com/core/api/v1/Execution/projects/{projectId}/jobs/{jobId}/execute

On Validatar Server, use your server's address in place of the Cloud host. The /core/api/v1/<scope>/ part is the same. A path without the scope segment, such as /core/api/v1/projects/{projectId}/jobs/{jobId}/execute, returns HTTP 404.

The API documentation for your version is linked from the token page and lives at https://<your-instance>.cloud.validatar.com/core/home/redoc.

The pattern

  1. Trigger. POST to the execute endpoint for a job, a standard test or a template test.
  2. Poll. GET the matching results endpoint every few seconds until the run finishes.
  3. Evaluate. Read the result to decide pass or fail.
  4. Act. Continue the pipeline, stop it, or raise an alert.

Every execute call returns as soon as the run starts, so step 2 always applies.

Note: Jobs are the best unit for orchestration. A job groups tests into one run with a defined order, so one call starts everything and one summary reports every test's outcome.

Endpoints

Paths are relative to https://<your-instance>.cloud.validatar.com/core/api/v1. All of them need the Execution scope.

Method Path Description
POST /Execution/projects/{projectId}/jobs/{jobId}/execute Run a job
GET /Execution/projects/{projectId}/jobs/{jobId}/results/{batchKey} Job run summary, with every test's outcome
POST /Execution/projects/{projectId}/tests/{testId}/execute Run a standard test
GET /Execution/projects/{projectId}/tests/{testId}/results/{batchKey} Standard test result
POST /Execution/projects/{projectId}/template-tests/{testId}/execute Run a template test and its child tests
GET /Execution/projects/{projectId}/template-tests/{testId}/results/{batchKey} Template test run summary

{batchKey} accepts either the executionKey or the numeric batchId from the execute response.

Execute request bodies

Job

A job takes no request body. The project id and job id in the URL are all it needs:

POST /core/api/v1/Execution/projects/{projectId}/jobs/{jobId}/execute

Standard test

{
  "saveInRepository": true,
  "leftDataSourceId": null,
  "rightDataSourceId": null
}
Field Type Description
saveInRepository bool true saves the results to the results repository. Keep it true for orchestration: without it the response has no batchId and the run has no stored history.
leftDataSourceId int Runs the test data set against a different data source. Optional.
rightDataSourceId int Runs the control data set against a different data source. Optional.

The request schema also lists waitUntilComplete. The v1 API returns when the run starts whatever its value, so poll the results endpoint either way.

Template test

{
  "saveInRepository": true,
  "parallelTestCount": 10,
  "childTestId": null
}
Field Type Description
saveInRepository bool true saves the results (recommended)
parallelTestCount int How many child tests run at the same time. Set it above 0. With 0, or with the field left out, the run completes without running any child test.
childTestId int Runs only this child test. Optional.

Execute response

All three execute endpoints return the same shape:

{
  "name": "Nightly warehouse checks",
  "executionKey": "6f1c2d0e9a8b4c7d...",
  "batchId": 12345
}

Pass executionKey (or batchId) as {batchKey} when you poll. Log the batchId: the run's results page in Validatar is https://<your-instance>.cloud.validatar.com/projects/{projectId}/results/{batchId}.

Reading results

Job results

GET /Execution/projects/{projectId}/jobs/{jobId}/results/{batchKey} returns:

{
  "name": "Nightly warehouse checks",
  "dateStarted": "2026-10-19T20:49:12.574773+00:00",
  "dateCompleted": "2026-10-19T20:49:20.744185+00:00",
  "status": "Completed",
  "tests": [
    {
      "id": 2869,
      "projectId": 1,
      "folderId": 377,
      "name": "Customer row count: staging vs dimension",
      "status": "Failed",
      "dateStarted": "2026-10-19T20:49:12.791367+00:00",
      "dateCompleted": "2026-10-19T20:49:14.169026+00:00",
      "duration": 1
    }
  ]
}

status is the state of the run:

Value Meaning Pipeline action
Running Still in progress Keep polling
Aborting Cancellation in progress Keep polling
Completed Every step finished Check each test's status
Aborted The run was cancelled Fail or alert
Abandoned The run stopped before it finished, for example because the server restarted Fail or alert

Completed says the run finished, not that the tests passed. Each entry in tests carries its own status: Passed, Failed or Error. A quality gate passes only when every test is Passed.

Standard test results

GET /Execution/projects/{projectId}/tests/{testId}/results/{batchKey} returns name, dateStarted, dateCompleted, batchType and result:

result Meaning Pipeline action
Running Still in progress Keep polling
Passed The test passed Continue
Failed The test failed Fail or alert
Error The test hit an error while running, such as a SQL error Fail or alert

This endpoint also reads one test's result inside a job or template test run. Pass the numeric batchId of that run as {batchKey}.

Template test results

GET /Execution/projects/{projectId}/template-tests/{testId}/results/{batchKey} returns status (the same values as a job) and a tests list. Each entry in tests holds only the child test's id and name, without its result. To gate on a template test, wait for status to reach Completed, then read each child's result from the standard test results endpoint with the numeric batchId.

Polling

  • Poll every 5 seconds. That keeps the pipeline responsive without loading the Validatar server.
  • Set a timeout. Make the maximum wait configurable (30 minutes is a sensible default) so a stuck run cannot hang the pipeline.
  • Treat an early miss as "not yet". Right after the execute call, the results endpoint can answer HTTP 404, or a summary with no status, until the run is recorded. Keep polling.
  • Retry failed polls. A network error on one poll says nothing about the tests. Log it and poll again.
  • Log each poll. Status and elapsed time make a slow or stuck run easy to diagnose.

Finding IDs

Project, folder, test and job ids are in the Validatar URL when you open the item:

https://<your-instance>.cloud.validatar.com/projects/43/folders/1408/tests/57878
https://<your-instance>.cloud.validatar.com/projects/43/folders/2/jobs/165

The first number is the project id; the last is the test or job id.

With a token that also has the Authoring scope, the API lists them:

Call Returns
GET /core/api/v1/Authoring/projects projects[] with id and name
GET /core/api/v1/Authoring/projects/{projectId} rootTestFolderId and rootJobFolderId
GET /core/api/v1/Authoring/projects/{projectId}/folders/{folderId} tests[], jobs[] and folders[], each with id and name. Start from rootJobFolderId to find jobs.