Analytics
GET /api/runtime-security/analytics?days=14
Returns aggregate counts for the window.
minutes=N instead of days=N for sub‑day windows
(1 ≤ N ≤ 5256000).
How to read the numbers
| Field | What it tells you |
|---|---|
verdict_breakdown | The shape of your traffic. If block spikes, investigate before tuning. |
pii_category_breakdown | Which categories are actually firing. Drives custom rule decisions. |
top_injection_labels | The labels the model is producing. Useful for spotting an emerging attack family. |
series | Daily series. Plot it to see weekend / weekday rhythms or rollout impact. |
Event log
GET /api/runtime-security/events
Paginated event list.
| Parameter | Type | Notes |
|---|---|---|
limit | int | 1–500. Default 50. |
before_uuid | string | Cursor for pagination. Pass the last UUID you saw. |
verdict | string | Filter to allow, redact, or block. |
direction | string | Filter to input, output, or tool_call. |
uuid, verdict,
text, redacted_text, scoring breakdown, App id, config version,
and any custom_params attached at scan time.
Drift
GET /api/runtime-security/drift?baseline_days=30&recent_days=7
Population Stability Index (PSI) per dimension:
verdictdirectionsource_appmodelproviderpii_categoryinjection_labelblocked_reason
| PSI value | Reading |
|---|---|
< 0.1 | Stable. No action. |
0.1 – 0.25 | Mild drift. Worth a glance. |
> 0.25 | Significant drift. Investigate. |
injection_label is the canonical “model is missing a
new attack pattern” signal, investigate and consider updating the
phrase pack or threshold.
Streaming
Rolling‑window streaming with mid‑stream cancellation is supported on the following proxy routes:- OpenAI (
stream=true) - Anthropic (
stream=true) - Every OpenAI‑compatible provider (Groq, DeepSeek, Perplexity, Mistral, OpenRouter, Cerebras, self‑hosted)
- Google Gemini (
:streamGenerateContent) - Vertex AI (
:streamGenerateContent)
block.
Not yet streamed
- AWS Bedrock
/converse-stream, uses the AWS event‑stream binary framing that needs a custom parser. Use the non‑streaming/converseroute for now. - Legacy OpenAI
/v1/completions, rejected with400.
Where the dashboard surfaces this
| Page | What it shows |
|---|---|
| Runtime Security → Overview | Verdict timeline and per‑App split. |
| Runtime Security → Events | Paginated event log with filter panel. |
| Runtime Security → Drift | PSI heatmap with click‑through to the event log filtered by the suspicious dimension. |
| Runtime Security → Apps | Per‑App verdict mix and quota usage. |
Common workflows
Quarterly review
Quarterly review
Pull
analytics?days=90 for each App. Plot verdict mix and PII
categories alongside your model release timeline to see what
changed.Tune a noisy App
Tune a noisy App
drift?baseline_days=30&recent_days=3to see what’s shifted.- If
injection_labeldrifted, inspect thetop_injection_labelsanalytics field for the new label. - Add a custom phrase or adjust the threshold, then watch the next drift run.
Ship live data to your SIEM
Ship live data to your SIEM
Poll
/events with before_uuid cursoring from a scheduled job.
Push to your SIEM with the uuid so cross‑system queries can
join on it.
