Skip to content

Introduction

The Controlinfra API is a RESTful JSON API that provides programmatic access to the Controlinfra platform — AI-powered infrastructure drift detection for Terraform.

Base URL

All API requests are made to:

https://api.controlinfra.com

All endpoints are prefixed with /api/. For example:

https://api.controlinfra.com/api/scans/dashboard

Content Type

All requests and responses use JSON. Set the Content-Type header:

Content-Type: application/json

Authentication

Most endpoints require a Bearer token in the Authorization header:

Authorization: Bearer <token>

Tokens can be:

  • JWT tokens — obtained via login or OAuth
  • CLI tokens — long-lived tokens with granular scopes (prefixed with ci_)
  • Runner tokens — sent via the X-Runner-Token header for runner agent routes

See Authentication for details.

Response Format

Successful responses return JSON with a consistent structure:

json
{
  "success": true,
  "data": { ... }
}

List endpoints include pagination:

json
{
  "success": true,
  "data": [ ... ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 142
  }
}

Error responses follow the format described in Errors.

Rate Limiting

All endpoints are rate-limited. Limits vary by endpoint type. Rate limit headers are included in every response:

HeaderDescription
RateLimit-LimitMaximum requests in window
RateLimit-RemainingRequests remaining in window
RateLimit-ResetSeconds until window resets

See Rate Limiting for per-endpoint limits.

Endpoint Categories

CategoryBase PathDescription
Auth/api/authLogin, register, OAuth, profile, tokens
Repositories/api/repositoriesGitHub repository listing and branches
Repo Configs/api/repo-configsRepository scan configuration CRUD
Scans/api/scansScan management, triggering, dashboard
Drifts/api/driftsDrift detection results, fixes, PRs
Drift Widgets/api/drift-widgetsDashboard widget management
Runners/api/runnersSelf-hosted runner management
Workspaces/api/workspacesWorkspace organization
Projects/api/projectsProject and credential grouping
Predictions/api/predictionsML drift predictions and insights
Notifications/api/notificationsIn-app notification management
Credentials/api/authAWS, Azure, GCP credential management
AI Providers/api/authAI provider and BYOK key management
Integrations/api/auth, /api/jiraSlack, Jira, GitHub App
Admin/api/adminAdmin dashboard and system management