11.4.1. API Reference#
The FlareInspect web dashboard exposes a REST API for programmatic access to assessments, posture graphs, compliance reports, exports, and (since v2.0) SIEM shipping and notification dispatch.
11.4.1.1. Base URL#
By default the dashboard runs at http://127.0.0.1:<PORT>. The
port is displayed on startup (or set via the PORT environment
variable).
11.4.1.2. Interactive docs (Swagger / OpenAPI)#
A bundled, interactive Swagger UI is served by the dashboard:
URL |
Description |
|---|---|
|
Swagger UI — browse every endpoint and Try it out against the running server |
|
The raw OpenAPI 3 specification (machine-readable; import into Postman/Insomnia) |
The same link is available from the dashboard sidebar (API docs) and the
API health page. When FLAREINSPECT_API_KEY is set, use the Authorize
button in Swagger UI to supply your key for Try it out requests.
11.4.1.3. Authentication#
If FLAREINSPECT_API_KEY is set, all API requests must include:
X-API-Key: <your-api-key>
The remediation endpoints (/api/remediate/apply and
/api/remediate/rollback) additionally require FLAREINSPECT_ALLOW_REMEDIATION=true
and a body-level token that passes verifyEditScope. See
Authentication and Edit-Scope Policy for the full policy.
11.4.1.4. Endpoints#
Endpoint |
Method |
Description |
|---|---|---|
|
GET |
Get the latest assessment |
|
GET |
List all saved assessments |
|
GET |
Get a specific assessment by UUID |
|
POST |
Run a new assessment |
|
GET |
Map the latest assessment’s findings to a compliance framework |
|
POST |
Compare two assessments for drift |
|
GET / PUT |
Read (masked) or update the runtime settings overlay — notifications, AI, SIEM (v2.0) |
|
GET |
Resource graph + attack paths for an assessment (v2.0) |
|
POST |
Dispatch a summary to Slack / Teams / webhook (v2.0) |
|
POST |
Ship an assessment to Elasticsearch / Splunk HEC, or write NDJSON to disk (v2.0) |
|
GET |
Return the recommended Elasticsearch index template (v2.0) |
|
POST |
Build a remediation plan (dry-run, no mutation) |
|
POST |
Apply a remediation plan (gated, mutates Cloudflare) |
|
POST |
Roll back from a backup bundle (gated, mutates Cloudflare) |
|
GET |
List available rollback bundles |
|
GET |
Health check |
|
GET |
Download latest assessment as JSON |
|
GET |
Download latest HTML report |
|
GET |
Download SARIF |
|
GET |
Download Markdown |
|
GET |
Download CSV |
|
GET |
Download ASFF |
|
GET |
Render the embedded HTML report |
11.4.1.5. Content Type#
All POST endpoints accept and return application/json. GET
endpoints for downloads return the appropriate content type for the
requested format.
11.4.1.6. Environment variables#
The server reads the following env vars at boot.
Variable |
Default |
Purpose |
|---|---|---|
|
|
Bind address for the HTTP server |
|
auto |
Bind port (auto-selects a free port when unset) |
|
unset |
When set, require |
|
|
Global kill-switch for |
|
unset |
Opaque-secret value that |
|
unset |
Default |
|
unset |
Default Elasticsearch API key (Basic-auth |
|
unset |
Default |
|
unset |
Default Splunk HEC token |
|
unset |
Default Slack incoming-webhook URL for |
|
unset |
Default Teams Power Automate webhook URL for |
|
unset |
Default generic webhook URL for |
|
unset |
HMAC-SHA256 secret used to sign the generic webhook payload |
|
unset |
Default minimum severity for notifications ( |
|
unset |
Default AI planner provider ( |
|
unset |
Optional AI keys for the remediation planner (Claude / OpenAI SDKs are optional deps) |
|
|
Base URL for a local Ollama server (offline AI planner) |
11.4.1.7. Runtime settings overlay#
Notifications, the AI planner, and SIEM credentials can be configured from the
dashboard’s Settings page instead of (or in addition to) the environment.
Values are persisted to a local, git-ignored web/data/settings.json (mode
0600) and override the matching environment variable at request time.
Resolution precedence for every key is: saved settings value → environment
variable → unset. Reading the overlay (GET /api/settings) never returns
secrets in the clear — only whether each key is configured, its source
(settings / env / none), and a short masked hint.
The remediation gate (FLAREINSPECT_ALLOW_REMEDIATION) and edit-scope token
(FLAREINSPECT_EDIT_SCOPE) are intentionally not part of this overlay —
they remain env-only so live Cloudflare writes can never be enabled from the
browser.