API Reference

AegisGate provides a comprehensive REST API for integration with your applications, CI/CD pipelines, and monitoring systems.

Base URL

http://localhost:8443/api/v1

Authentication

All API requests require an API key in the X-API-Key header:

curl -H "X-API-Key: your-api-key" http://localhost:8443/api/v1/status

Platform Endpoints

Health Check

GET /health

Returns system health status, including dependency checks.

Response (healthy):

{
  "status": "healthy",
  "version": "2.0.1",
  "dependencies": {
    "proxy": "up",
    "persistence": "up",
    "license": "up",
    "certificates": "up"
  }
}

Response (degraded) — returns 503:

{
  "status": "degraded",
  "version": "2.0.1",
  "dependencies": {
    "proxy": "up",
    "persistence": "down",
    "license": "up",
    "certificates": "up"
  }
}

The health endpoint verifies proxy, persistence, license manager, and certificate store. If any dependency is unhealthy, the response returns HTTP 503 with "status": "degraded".

Dashboard Health

GET /api/v1/health

Extended health check that also verifies scanner and A2A subsystems.

Response:

{
  "status": "healthy",
  "version": "2.0.1",
  "dependencies": {
    "proxy": "up",
    "persistence": "up",
    "license": "up",
    "certificates": "up",
    "scanner": "up",
    "a2a": "up"
  }
}

Scan Content

POST /v1/scan

Scans content for threats, secrets, and PII.

Request Body:

{
  "content": "string to scan",
  "options": {
    "scan_secrets": true,
    "scan_pii": true,
    "scan_injection": true
  }
}

Response:

{
  "threats": [],
  "risk_score": 0,
  "scan_time_ms": 2.1
}

Get Statistics

GET /stats

Returns platform statistics.

Response:

{
  "requests_today": 15420,
  "threats_blocked": 23,
  "avg_latency_ms": 2.44
}

Compliance Report

GET /api/v1/compliance

Generate compliance report for specified framework.

Query Parameters:

  • framework: MITRE ATLAS, OWASP LLM, NIST AI RMF

License Status

GET /api/v1/license/status

Returns current license tier and expiration.

Response:

{
  "tier": "developer",
  "valid": true,
  "expires": "2027-01-01T00:00:00Z"
}

SLA Information

GET /api/v1/sla

Returns SLA definitions and current SLO measurements for your tier.

Response:

{
  "tier": "developer",
  "sla": {
    "uptime_target": "99.9%",
    "description": "Developer tier SLA"
  },
  "slos": [
    {
      "name": "api_latency_p99",
      "target": "< 200ms",
      "current": "145ms"
    },
    {
      "name": "threat_detection_accuracy",
      "target": "> 99.5%",
      "current": "99.8%"
    }
  ]
}

A2A (Agent-to-Agent) Endpoints

A2A guardrails are enforced on all requests to A2A-enabled routes. Requests must include:

HeaderRequiredPurpose
X-A2A-Agent-IDYesIdentifies the calling agent
A2A-CapabilityYesDeclares the capability being exercised
A2A-SignatureYesHMAC-SHA256 of the request body
X-A2A-License-KeyFor paid tiersLicense key for tier-gated capabilities

A2A Error Response Format

All A2A guardrail violations return a structured JSON response:

{
  "code": "A2A_CAP_DENIED",
  "message": "Agent 'agent-001' does not have capability 'create_artifact'"
}

A2A Error Codes

CodeHTTP StatusMeaningFix
A2A_AUTH_FAILED403mTLS client certificate authentication failedVerify the client certificate is valid and trusted
A2A_AUTH_NO_CERT403No client certificate was presentedInclude a valid mTLS client certificate in the request
A2A_AUTH_MISSING_CN403Client certificate has no Common Name (CN)Regenerate the certificate with a valid CN field
A2A_LICENSE_MISSING403No license key provided for a paid-tier capabilityInclude X-A2A-License-Key header, or use Community-tier capabilities only
A2A_LICENSE_INVALID403License key is invalid, expired, or wrong tierVerify the license key at /api/v1/license/status
A2A_RATE_LIMITED429Agent has exceeded its request rate limitReduce request frequency; check X-RateLimit-Reset header
A2A_INTEGRITY_MISSING403No HMAC signature providedInclude A2A-Signature header with HMAC-SHA256 of body
A2A_INTEGRITY_INVALID403HMAC signature does not match request bodyVerify the shared secret and recompute the HMAC
A2A_INTEGRITY_MALFORMED403Signature header could not be decodedEnsure the signature is valid base64-encoded HMAC-SHA256
A2A_CAP_MISSING403No A2A-Capability header providedInclude the capability name in the A2A-Capability header
A2A_CAP_DENIED403Agent does not have the requested capabilityCheck the agent’s capability map in a2a_caps.yaml
A2A_CAP_UNKNOWN_AGENT403Agent ID is not registered in the capability mapRegister the agent in a2a_caps.yaml
A2A_CAP_CHECK_FAILED500Internal error during capability lookupCheck server logs; verify a2a_caps.yaml is valid YAML
A2A_INTERNAL_ERROR500Unexpected internal error (panic recovery)Check server logs; file a bug report if persistent

A2A Rate Limits

Rate limits are per-agent (token bucket):

TierRequests/MinuteBurst
Community305
Developer6010
Professional12020
EnterpriseCustomCustom

Rate limit headers are included in every response:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1746500000

General Error Responses

HTTP CodeDescription
400Invalid request body or parameters
401Missing or invalid API key
403Forbidden — missing A2A headers, invalid license, or capability denied
404Endpoint not found
429Rate limit exceeded
500Internal server error
503Service degraded — one or more dependencies unhealthy

Rate Limits

Rate limits depend on your tier. Headers show remaining quota:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 987
X-RateLimit-Reset: 1640000000