Skip to main content

REST API Endpoints

AuroraSOC exposes 70+ REST endpoints via FastAPI at http://localhost:8000. All endpoints (except /health and /api/v1/auth/token) require authentication via JWT bearer or httpOnly session cookie. Service-to-service calls can also use X-API-Key on supported routes.

When to Use This Page

Use this page when you need a full endpoint map, expected auth and permission rules, and guidance for robust client integration behavior.

Authentication Flow

Base URL

http://localhost:8000/api/v1

Quickstart by Client Type

# 1) Authenticate and capture JWT
TOKEN=$(curl -s -X POST http://localhost:8000/api/v1/auth/token \
-H 'Content-Type: application/json' \
-d '{"username":"admin","password":"admin"}' | jq -r .access_token)

# 2) Query latest alerts
curl -s "http://localhost:8000/api/v1/alerts?limit=20" \
-H "Authorization: Bearer $TOKEN"

Endpoints by Category

Authentication

MethodPathAuthPermissionDescription
POST/api/v1/auth/tokenNoneGet JWT access token

Request:

{
"username": "admin",
"password": "admin"
}

Response:

{
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"token_type": "bearer"
}

Users

MethodPathAuthPermissionDescription
GET/api/v1/users/meJWTCurrent user profile
GET/api/v1/usersJWTadmin roleList all users
POST/api/v1/usersJWTadmin roleCreate user
DELETE/api/v1/users/{username}JWTadmin roleDelete user

System

MethodPathAuthPermissionDescription
GET/healthNonePublic health check

Alerts

MethodPathAuthPermissionDescription
GET/api/v1/alertsJWTalerts:readList alerts (paginated)
POST/api/v1/alertsJWTalerts:writeCreate alert
GET/api/v1/alerts/{alert_id}JWTalerts:readGet single alert
PATCH/api/v1/alerts/{alert_id}JWTalerts:writeUpdate alert status
POST/api/v1/alerts/{alert_id}/promoteJWTalerts:write + cases:writePromote alert into a new linked case
POST/api/v1/alerts/{alert_id}/case-linkJWTalerts:write + cases:writeLink alert to an existing case

Query Parameters for GET /api/v1/alerts:

ParamTypeDefaultDescription
skipint0Pagination offset
limitint50Page size (max 200)
severitystringFilter: critical|high|medium|low|info
statusstringFilter: new|triaged|investigating|...
sourcestringFilter by source system

Alert creation includes deduplication:

dedup_hash = SHA256(f"{title}|{source}|{sorted(iocs)}")
# If matching hash exists, returns existing alert instead of creating duplicate

Cases

MethodPathAuthPermissionDescription
GET/api/v1/casesJWTcases:readList cases
POST/api/v1/casesJWTcases:writeCreate incident case
GET/api/v1/cases/{case_id}JWTcases:readGet case with full workflow detail
PATCH/api/v1/cases/{case_id}JWTcases:writeUpdate case
DELETE/api/v1/cases/{case_id}JWTcases:deleteDelete case and detach linked alerts back to triaged
GET/api/v1/cases/{case_id}/observablesJWTcases:readList case observables
POST/api/v1/cases/{case_id}/observablesJWTcases:writeAttach a case observable
GET/api/v1/cases/{case_id}/evidenceJWTcases:readList case evidence
POST/api/v1/cases/{case_id}/evidenceJWTcases:writeRegister evidence
POST/api/v1/cases/{case_id}/evidence/{evidence_id}/custodyJWTcases:writeRecord custody handoff
GET/api/v1/cases/{case_id}/commentsJWTcases:readList case comments
POST/api/v1/cases/{case_id}/commentsJWTcases:writeAdd analyst comment
GET/api/v1/cases/{case_id}/tasksJWTcases:readList case tasks
POST/api/v1/cases/{case_id}/tasksJWTcases:writeCreate case task
PATCH/api/v1/cases/{case_id}/tasks/{task_id}JWTcases:writeUpdate task lifecycle

Create Case Request:

{
"title": "Lateral Movement via PsExec",
"severity": "high",
"description": "Multiple hosts showing PsExec activity",
"alert_ids": ["uuid-1", "uuid-2"],
"assignee": "analyst@example.com"
}

Promote Alert to Case Request:

{
"description": "Escalated from alert triage",
"assignee": "ir@example.com"
}

Update Case Request:

