Skip to content

Latest commit

 

History

History
144 lines (113 loc) · 4.37 KB

File metadata and controls

144 lines (113 loc) · 4.37 KB

DriftGuard API

Prevent pipeline failures before they happen. DriftGuard is a metadata-only API that catches breaking schema changes in your data pipelines, warehouses, and integrations.


What is DriftGuard?

Data pipelines break when schemas change unexpectedly. A column gets renamed. A number becomes a string. A required field disappears. These "small" changes cause big problems: failed DAGs, wrong dashboards, hours of firefighting.

DriftGuard solves this with data contracts:

  1. Define what your data should look like (the contract)
  2. Check incoming schemas against that contract
  3. Alert when drift is detected — before it breaks production

Why DriftGuard?

We store column names and types, never your actual data. No PII, no security review delays. One HTTP endpoint. No platform to adopt, no months-long implementation. Works with dbt, Airflow, Fivetran, or custom Python. $10 for 500 checks. No monthly minimums, no contracts. Credits never expire. Catch drift in pull requests, not in production. GitHub Action available.

How It Works

# 1. Define your contract
curl -X POST https://api.driftguard.dev/api/v1/contracts \
  -H "X-API-Key: dg_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "users",
    "schema": {
      "columns": [
        { "name": "id",    "type": "integer", "required": true },
        { "name": "email", "type": "string",  "required": true }
      ]
    }
  }'

# 2. Check an incoming schema against that contract (costs 1 credit)
curl -X POST https://api.driftguard.dev/api/v1/check \
  -H "X-API-Key: dg_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "contract_id": "your_contract_id_here",
    "incoming_schema": {
      "columns": [
        { "name": "id",   "type": "integer" },
        { "name": "email", "type": "integer" }
      ]
    }
  }'

# 3. Get an instant verdict
{
  "result": "breaking",
  "severity": 95,
  "diff": {
    "removed": [],
    "type_changes": [{ "column": "email", "from": "string", "to": "integer" }],
    "added": []
  }
}
All endpoints use the `X-API-Key` header for authentication. The `/api/v1/health` endpoint is the only one that does not require a key.

What Makes It Different

  • API-first — no platform to adopt, no agent to install
  • Metadata-only — we never store or touch your raw data, only column names and types
  • Pay-as-you-go — 1 credit per check, no monthly seat fees. Credits never expire.
  • CI-ready — integrates in one curl command, GitHub Action available
  • Schema inference — send a sample JSON payload and DriftGuard auto-generates your contract schema

Valid Column Types

DriftGuard supports the following column types in contracts and incoming schemas:

Type Description
string Text values
integer Whole numbers
number Floating point / decimal numbers
boolean True / false values
date Date without time (YYYY-MM-DD)
timestamp Date with time
json Nested JSON / object values

Any type outside this list will be rejected with a validation error.


Get Started

Follow the quickstart guide to run your first schema check.

Quick Links

Get your first schema check running. Understand contracts, checks, and severity scoring. Complete endpoint documentation.

Need Help?

DriftGuard is currently in private beta. [Join the waitlist](https://driftguard.dev/#waitlist) to get your API key.