TestCompare API
Integrate data validation and comparison directly into your applications
Quick Start
1
AuthenticationRegister and obtain your API credentials
POST /api/v1/auth/register
{
"email": "your@email.com",
"password": "secure_password"
}
POST /api/v1/auth/login
{
"username": "your@email.com",
"password": "secure_password"
}
2
Create a TestSet up your first data comparison test
POST /api/v1/tests/
{
"name": "Production vs Staging",
"source_config": {
"type": "postgres",
"connection": {...}
},
"target_config": {
"type": "postgres",
"connection": {...}
}
}
API Endpoints
Authentication
Manage user authentication and API access
POST
/api/v1/auth/register
Create new user accountPOST
/api/v1/auth/login
Authenticate user and get tokenTest Management
Create, manage, and execute data comparison tests
GET
/api/v1/tests/
List all testsPOST
/api/v1/tests/
Create new test configurationGET
/api/v1/tests/{test_id}
Get specific test detailsPUT
/api/v1/tests/{test_id}
Update test configurationPOST
/api/v1/tests/{test_id}/run
Execute testGET
/api/v1/tests/{test_id}/results
Get test resultsConnectors
Configure and validate data source connections
GET
/api/v1/connectors/
List available connectorsPOST
/api/v1/connectors/{type}/validate
Validate connector configGET
/api/v1/connectors/{type}/schema
Get data source schemaJob Management
Monitor and manage test execution jobs
GET
/api/v1/jobs/
List all jobsGET
/api/v1/jobs/{job_id}
Get job detailsPOST
/api/v1/jobs/{job_id}/cancel
Cancel running jobSupported Data Sources
PostgreSQL
MySQL
Snowflake
Salesforce
CSV
JSON
REST API
Authentication
OAuth2 Bearer Token
All API requests require authentication using Bearer tokens
1. Obtain Access Token
curl -X POST "https://api.testcompare.ai/api/v1/auth/login" \
-H "Content-Type: application/json" \
-d '{
"username": "your@email.com",
"password": "your_password"
}'
2. Use Token in Requests
curl -X GET "https://api.testcompare.ai/api/v1/tests/" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"