{
"title": "Credential theft escalation",
"severity": "high",
"status": "pending_approval",
"description": "Waiting for analyst approval before containment",
"assignee": "lead@example.com",
"requires_human_approval": true
}

Case Detail Response now includes first-class workflow collections:

{
"id": "case-uuid",
"title": "Credential theft escalation",
"status": "investigating",
"severity": "high",
"description": "Investigate suspicious identity activity",
"timeline": [{"agent": "api", "action": "case_created", "timestamp": "..."}],
"observables": [{"type": "domain", "value": "evil.example.com"}],
"evidence": [{"name": "Identity provider audit export", "custody_entries": [{"action": "registered"}]}],
"comments": [{"author": "analyst@example.com", "body": "Escalating to IR"}],
"tasks": [{"title": "Collect host triage package", "status": "done"}]
}

Attach an observable:

{
"type": "domain",
"value": "evil.example.com",
"source": "threat-intel",
"tags": ["c2", "credential-theft"],
"context": {"confidence": "high"}
}

Register evidence:

{
"name": "Identity provider audit export",
"evidence_type": "log_bundle",
"storage_url": "s3://aurora/evidence/idp-audit.json",
"sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"location": "vault-a"
}

Update task lifecycle:

{
"status": "done",
"assignee": "ir@example.com"
}

Agents

MethodPathAuthPermissionDescription
GET/api/v1/agentsJWTagents:readList all 16 agents
POST/api/v1/agents/{id}/enableJWTagents:manageEnable agent
POST/api/v1/agents/{id}/disableJWTagents:manageDisable agent
POST/api/v1/agents/{id}/deployJWTagents:manageDeploy to site
PATCH/api/v1/agents/{id}/scaleJWTagents:manageScale instances (0-10)
POST/api/v1/agents/investigateJWTinvestigation:triggerStart investigation

Agent filtering parameters:

ParamTypeDescription
sitestringFilter by SOC site
statusstringactive|disabled|error
typestringAgent type enum

Investigation request (rate-limited):

{
"alert_context": "Suspicious DNS queries to known C2 domain t1.evil.com from 10.0.1.50",
"has_cps_assets": false,
"severity": "high"
}

Sites

MethodPathAuthPermissionDescription
GET/api/v1/sitesJWTsites:readList SOC sites
POST/api/v1/sitesJWTsites:manageRegister site
DELETE/api/v1/sites/{id}JWTsites:manageRemove site

SIEM

MethodPathAuthPermissionDescription
GET/api/v1/siem/logsJWTsiem:readSearch logs
GET/api/v1/siem/huntsJWTsiem:readList saved hunts
POST/api/v1/siem/huntsJWTsiem:searchCreate a saved hunt from current search state
PATCH/api/v1/siem/hunts/{hunt_id}JWTsiem:searchUpdate hunt metadata, tags, or sharing configuration
POST/api/v1/siem/hunts/{hunt_id}/runJWTsiem:searchRun a saved hunt and return the latest matches
POST/api/v1/siem/logs/{log_id}/promoteJWTalerts:write and optionally cases:writePromote a SIEM event into alert triage or a linked case
GET/api/v1/siem/sourcesJWTsiem:readList log sources
GET/api/v1/siem/statsJWTsiem:readSIEM statistics

Create or update a saved hunt:

{
"title": "Suspicious PowerShell execution",
"description": "Recurring hunt for PowerShell download cradles",
"query": "powershell AND IEX",
"source": "endpoint_security",
"severity": "warning",
"host": "ws-042",
"sharing_mode": "roles",
"shared_with_roles": ["analyst", "operator"],
"tags": ["powershell", "execution"]
}

Detection Engineering

MethodPathAuthPermissionDescription
GET/api/v1/detections/rulesJWTdetections:readList shared and owned detection rules
POST/api/v1/detections/rulesJWTdetections:writeCreate a detection rule
PATCH/api/v1/detections/rules/{rule_id}JWTdetections:writeUpdate rule enablement, templates, sharing, pivots, or scheduler metadata
POST/api/v1/detections/rules/{rule_id}/runJWTdetections:read + siem:searchEvaluate a rule and return current matching logs
GET/api/v1/detections/rules/{rule_id}/runsJWTdetections:readReturn persisted manual and scheduled execution history
GET/api/v1/detections/rules/{rule_id}/suppressionsJWTdetections:readList active and historical suppressions for a rule
POST/api/v1/detections/rules/{rule_id}/suppressionsJWTdetections:writeCreate a suppression window and criteria set
GET/api/v1/detections/rules/{rule_id}/feedbackJWTdetections:readList analyst verdict history for a rule
POST/api/v1/detections/rules/{rule_id}/feedbackJWTdetections:writeRecord true_positive, false_positive, or needs_tuning feedback
GET/api/v1/detections/metricsJWTdetections:readReturn 24-hour detection trend metrics for the dashboard

