Skip to main content

Endpoint

GET /api/v1/checks/{id}
Host: api.driftguard.dev

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe check ID returned by POST /api/v1/check

Request

curl -s https://api.driftguard.dev/api/v1/checks/your_check_id_here \
  -H "X-API-Key: $DRIFTGUARD_KEY"

Response

{
  "id": "your_check_id_here",
  "contract_id": "your_contract_id_here",
  "result": "breaking",
  "severity": 70,
  "diff": {
    "removed": ["email"],
    "type_changes": [
      { "column": "created_at", "from": "timestamp", "to": "string" }
    ],
    "added": []
  },
  "credits_used": 1,
  "created_at": "2026-03-01T18:00:14Z"
}

Response Fields

FieldTypeDescription
idstringUnique identifier for this check
contract_idstringThe contract this check was run against
resultstringpass, warning, or breaking
severityintegerScore from 0–100. See Severity Levels
diff.removedarrayColumn names present in the contract but missing from the incoming schema
diff.type_changesarrayColumns whose type changed, with from and to values
diff.addedarrayColumn names present in the incoming schema but not in the contract
credits_usedintegerAlways 1 — each check costs one credit
created_atstringISO 8601 timestamp of when the check was run

Result Thresholds

ResultSeverity RangeMeaning
pass0 – 19Schema matches contract
warning20 – 89Drift detected, may cause issues
breaking90 – 100Drift will break downstream consumers

Error Responses

StatusMeaning
401Missing or invalid X-API-Key
404Check not found, or belongs to a different user
429Rate limit exceeded — 100 req/min per key

The response shape is identical to the response from POST /api/v1/check. Store the id from your check responses if you need to retrieve them later.

Run a Check

See how to run a schema check against a contract.

Severity Levels

Understand how the 0–100 severity score is calculated.