API Reference — v4.4.1

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

Base URLs

ServiceURLPurpose
Proxyhttps://aegisgate.yourcompany.com:8443AI traffic proxy + scanning
Dashboardhttps://aegisgate.yourcompany.com:8444Management API, admin, compliance

Authentication

All API requests require authentication via one of:

MethodHeaderNotes
API keyX-API-Key: <key>Standard for API integrations
Bearer tokenAuthorization: Bearer <token>From SSO or local auth
API tokenX-API-Token: <token>Legacy alias for API key
curl -H "X-API-Key: your-api-key" https://aegisgate.yourcompany.com:8444/api/v1/status

Health & Status

Health Check

GET /health

Returns system health status including dependency checks.

Response (healthy):

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

Response (degraded) — returns 503:

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

Dashboard Health

GET /api/v1/health

Extended health check that also verifies scanner and A2A subsystems.

Response:

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

Readiness Check

GET /ready

Returns 200 if the platform is ready to accept traffic, 503 otherwise. Use for load balancer health checks.

Version

GET /version

Response:

{
  "version": "4.4.1",
  "commit": "eebe132",
  "build_date": "2026-09-09T00:00:00Z"
}

Scanning

Scan Content

POST /v1/scan

Scans content for threats, secrets, PII, and injection attacks using the 3-layer detection engine (regex + ATLAS/compliance + ML).

Request Body:

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

Response:

{
  "threats": [
    {
      "category": "secrets",
      "type": "aws_access_key",
      "severity": "critical",
      "pattern": "AKIA[0-9A-Z]{16}",
      "redacted_match": "AKIA****EXAMPLE"
    }
  ],
  "risk_score": 85,
  "scan_time_ms": 2.1,
  "layers_triggered": ["l1_regex", "l3_ml"]
}

Statistics

GET /stats

Returns platform statistics.

Response:

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

License & Tier

License Status

GET /api/v1/license/status

Response:

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

Tier Information

GET /api/v1/tier

Returns current tier and enabled features.

SLA Information

GET /api/v1/sla

Response:

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

Configuration & Policies

Get Configuration

GET /api/v1/config

Required permission: config:read

Returns the current platform configuration.

Get Profiles

GET /api/v1/profiles

Required permission: config:read

Returns available deployment profiles.

Apply Profile

POST /api/v1/profiles/apply

Required permission: config:write

Request Body:

{
  "profile": "enterprise"
}

Policies

GET /api/v1/policies

Returns current detection policies (enabled categories, thresholds, block/monitor mode).

Guardrails

GET /api/v1/guardrails

Returns active A2A guardrail configuration.


Audit & Compliance

Audit Log

GET /api/v1/audit

Query Parameters:

  • from: Start timestamp (ISO 8601)
  • to: End timestamp (ISO 8601)
  • category: Filter by category (pii, secrets, injection, etc.)
  • severity: Filter by severity (critical, high, medium, low)
  • limit: Max results (default: 100, max: 1000)

Audit Stream (SSE)

GET /api/v1/audit/stream

Server-Sent Events stream of real-time audit events. Useful for live monitoring dashboards.

Compliance Report

GET /api/v1/compliance?framework=soc2

Required permission: compliance:read

Query Parameters:

  • framework: soc2, hipaa, pci_dss, eu_ai_act, nist_ai_rmf, owasp_llm, iso_27001, mitre_atlas

Live Compliance Scan

GET /api/v1/compliance/live

Required permission: compliance:read

Returns real-time compliance status across all enabled frameworks.


DSAR — GDPR Data Subject Access Request

Implements GDPR Articles 15–20: right to access, right to erasure, right to data portability.

Export Entity Data

POST /api/v1/dsar/export

Required role: Admin

Export all data associated with an entity across all registered data providers.

Request body:

{
  "entity_id": "user-123"
}

Response (200 OK):

{
  "entity_id": "user-123",
  "exported_at": "2026-09-09T18:00:00Z",
  "providers": {
    "rbac": { "roles": ["analyst"], "permissions": ["audit:read"] },
    "audit": { "events": 42, "date_range": "2026-01-01/2026-09-09" },
    "ioc": { "matches": 0 }
  }
}

The response includes a Content-Disposition header suggesting a filename for download.

Erase Entity Data

POST /api/v1/dsar/erase

Required role: Admin

Erase all data for an entity. If the entity is under legal hold, the erasure is blocked.

Request body:

{
  "entity_id": "user-123"
}

Response (200 OK):