Create or update a detection rule with scheduled execution:

{
"name": "PowerShell download cradle",
"description": "High-signal PowerShell execution on workstations",
"query": "powershell.exe",
"source": "endpoint_security",
"match_severity": "warning",
"host": "ws-042",
"alert_severity": "high",
"auto_create_case": true,
"schedule_enabled": true,
"schedule_interval_minutes": 30,
"mitre_techniques": ["T1059.001"],
"sharing_mode": "team"
}

Manual run response now includes a persisted run record:

{
"rule": {
"id": "rule-uuid",
"name": "PowerShell download cradle",
"schedule_enabled": true,
"schedule_interval_minutes": 30,
"next_run_at": "2026-04-25T11:00:00+00:00"
},
"total": 4,
"suppressed_count": 1,
"run": {
"id": "run-uuid",
"trigger_mode": "manual",
"status": "completed",
"match_count": 4,
"suppressed_count": 1,
"sample_log_ids": ["log-1", "log-2"]
},
"logs": []
}

Detection metrics response:

{
"total_rules": 12,
"enabled_rules": 10,
"scheduled_rules": 6,
"runs_24h": 48,
"matches_24h": 121,
"suppressed_24h": 19,
"top_rules_by_matches": [
{"rule_id": "rule-a", "name": "PowerShell download cradle", "matches": 31}
],
"noisiest_rules": [
{"rule_id": "rule-b", "name": "Admin script allowlist candidate", "false_positives": 4}
]
}

Create a detection rule:

{
"name": "PowerShell download cradle",
"description": "Detects encoded PowerShell pulling remote content",
"query": "powershell AND IEX",
"source": "endpoint_security",
"match_severity": "warning",
"host": "ws-042",
"alert_severity": "high",
"alert_title_template": "Detection: {rule_name} on {host}",
"alert_description_template": "Matched event: {message}",
"auto_create_case": true,
"mitre_techniques": ["T1059.001", "T1105"],
"sharing_mode": "team",
"shared_with_roles": [],
"tags": ["powershell", "download-cradle"]
}

Create a suppression:

{
"name": "Suppress sandbox host",
"reason": "Lab machine generates known test traffic",
"criteria": {"host": "sandbox-01"},
"suppress_for_hours": 24
}

Record analyst feedback:

{
"verdict": "false_positive",
"alert_id": "alert-uuid",
"case_id": "case-uuid",
"siem_log_id": "log-uuid",
"notes": "Expected administrative automation",
"metadata": {"source": "siem_workspace"}
}

Promote a SIEM log under rule context:

{
"create_case": true,
"rule_id": "rule-uuid"
}

When the supplied rule has an active suppression matching the event, the promote route returns 409 instead of creating workflow objects.

EDR

MethodPathAuthPermissionDescription
GET/api/v1/edr/endpointsJWTedr:readList endpoints
GET/api/v1/edr/endpoints/{id}JWTedr:readEndpoint detail
POST/api/v1/edr/endpoints/{id}/isolateJWTedr:manageIsolate endpoint
POST/api/v1/edr/endpoints/{id}/unisolateJWTedr:manageRemove isolation
POST/api/v1/edr/endpoints/{id}/scanJWTedr:manageTrigger scan
GET/api/v1/edr/statsJWTedr:readEDR statistics

SOAR

MethodPathAuthPermissionDescription
GET/api/v1/soar/playbooksJWTsoar:readList playbooks
GET/api/v1/soar/playbooks/{id}JWTsoar:readPlaybook details
POST/api/v1/soar/playbooks/{id}/toggleJWTsoar:manageToggle enabled
POST/api/v1/soar/playbooks/{id}/executeJWTsoar:executeExecute playbook or return pending_approval for critical playbooks
GET/api/v1/soar/executionsJWTsoar:readExecution history
GET/api/v1/soar/rulesJWTsoar:readAutomation rules; returns an empty list outside dummy mode until a live rules backend exists
POST/api/v1/soar/rules/{id}/toggleJWTsoar:manageToggle rule; returns 503 outside dummy mode until a live rules backend exists

