SYSTEM OPERATIONAL
v0.1.0-beta
Developers

API Reference

REST API — all endpoints, authentication, and examples.

Authentication
Example request
curl https://api.driftguard.io/api/v1/health   -H "Authorization: Bearer $DG_API_KEY"

All responses are JSON. Errors follow { detail: string, status: number }.

Endpoints
MethodPath
GET/api/v1/healthLiveness probe. Returns status + uptime + version.
GET/api/v1/readyReadiness probe. Checks DB + Redis. Returns 503 if degraded.
GET/api/v1/metricsLightweight metrics: uptime, gc counts, pid.
POST/api/v1/webhooks/githubGitHub App webhook receiver. HMAC-SHA256 verified.
GET/api/v1/orgs/by-installation/{id}Get org by GitHub installation ID.
GET/api/v1/orgs/{org_id}/reposList repos for an org.
GET/api/v1/orgs/{org_id}/analysesList analyses for an org. Query: limit (default 20).
PATCH/api/v1/orgs/{org_id}/awsSave AWS IAM role ARN + state bucket for drift detection.
GET/api/v1/analysesList analyses. Query: repo_id, limit.
GET/api/v1/analyses/{id}Get single analysis with findings + AI summary.
POST/api/v1/memory/recallSemantic recall: top-k similar past incidents by cosine sim.
GET/api/v1/reposList all repositories across the installation.
POST/api/v1/billing/checkoutCreate Stripe checkout session. Returns {url}.
POST/api/v1/billing/portalCreate Stripe customer portal session. Returns {url}.
GET/api/v1/aws/verifyTest STS AssumeRole with configured credentials.
Semantic recall — example
POST /api/v1/memory/recall
{
  "project": "acme-platform",
  "intent": "delete aws_rds_cluster in prod",
  "top_k": 5
}

# 200 OK
{
  "matches": [
    {
      "id": "evt_8x2m",
      "similarity": 0.94,
      "date": "2026-04-22",
      "summary": "RDS deletion blocked by drift detector",
      "resource": "aws_rds_cluster.prod"
    }
  ],
  "latency_ms": 9
}
OpenAPI spec

Full spec available at /api/v1/openapi.json on self-hosted deployments.

Request access →