XCloak / docs

API Reference

Base URL: http://localhost:8080. Every endpoint below is generated directly from the backend's own OpenAPI 3.0 spec — 62 operations across 13 categories, not a curated subset. Raw spec: openapi.yaml.

Authentication

Browser sessions authenticate via an httpOnly token cookie set by POST /api/auth/login — no Authorization header needed for dashboard use. Protected endpoints read this cookie automatically. Agent endpoints authenticate with a per-agent key in the X-Agent-Key header instead. Endpoints marked (no auth) below are intentionally public (login, registration, password reset).

Jump to category

Auth

User authentication and session management

MethodPathDescription
POST/api/auth/loginLog in with username + password (no auth)
POST/api/auth/login/2faComplete TOTP two-factor login (no auth)
POST/api/auth/logoutLog out (clears auth cookies)
POST/api/auth/registerRegister a new user (first user gets admin) (no auth)
POST/api/auth/forgot-passwordRequest a password reset link via email (no auth)
POST/api/auth/reset-passwordReset password with a token from email link (no auth)
GET/api/auth/profileGet the current user's profile
PATCH/api/auth/profileUpdate profile (email)
POST/api/auth/change-passwordChange password (requires current password)

Signup

Self-serve tenant provisioning

MethodPathDescription
POST/api/signupSelf-serve tenant provisioning (no SMTP required) (no auth)

Agents

Endpoint agent registration and telemetry

MethodPathDescription
GET/api/agentsList agents (optionally filtered by platform)
POST/api/agents/registerRegister a new endpoint agent (no auth)
GET/api/agents/{id}Get a single agent by ID
GET/api/agents/{id}/summaryGet a rich summary (health, risk, recent events) for an agent
POST/api/agents/heartbeatAgent heartbeat (agent-authenticated)
POST/api/agents/logsSubmit log batch from an agent

Alerts

Security alert lifecycle

MethodPathDescription
GET/api/alertsList recent alerts
GET/api/alerts/paginatedPaginated alert list
GET/api/alerts/{id}Get alert detail with AI triage result
POST/api/alerts/{id}/acknowledgeAcknowledge an alert
POST/api/alerts/{id}/resolveResolve an alert

Incidents

Incident management and IR lifecycle

MethodPathDescription
GET/api/incidentsList incidents
PUT/api/incidents/{id}/statusUpdate incident status
POST/api/incidents/{id}/notesAdd analyst note to incident

Sigma

Sigma detection rules

MethodPathDescription
GET/api/sigma/rulesList all Sigma detection rules for the tenant
POST/api/sigma/rulesCreate a new Sigma rule
GET/api/sigma/rules/{id}Get a Sigma rule by ID
PUT/api/sigma/rules/{id}Update a Sigma rule
DELETE/api/sigma/rules/{id}Delete a Sigma rule
PATCH/api/sigma/rules/{id}/enableEnable a Sigma rule
PATCH/api/sigma/rules/{id}/disableDisable a Sigma rule
POST/api/sigma/rules/testTest Sigma rules against a sample log message
GET/api/sigma/statsGet Sigma rule statistics (total, enabled, by severity)

IOC

Indicators of Compromise

MethodPathDescription
GET/api/iocsList IOCs
POST/api/iocsCreate an IOC
PATCH/api/iocs/{id}/enableEnable an IOC
PATCH/api/iocs/{id}/disableDisable an IOC
POST/api/iocs/importBulk import IOCs from a text list

YARA

YARA rules and scan matches

MethodPathDescription
GET/api/yara/rulesList YARA rules
POST/api/yara/rulesCreate a YARA rule
GET/api/yara/matchesList YARA match events

Firewall

Firewall rule management and sync

MethodPathDescription
GET/api/firewall/rulesList firewall rules
POST/api/firewall/rulesCreate a firewall rule
GET/api/firewall/rules/{id}Get a firewall rule by ID
PUT/api/firewall/rules/{id}Update a firewall rule
DELETE/api/firewall/rules/{id}Delete a firewall rule
POST/api/firewall/syncPush firewall rules to all online agents
GET/api/firewall/statsFirewall hit statistics and tag distribution
GET/api/firewall/policyGet per-tenant default action + enforcement mode
PUT/api/firewall/policySet default action and mode
POST/api/firewall/rules/bulkBulk enable / disable / delete rules by ID list
POST/api/firewall/rules/importImport rules from JSON (replace or merge)
GET/api/firewall/templatesList 12 built-in rule templates
GET/api/firewall/expiredList expired rules
DELETE/api/firewall/expiredPrune all expired rules
GET/api/firewall/conflictsDetect CIDR / port-range / direction conflicts between rules

Deep Packet Inspection

L7 DPI findings: DGA domains, TLS anomalies, HTTP threats, protocol tunneling

MethodPathDescription
GET/api/dpi/findingsList DPI findings — filterable by agent_id, finding_type, severity, alert_only, limit, offset
GET/api/dpi/summary24-hour finding counts broken down by type and severity

Users

User and role management

MethodPathDescription
GET/api/usersList users in the tenant
POST/api/users/inviteInvite a user (sends email with set-password link)
PUT/api/users/{id}/roleUpdate a user's role
PATCH/api/users/{id}/toggleEnable or disable a user account

Platform

Platform-admin tenant provisioning

MethodPathDescription
GET/api/platform/tenantsList all tenants (platform admin only)
POST/api/platform/tenantsCreate a tenant and invite its first admin via email
PATCH/api/platform/tenants/{id}/toggleSuspend or reactivate a tenant
GET/api/platform/capabilitiesIs this deployment the license authority? (drives which admin tabs the UI shows)
GET/api/platform/saas/modeGet current SaaS/self-hosted deployment mode
POST/api/platform/saas/modeToggle SaaS mode on/off (authority instances only)
GET/api/platform/saas/statsAggregate SaaS subscription stats across tenants
GET/api/platform/saas/subscriptionsList all tenant subscriptions
PATCH/api/platform/saas/subscriptions/{tenantID}Update a tenant's plan/status/notes

Logs

Log search and retention

MethodPathDescription
GET/api/logs/searchFull-text search across ingested logs
GET/api/logs/statsLog volume and severity distribution stats
GET/api/logs/retentionGet current retention policy
PUT/api/logs/retentionSet retention policy (admin only)

Dashboard

Dashboard overview metrics

MethodPathDescription
GET/api/dashboard/overviewDashboard overview metrics
GET/api/healthLiveness check (no auth)
GET/api/health/deepDeep health check (DB, Kafka, circuit state) (no auth)