Outside dummy mode, /api/v1/soar/playbooks and /api/v1/soar/executions are backed by the live PostgreSQL playbooks and playbook_executions tables. AuroraSOC no longer fabricates seeded SOAR playbooks in dry_run or real mode.

Critical playbook execution response:

{
"playbook_id": "11111111-2222-3333-4444-555555555555",
"playbook_name": "Contain critical endpoint",
"status": "pending_approval",
"approval_id": "approval-uuid",
"requires_approval": true,
"steps_total": 1,
"message": "Critical playbook execution is blocked pending human approval"
}

Playbooks

MethodPathAuthPermissionDescription
GET/api/v1/playbooksJWTplaybooks:readList playbooks
POST/api/v1/playbooks/{id}/executeJWTplaybooks:executeExecute playbook
GET/api/v1/playbooks/executionsJWTplaybooks:readExecution history

CPS / IoT Devices

MethodPathAuthPermissionDescription
GET/api/v1/cps/devicesJWTcps:readList CPS devices
GET/api/v1/cps/devices/{id}JWTcps:readDevice detail
POST/api/v1/cps/devices/{id}/revokeJWTcps:manageRevoke certificate
GET/api/v1/cps/attestationsJWTcps:readAttestation results

Human Approvals

MethodPathAuthPermissionDescription
GET/api/v1/approvalsJWTapprovals:manageList pending approvals
POST/api/v1/approvals/{id}/decideJWTapprovals:manageApprove/deny

Decision request:

{
"approved": true,
"reason": "Verified - safe to isolate compromised host"
}

Reports

MethodPathAuthPermissionDescription
GET/api/v1/reportsJWTreports:readList reports
GET/api/v1/reports/{id}JWTreports:readFull report

Threat Intelligence

MethodPathAuthPermissionDescription
GET/api/v1/iocsJWTiocs:readList IOCs
POST/api/v1/iocsJWTiocs:writeCreate IOC

Statistics & Dashboard

MethodPathAuthPermissionDescription
GET/api/v1/stats/overviewJWTstats:readDashboard overview
GET/api/v1/dashboard/statsJWTstats:readFlat stats for frontend
GET/api/v1/correlationsJWTcps:readPhysical-cyber events
GET/api/v1/firmwareJWTcps:readFirmware inventory

Rate Limiting

Endpoint CategoryRate LimitWindow
General API100 reqper minute
Investigation trigger10 reqper minute
Playbook execution5 reqper minute

Edge Cases and Behavioral Notes

Idempotency and dedup behavior

  • Alert creation is dedup-aware and may return an existing record if a matching dedup hash already exists.
  • Client applications should treat repeated alert submissions with identical payload fingerprints as potentially idempotent.

Pagination drift under active writes

  • Offset pagination (skip, limit) can drift if new rows are inserted between requests.
  • For polling dashboards, prefer refreshing from skip=0 or use stable sort criteria in client logic.

Partial outage behavior

  • Some read endpoints may continue operating in degraded mode when a dependency is unavailable.
  • For write endpoints during dependency degradation, return-path semantics should be treated as non-committed unless success is explicit.
StatusTypical CauseClient Action
400Invalid payload/schemaCorrect request; do not retry blindly
401Missing/expired tokenRe-authenticate, retry once
403Permission deniedSurface authz error; no automatic retry
404Resource missingValidate identifiers
409Duplicate/conflictTreat as idempotency/conflict signal
429Rate limitedExponential backoff with jitter
503Dependency unavailableRetry with capped backoff

Versioning and Compatibility

  • Stable API namespace: /api/v1
  • Current platform release line: 2.0.x
  • Backward-incompatible changes should be released under a new major API prefix
Integration Recommendation

Create a thin SDK/client wrapper that centralizes token refresh, retry policy, and response validation. This improves consistency and reduces duplicated error-handling logic.

Error Responses

All errors follow a consistent format:

{
"detail": "Alert not found"
}
Status CodeMeaning
400Bad request / validation error
401Missing or invalid JWT token
403Insufficient permissions
404Resource not found
429Rate limit exceeded
503Database unavailable (degraded mode)

Degraded Mode

When PostgreSQL is unavailable, the API automatically falls back to in-memory data stores with demo data. This ensures the dashboard and monitoring remain functional during database maintenance.

@app.exception_handler(DatabaseUnavailable)
async def _handle_db_unavailable(request, exc):
return JSONResponse(
status_code=503,
content={"detail": "Database unavailable — running in degraded mode"},
)