{
  "entity_id": "user-123",
  "erased_at": "2026-09-09T18:00:00Z",
  "records_affected": 42,
  "providers": {
    "rbac": 5,
    "audit": 37
  }
}

Response (409 Conflict — blocked by legal hold):

{
  "entity_id": "user-123",
  "blocked_by": "legal_hold"
}

Manages legal holds that freeze data deletion for entities under litigation.

POST /api/v1/legal-holds

Request body:

{
  "entity_id": "user-123",
  "entity_type": "user",
  "reason": "Case #2026-001 — pending litigation",
  "issued_by": "admin@company.com"
}

Response (201 Created):

{
  "id": "hold_1724272800000000000",
  "entity_id": "user-123",
  "entity_type": "user",
  "reason": "Case #2026-001 — pending litigation",
  "issued_by": "admin@company.com",
  "created_at": "2026-09-09T18:00:00Z"
}
GET /api/v1/legal-holds

Response (200 OK): Array of hold objects.

GET /api/v1/legal-holds/{id}

Response (200 OK): Single hold object.

Response (404): {"error": "hold <id> not found"}

DELETE /api/v1/legal-holds/{id}

Releases (deactivates) a legal hold. The hold record is retained for audit trail.

Response (200 OK): {"status": "released"}

GET /api/v1/legal-holds/check/{entityID}

Response (200 OK):

{
  "under_hold": true
}

A/B Testing — ML Model Evaluation

Manages A/B tests for comparing ML model variants using deterministic FNV hashing for variant assignment.

Create A/B Test

POST /api/v1/abtest/tests

Required role: Admin

Request body:

{
  "name": "v4.4-detection-comparison",
  "description": "Compare v11b vs v12 detection model",
  "variants": [
    {"name": "champion", "weight": 50, "model_ref": "model-v11b"},
    {"name": "challenger", "weight": 50, "model_ref": "model-v12"}
  ]
}

Response (201 Created):

{
  "id": "test-abc123",
  "name": "v4.4-detection-comparison",
  "status": "created",
  "created_at": "2026-09-09T18:00:00Z"
}

List A/B Tests

GET /api/v1/abtest/tests

Start Test

POST /api/v1/abtest/tests/{id}/start

Response: {"status": "started", "test_id": "test-abc123"}

Stop Test

POST /api/v1/abtest/tests/{id}/stop

Response: {"status": "stopped", "test_id": "test-abc123"}

Get Test Metrics

GET /api/v1/abtest/tests/{id}/metrics

Response (200 OK):

[
  {
    "variant_name": "champion",
    "total_requests": 500,
    "detections": 120,
    "false_positives": 15,
    "avg_latency_ms": 45.2
  },
  {
    "variant_name": "challenger",
    "total_requests": 500,
    "detections": 135,
    "false_positives": 10,
    "avg_latency_ms": 38.7
  }
]

Assign Variant

POST /api/v1/abtest/tests/{id}/assign

Request body:

{
  "request_id": "req-unique-123"
}

Response: {"variant": "challenger", "test_id": "test-abc123"}

Record Result

POST /api/v1/abtest/tests/{id}/result

Request body:

{
  "variant_name": "challenger",
  "detected": true,
  "false_positive": false,
  "latency_ms": 38.7
}

Response: {"status": "recorded"}


Trust Framework

The Trust Framework provides cryptographic agent identity, capability contracts, real-time trust scoring, and signed attestations. See Trust Framework Architecture for details.

EndpointMethodDescriptionAuth
/api/v1/trust/score?agent=IDGETLifetime trust score for an agentProfessional+
/api/v1/trust/score?session=IDGETCurrent session trust scoreProfessional+
/api/v1/trust/sessions?active=true&agent=IDGETActive sessions for an agentProfessional+
/api/v1/trust/attestations?agent=ID&since=TSGETSigned attestations since timestampProfessional+
/api/v1/trust/attestations/latest?agent=IDGETMost recent attestationProfessional+
/api/v1/trust/healthGETLiveness checkPublic

Example: Get Trust Score

curl -H "X-API-Key: your-key" \
  "https://aegisgate.yourcompany.com:8444/api/v1/trust/score?agent=agent-001"
{
  "agent_id": "agent-001",
  "score": 87.5,
  "verdict": "TRUSTED",
  "factors": {
    "contract_compliance": 0.95,
    "behavioral_anomaly": 0.12,
    "historical_incidents": 0.0,
    "capability_drift": 0.05
  },
  "last_updated": "2026-09-09T12:00:00Z"
}

SIEM & SOAR

SIEM Status

GET /api/v1/siem/status

Returns SIEM forwarding health and per-platform statistics.

