API Reference

Autonoma API

Powerful APIs to integrate autonomous software development into your workflow

API Overview

RESTful API

Standard REST endpoints for all platform operations. JSON request/response format with comprehensive error handling.

GraphQL API

Flexible GraphQL endpoint for complex queries. Request exactly what you need with single API calls.

WebSocket Streaming

Real-time event streaming for live updates. Monitor predictions and fixes as they happen.

Webhook Events

Receive HTTP callbacks for important events. Integrate Autonoma into your existing workflows.

Authentication

All API requests require authentication using your API key. Include your key in the Authorization header:

curl -X GET https://api.www.theautonoma.io/v1/projects \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

API Key Security

Keep your API keys secure. Never expose them in client-side code or public repositories. Use environment variables and secure key management practices.

Core Endpoints

Projects

GET/v1/projects

List all projects in your organization

Query Parameters:

  • page - Page number (default: 1)
  • limit - Items per page (default: 20, max: 100)
  • status - Filter by status (active, paused, archived)

Response:

{
  "projects": [
    {
      "id": "proj_abc123",
      "name": "My Application",
      "status": "active",
      "created_at": "2024-01-15T10:00:00Z",
      "metrics": {
        "issues_prevented": 1847,
        "uptime": 99.99,
        "performance_gain": 23.5
      }
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 3
  }
}
POST/v1/projects

Create a new project

Request Body:

{
  "name": "My New Project",
  "description": "E-commerce platform",
  "repository": {
    "type": "github",
    "url": "https://github.com/myorg/myapp"
  },
  "settings": {
    "auto_fix": true,
    "predictive_analysis": true,
    "security_scanning": true
  }
}

Predictions

GET/v1/projects/{project_id}/predictions

Get active predictions for a project

Response:

{
  "predictions": [
    {
      "id": "pred_xyz789",
      "type": "performance_degradation",
      "severity": "high",
      "confidence": 0.92,
      "description": "Memory leak detected in UserService",
      "predicted_impact": {
        "users_affected": 15000,
        "downtime_minutes": 45,
        "revenue_loss": 12500
      },
      "recommended_action": {
        "type": "auto_fix",
        "description": "Apply memory optimization patch",
        "can_auto_apply": true
      },
      "predicted_at": "2024-01-20T14:30:00Z",
      "will_occur_at": "2024-01-20T16:45:00Z"
    }
  ]
}

Remediations

POST/v1/predictions/{prediction_id}/remediate

Apply a recommended remediation

Request Body:

{
  "action": "apply",
  "mode": "automatic",
  "options": {
    "create_backup": true,
    "notify_team": true,
    "rollback_on_failure": true
  }
}

Response:

{
  "remediation": {
    "id": "rem_def456",
    "status": "in_progress",
    "started_at": "2024-01-20T14:35:00Z",
    "steps": [
      {
        "name": "Create backup",
        "status": "completed"
      },
      {
        "name": "Apply memory optimization",
        "status": "in_progress",
        "progress": 45
      }
    ]
  }
}

Webhooks

Configure webhooks to receive real-time notifications about important events:

Available Events

Prediction Events

  • prediction.created
  • prediction.updated
  • prediction.resolved

Remediation Events

  • remediation.started
  • remediation.completed
  • remediation.failed

Security Events

  • security.vulnerability_found
  • security.vulnerability_fixed

Performance Events

  • performance.anomaly_detected
  • performance.optimization_applied

Webhook Payload Example

{
  "event": "prediction.created",
  "created_at": "2024-01-20T14:30:00Z",
  "data": {
    "prediction": {
      "id": "pred_xyz789",
      "type": "performance_degradation",
      "severity": "high",
      "project_id": "proj_abc123"
    }
  },
  "signature": "sha256=abcdef..."
}

Rate Limits

API rate limits vary by plan. Rate limit information is included in response headers:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1642550400
PlanRequests/HourBurst Limit
Free1,000100/min
Pro10,0001,000/min
EnterpriseUnlimitedCustom