Response:

{
  "enabled": true,
  "platforms": [
    {
      "platform": "splunk",
      "status": "healthy",
      "events_forwarded": 15420,
      "last_forward": "2026-09-09T17:59:00Z",
      "errors": 0
    }
  ]
}

See SIEM & SOAR Integration for full SIEM configuration and Enterprise Deployment Guide for SOAR setup.


SSO Authentication

Login

GET /auth/login

Initiates the SSO login flow. Redirects to the configured identity provider (SAML or OIDC).

Callback

GET /auth/callback

Handles the SSO callback from the identity provider. Redirects to the dashboard on success.

Logout

GET /auth/logout

Terminates the SSO session and redirects to the IdP logout endpoint (if configured).

See SSO Configuration Guide for provider setup instructions.


Infrastructure

Persistence Status

GET /api/v1/persistence

Returns persistence backend status (PostgreSQL or in-memory).

Certificates

GET /api/v1/certs

Returns TLS certificate status and expiration.

Cluster Health

GET /api/v1/cluster/health

Returns cluster node health (if cluster mode is enabled).

Metrics (Prometheus)

GET /metrics

Returns Prometheus-format metrics for monitoring.

Analytics

EndpointMethodDescription
/api/v1/analytics/usageGETToken usage analytics
/api/v1/analytics/costGETCost analytics
/api/v1/analytics/anomaliesGETUsage anomaly detection
/api/v1/analytics/dashboardGETDashboard summary data

A2A (Agent-to-Agent) Guardrails

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 Codes

CodeHTTPMeaning
A2A_AUTH_FAILED403mTLS client certificate authentication failed
A2A_AUTH_NO_CERT403No client certificate presented
A2A_LICENSE_MISSING403No license key for paid-tier capability
A2A_LICENSE_INVALID403License key invalid or wrong tier
A2A_RATE_LIMITED429Agent exceeded rate limit
A2A_INTEGRITY_MISSING403No HMAC signature provided
A2A_INTEGRITY_INVALID403HMAC signature mismatch
A2A_CAP_MISSING403No capability header
A2A_CAP_DENIED403Agent lacks requested capability
A2A_CAP_UNKNOWN_AGENT403Agent ID not registered
A2A_CAP_CHECK_FAILED500Internal error during capability lookup

A2A Rate Limits

TierRequests/MinuteBurst
Community305
Developer6010
Professional12020
EnterpriseCustomCustom

Rate limit headers in every response:

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

General Error Responses

HTTP CodeDescription
200Success
201Created
400Invalid request body or parameters
401Missing or invalid authentication
403Forbidden — insufficient role, A2A guardrail violation, or capability denied
404Endpoint or resource not found
405Method not allowed
409Conflict (e.g., erasure blocked by legal hold)
429Rate limit exceeded
500Internal server error
503Service degraded — one or more dependencies unhealthy

Error response body format:

{"error": "descriptive error message"}

SDK Usage

The AegisGate Go SDK provides typed access to all endpoints:

import aegisgate "github.com/aegisgatesecurity/aegisgate-platform/sdk/go"

// DSAR
bundle, err := client.DSAR.Export(ctx, "user-123")
result, err := client.DSAR.Erase(ctx, "user-123")

// Legal Hold
hold, err := client.LegalHold.CreateHold(ctx, &aegisgate.LegalHoldCreateRequest{
    EntityID:   "user-123",
    EntityType: "user",
    Reason:     "Case #2026-001",
    IssuedBy:   "admin@company.com",
})
underHold, err := client.LegalHold.CheckUnderHold(ctx, "user-123")
err = client.LegalHold.ReleaseHold(ctx, hold.ID)

// A/B Testing
test, err := client.ABTestV4.CreateTest(ctx, &aegisgate.ABTestV4CreateRequest{
    Name:        "v4.4-comparison",
    Description: "Compare models",
    Variants: []aegisgate.ABTestV4Variant{
        {Name: "champion", Weight: 50, ModelRef: "model-v11b"},
        {Name: "challenger", Weight: 50, ModelRef: "model-v12"},
    },
})
err = client.ABTestV4.StartTest(ctx, test.ID)
variant, err := client.ABTestV4.AssignVariant(ctx, test.ID, "req-123")
err = client.ABTestV4.RecordResult(ctx, test.ID, &aegisgate.ABTestV4ResultRequest{
    VariantName:   variant,
    Detected:      true,
    FalsePositive: false,
    LatencyMs:     38.7,
})
metrics, err := client.ABTestV4.GetMetrics(ctx, test.ID)