Skip to main content

Analytics Endpoints

Endpoints under /api/analytics/* query the Elasticsearch-backed view of test results. All require analytics:dashboards:read permission (or higher); the configuration endpoints require analytics:settings:read / analytics:settings:write.

With REQUIRE_ORG_ISOLATION=true, a caller without an organization gets 403 on every result endpoint. Responses that queried Elasticsearch carry a Server-Timing header (es = time spent waiting on Elasticsearch and the number of calls, es-took = time Elasticsearch reports).

Use the Programmatic Access guide for examples

This page is the parameter reference. For curl examples, common recipes (CI gates, SIEM forwarders, drift detection), and a walkthrough of the three score variants, read the Programmatic Access guide.

Shared filter parameters​

Most endpoints accept the same filter vocabulary. Pass any combination:

ParamTypeDescription
fromstringStart of window. Accepts ISO-8601 (2026-04-23T00:00:00Z), calendar dates (2026-04-23), or Elasticsearch date math (now-30d).
tostringEnd of window. Same formats as from.
orgstringOrganization whose results to include (the routing.oid of the results: the org of the task that produced them). For a user or API key in a Clerk organization it is always that organization: omitted means its own, any other value returns 403. Users without an organization can pass any org, or omit it for all.
testsstringComma-separated test UUIDs.
techniquesstringComma-separated MITRE ATT&CK technique IDs (e.g. T1486,T1059).
hostnamesstringComma-separated hostnames.
categoriesstringComma-separated test categories.
severitiesstringComma-separated severities: low, medium, high, critical. Still accepted; the console no longer shows or filters by severity.
threatActorsstringComma-separated threat-actor names.
tagsstringComma-separated tags.
errorNamesstringComma-separated error names (resolved from exit codes).
errorCodesstringComma-separated exit codes.
bundleNamesstringComma-separated bundle test names.
resultstringOne of: all, protected, unprotected, inconclusive.
basisstringexecutions (default) or latest. Selects how the Defense Score endpoints count; see Score basis. Anything else returns 400 Invalid basis.
scoringModestringany-stage (default): a multi-stage test on a host counts once and is protected if any stage is blocked or detected; this is the rule the dashboard uses. all-stages: every stage is scored on its own. Any other value returns 400 Invalid scoringMode. Before this default changed, an omitted scoringMode meant all-stages; pass it explicitly to keep the per-stage numbers. /defense-score/by-technique still defaults to all-stages.
Default time window is 7 days

If you don't pass from/to, every endpoint applies a now-7d date filter. The dashboard UI defaults to Last 30 days — so the same query that fills the UI may return zero rows when called from the API without explicit dates. Always pass from (and optionally to) when scripting against the API.

Score basis​

basis chooses what the Defense Score counts.

  • executions (default) -- every execution in the window counts once.
  • latest -- the share of test × endpoint pairs whose most recent conclusive result in the window was blocked or detected. A pair is keyed by organization + test UUID + hostname. In any-stage scoring mode, a non-cyber-hygiene bundle on a host is one pair, protected if any stage of its latest run is.

Under latest:

  • The date range sets the freshness window. It is capped at 365 days (All time becomes "last 365d").
  • Outcome filters (result, errorCodes, errorNames) select the pairs whose latest result matches. result=protected|unprotected follows the pair's verdict, the same rule the score counts: an EDR-detected 101 is protected, and an any-stage bundle pair matches exactly one of the two. errorCodes and errorNames match any code or name in the latest result, so a bundle pair whose latest run mixes 101 and 126 matches both errorCodes=101 and errorCodes=126.
  • The server keeps each fetched pair set for up to 30 seconds and reuses it across requests with the same filters (outcome filters aside), so a relative range such as now-7d can be up to 30 seconds stale.
  • Under latest, from/to accept now, now-<n><unit> (units d, h, w, m or M, where m/M = 30 days) and ISO dates. ES date math such as now/d is rejected, as is an unparseable or reversed range, with 400 Invalid date range.
  • result=inconclusive yields no pairs under latest, because only conclusive results are scored.
  • These endpoints accept basis=latest: /defense-score, /defense-score/trend, /defense-score/by-category-subcategory, /defense-score/by-hostname, /technique-distribution, /test-coverage, /threat-actor-coverage. Their counts become pairs. For test-coverage, pairs are grouped by test name; each pair is one host × test, so each count is a number of hosts. technique-distribution always scores per stage, even with scoringMode=any-stage. Each bundle control is its own pair, judged by its own latest result, so a technique shows unprotected when its own stage got through, even if another stage of the same bundle was stopped. An EDR detection counts for a stage only when the EDR's alert matched that stage itself (<vendor>_stage_detected); an alert that named only the bundle, or another of its stages, does not make the stage detected.
  • These endpoints are executions-only and ignore basis=latest: by-test, by-technique, by-severity, by-category, by-org.

Endpoints​

Defense Score​

GET /api/analytics/defense-score

Returns the aggregate defense score and breakdown counts for the filtered window.

Response shape:

{
"score": 54.59, // blocked OR detected by a connected EDR, risk-accepted excluded
"realScore": 53.21, // blocked only, risk-accepted excluded
"rawScore": 53.83, // blocked OR detected, WITHOUT risk-acceptance exclusion
"protectedCount": 1391, // blocked
"detectedCount": 36, // not blocked, but an EDR alert matched the test
"unprotectedCount": 1187, // neither
"totalExecutions": 2614, // = protected + detected + unprotected
"riskAcceptedCount": 37 // excluded from totalExecutions
}

See the guide for when to use each score variant.

With basis=latest&withNoConclusive=true the response also has noConclusiveCount: test × endpoint pairs with results in the window but no conclusive one yet (for example every run blocked before it started, exit 260). It is the Outcome breakdown's "No conclusive result yet" count, over the same pairs as pairCount (cyber-hygiene controls included), and 0 under outcome filters. It costs one more query, so it is off by default.

With basis=latest the response adds two fields and changes the meaning of the counts:

{
"basis": "latest",
"pairCount": 212, // test × endpoint pairs in the window
"totalExecutions": 212, // equals pairCount
"score": 71.23, // null when there are no pairs
"realScore": 68.40, // strict score: blocked only
"rawScore": 70.75 // score before risk acceptances
// protectedCount, detectedCount, unprotectedCount, riskAcceptedCount count pairs
}

Defense Score Trend​

GET /api/analytics/defense-score/trend

Returns the score over time for trend visualization.

Additional parameters:

ParamTypeDescription
intervalstringHistogram bucket size (e.g. day, hour).
windowDaysnumberRolling window size, 1–90 days, applied per bucket. An explicit value is honoured and clamped to [1, 90]. Ignored under basis=latest.

Trend lines extend to now. A rolling window with no data returns score: null rather than 0, so charts show a gap.

With basis=latest each point is the same latest-result calculation as of that UTC day (weekly points for ranges over 90 days). The last point always equals the /defense-score tile for the same range, and points can have score: null when the window holds no pairs.

realScore / realTotal / realProtected on trend points keep their existing meaning on both bases: the raw, pre-risk-acceptance series, present only when risk-acceptance exclusions exist. This differs from realScore on /defense-score under latest, which is the strict, blocked-only score.

Defense Score by Test / Technique / Org / Severity / Category / Hostname​

GET /api/analytics/defense-score/by-test
GET /api/analytics/defense-score/by-technique
GET /api/analytics/defense-score/by-org
GET /api/analytics/defense-score/by-severity
GET /api/analytics/defense-score/by-category
GET /api/analytics/defense-score/by-category-subcategory
GET /api/analytics/defense-score/by-hostname

All accept the shared filter parameters and return protected/unprotected counts grouped by the named dimension. by-test takes limit (default 10) and by-hostname takes limit (default 50). by-technique defaults to scoringMode=all-stages.

Recent Executions​

GET /api/analytics/executions

Flat list of recent test executions, enriched with catalog metadata. Returns at most limit rows.

Additional parameters:

ParamTypeDescription
limitnumberMax rows returned (default 50).

Response: array of EnrichedTestExecution. Every row has test_uuid, test_name, hostname, is_protected, org, timestamp, error_code and error_name, plus test_version and version_state when they apply (see Test version on result rows).

Test version on result rows​

Rows of GET /api/analytics/executions and /executions/paginated say which version of the test produced the result. The version is copied from the server's build record into the task when the task is created, and from the task into every result document of that run; nothing an endpoint reports can set it. Not available on backend-serverless (testVersions: false in /api/capabilities).

test_version (object) is present only when the result recorded a version:

FieldPresentDescription
built_atalwaysWhen the binary was built (or uploaded), ISO 8601 in UTC (2026-11-23T10:00:00.000Z).
build_sourceoptionalbuilt (Build & Sign) or uploaded (an uploaded binary).
fingerprintoptionalFingerprint of what went into the binary. Only when the binary sent had the SHA-256 recorded for that build, from unmodified source; absent for an uploaded binary, a build with no recorded version, a build from locally changed source and a task created while a rebuild was replacing the binary.
commitoptionalLibrary commit the binary was built from. Same condition as fingerprint, and absent for a custom test (no git commit).
commit_dateoptionalCommit date of that source, ISO 8601 in UTC: a commit made at 14:03:11-04:00 reads 18:03:11.000Z. Same condition as commit.

version_state compares the result with the test as it is synced now, so a Sync can change it. It is left out when the backend could not read the current test versions (the rows are returned without it):

ValueMeaning
currentBuilt from the source you have now: the result's fingerprint equals the synced test's, or the result has a fingerprint and its commit is the library commit synced now.
olderThe result has a fingerprint, the synced test's differs, and its commit is not the one synced now: the source changed since that binary was built.
unknownA version was recorded but can't be compared: it has no fingerprint, or the test is no longer in the library.
not_recordedThe result has no test_version: recorded before versions were stored, or from a task created before that (a Retry of an older task included).

Paginated Executions​

GET /api/analytics/executions/paginated

Filtered, grouped, paginated execution results. Accepts every shared filter plus pagination controls.

Additional parameters:

ParamTypeDescription
pagenumberPage number (1-indexed, default 1).
pageSizenumberResults per page (default 25, maximum 100; a larger value is lowered to 100). To export every matching result, request page after page until hasNext is false.
sortFieldstringField to sort by.
sortOrderstringasc or desc.
groupedbooleanIf true, groups results by bundle/standalone identity.
verdictstringprotected, prevented, detected or silent: keeps only rows with that outcome, for attack tests only (cyber-hygiene bundles are excluded, matching the Outcome breakdown card; any other value is a 400 Invalid verdict). Read only by this endpoint. It is what the Outcome breakdown card's legend rows open on the Executions tab.
versionStatestringcurrent, older, unknown or not_recorded: keeps only rows in that version state, by the same rule as version_state. Any other value is a 400 Invalid versionState; a 503 Test versions are not available when the backend can't read the current test versions, and a 400 Too many tests to filter by version when the library has more than 10,000 tests. Read only by this endpoint. Not available on backend-serverless.
testUuidstringOne test by its UUID, or a bundle by its UUID (its stages and controls). The tests filter matches by name; this one is exact. With hostnames it lists the runs of one coverage matrix pair. 400 Invalid testUuid when it is not a UUID. Read only by this endpoint. Not available on backend-serverless.

Response shape depends on the grouped parameter:

Default — flat (grouped=false or omitted)​

{
"data": [
{ /* one EnrichedTestExecution per ES document — ~20 fields incl. test_uuid, test_name,
hostname, is_protected, timestamp, error_code, error_name, category, severity,
techniques, tactics, score, bundle_id, control_id, is_bundle_control,
defender_detected, … */ }
],
"pagination": { "page": 1, "pageSize": 25, "totalItems": 480, "totalPages": 20, "hasNext": true, "hasPrevious": false }
}

One row per actual execution. Bundle tests appear as multiple rows (one per control, with is_bundle_control: true and a control_id). Best for SIEM forwarding, CSV exports, or any per-execution analysis.

Bundle-control rows may also carry an optional control_description (plain-language "what this stage does", from the control's description in bundle_results.json). It is omitted when empty, so older runs do not have it. Members of a multi-stage run are returned in stage order ("Stage 2" before "Stage 10"; validators not named "Stage N" follow, sorted by validator then control_id).

?grouped=true — bundle-aware grouping​

{
"groups": [
{
"groupKey": "standalone::<test_uuid>::<hostname>::<event_time_ms>",
"type": "standalone" | "bundle",
"representative": { /* one EnrichedTestExecution */ },
"members": [ /* all matching docs in this group */ ],
"protectedCount": 3,
"unprotectedCount": 1,
"totalCount": 4,
"defenderDetected": true
}
],
"pagination": { "page": 1, "pageSize": 25, "totalGroups": 142, "totalDocuments": 480, "totalPages": 6, "hasNext": true, "hasPrevious": false }
}

One row per "run" — bundle tests collapse from N controls into a single entry. Best for dashboards and rollups where you want to count "one bundle run" rather than N control checks.

Coverage Aggregates​

GET /api/analytics/host-test-matrix — treemap data (host × test): a standalone test counts its results, a bundle counts its runs under the bundle name (never one cell per stage)
GET /api/analytics/technique-distribution — protected/unprotected per MITRE technique
GET /api/analytics/test-coverage — protected/unprotected per test
GET /api/analytics/threat-actor-coverage — coverage broken down by threat actor
GET /api/analytics/error-rate — error count and rate over the window (errors: exit 0, 1, 259, 999, except a skipped stage of an attack bundle and an error stage the EDR prevented)
GET /api/analytics/error-rate/trend — error rate over time (rolling window defaults to the range length, capped at 365 days; explicit `windowDays` is clamped to 1–90; empty windows return `errorRate: null`)
GET /api/analytics/results-by-error-type — breakdown by error code/name

All accept the shared filter parameters. host-test-matrix reads at most the 365 days before the end of the range (a longer range, such as "All time", is shortened to that) and at most 200,000 cells each for standalone tests and for bundles; when that limit cut the result, the response carries the header X-Result-Truncated: true and the array is incomplete. technique-distribution, test-coverage and threat-actor-coverage also accept basis=latest. Under latest, threat-actor-coverage also returns pairCount and lastTestedAt per actor.

Technique Outcomes​

GET /api/analytics/technique-outcomes

Accepts the shared filter parameters. Returns one entry per technique with protected, detected, unprotected and lastTestedAt. It always uses the latest-result basis, scores each stage on its own (like technique-distribution), and is not capped. The basis parameter is ignored. It feeds the ATT&CK outcome matrix on the Security Dashboard.

Outcome Breakdown​

GET /api/analytics/outcome-breakdown

Splits the latest result of each test x endpoint pair into the four outcomes the Analytics dashboard's Outcome breakdown card shows. It accepts the shared filter parameters, always uses the latest-result basis (the basis parameter is ignored), and ignores the outcome filters (result, errorCodes, errorNames), because narrowing a breakdown by outcome would only hide slices. Cyber-hygiene bundles are excluded: the card covers attack tests only. Response fields:

FieldDescription
pairCountPairs with a conclusive latest result; always protected + prevented + detected + silent.
protectedThe control blocked the test.
preventedThe test ran and the EDR stopped it.
detectedThe test ran and the EDR raised an alert, without stopping it.
silentThe test ran and nothing alerted.
noConclusivePairs that have results in the window but none conclusive (all errors); not part of pairCount.
riskAcceptedPairs left out of the counts because a risk acceptance covers them.
windowLabelActive window, for example 30d, or last 365d when the window is capped.

protected + prevented + detected equals the Defense Score's protected pairs when the window holds no cyber-hygiene data.

Chain Depth​

GET /api/analytics/chain-depth

Accepts the shared filter parameters. For each multi-stage (non-cyber-hygiene) chain, it takes the latest run on each host and reports the stage where it was blocked (by the endpoint, exit 105/126/127, or by the EDR's own action on an error-coded stage, which the Executions view labels Prevented). Response fields: chains, buckets ([{ stage, blocked, alertedNotBlocked, bundleNames }]), endToEnd, endToEndAlerted, endToEndBundleNames, endToEndAlertedBundleNames, endToEndUndetectedBundleNames, inconclusive, blockedBeforeRun, blockedBeforeRunBundleNames, and stageErrors. There are always four buckets, stage 1, 2, 3 and 4, where 4 means "4+" (blocked at stage 4 or later). alertedNotBlocked counts the bucket's chains where a connected EDR detected a stage without blocking it. endToEndAlerted has the same alerted-not-blocked meaning for the chains that ran end to end. endToEndAlertedBundleNames and endToEndUndetectedBundleNames list the bundles behind those two groups; a bundle appears in both when its chains differ by host. Chains whose latest run had a stage error or a pre-execution block are counted in inconclusive only, which splits into blockedBeforeRun (a stage was blocked before it ran, exit 260; the technique was not evaluated; blockedBeforeRunBundleNames lists the bundles) and stageErrors (for example exit 999). A run with both counts as blockedBeforeRun. An error or pre-execution block on a stage numbered after the run's first blocked stage doesn't make the run inconclusive: the chain was already stopped, so it counts at that stage (chains that keep running after a block, such as The Gentlemen, can error later). An error before the first block, or a stage without a Stage N number, keeps the run inconclusive. Runs where an EDR killed the agent mid-test (see Exit Codes & Outcomes) carry no stages: they are counted in chains and in the new agentTerminated count, with agentTerminatedBundleNames listing their bundles, and are never placed in a stage bucket (the UI shows "Stopped by EDR, stage unknown: N"). A blocked chain's stage is its lowest-numbered blocked stage (from the Stage N validator), so a chain that keeps running after a block, such as LockBit 298cc137, counts where it was first stopped, and alertedNotBlocked counts only detections on stages before that one. Runs without stage numbers fall back to the number of stages that ran, which gives the same stage for chains that stop at the first block.

The row endpoints (GET /api/analytics/executions and /executions/paginated) add edr_terminated (true for a run proven to be killed by the EDR), edr_terminated_vendors (for example defender, crowdstrike, sentinelone), edr_terminated_alert_ids (the alert ids that are the evidence) and stages_unknown. These rows are Protected as a whole and are excluded from the technique endpoints.

Stage Coverage​

GET /api/analytics/stage-coverage

Accepts the shared filter parameters. Always latest-result posture: basis and scoringMode are ignored. It reads the same chains as chain-depth (the latest run of each multi-stage, non-cyber-hygiene chain on each host, inconclusive latest runs left out) and reports how many stages of those runs were caught. The Defense Score is not affected. Not available on backend-serverless (stageCoverage: false in /api/capabilities).

{
"chains": 23,
"chainsProtected": 20,
"stagesRan": 97,
"blocked": 28,
"detected": 13,
"through": 56,
"coverage": 42.27,
"singleStage": { "count": 6, "bundleNames": ["Chain A"] },
"depthNotTested": { "count": 9, "bundleNames": ["Chain B"] },
"layered": { "count": 5, "bundleNames": ["Chain A"] },
"noneCaught": { "count": 3, "bundleNames": ["Chain C"] }
}
  • chains is the number of chains counted. Runs with no stages (the EDR killed the agent, or blocked the test at launch) are left out, so it is chain-depth's chains minus those runs. chainsProtected is how many of them the Defense Score counts as protected (any-stage rule).
  • stagesRan is the stages with a conclusive result; stagesRan = blocked + detected + through. blocked is a stage blocked by the endpoint (exit 105/126/127) or an error-coded stage the EDR's own action stopped. detected is an unblocked stage an EDR alert named itself; an alert that only named the bundle or a sibling stage does not count. coverage is (blocked + detected) / stagesRan as a percentage, null when no stage ran.
  • The four groups add up to chains; each has a count and the distinct, sorted bundleNames (a bundle can be in more than one group when its chains differ by host):
    • singleStage: every stage ran and exactly one was caught.
    • depthNotTested: one stage was caught and other stages produced no result, either Skipped (exit 0, the run stopped at its first block) or errored after the block, so its depth is unknown.
    • layered: two or more stages caught.
    • noneCaught: no stage caught on its own evidence. This includes the rare chain that is protected only through an alert naming the bundle.

Coverage Matrix​

GET /api/analytics/coverage-matrix

The latest result of every test on every host: one cell per test x host pair. The cells are the Defense Score's latest-result, any-stage pairs, read by the same code, so a cell and the score agree; the two places where the matrix shows one cell for what the score counts as more are listed at the end of this section. It accepts the shared filter parameters for scope (organization, dates, tests, hosts, techniques, categories, tags, threat actors). basis and scoringMode are ignored, and so are the outcome filters (result, errorCodes, errorNames, and the verdict of /executions/paginated): narrowing a matrix by outcome would only hide cells. The window is capped at 365 days. Not available on backend-serverless (coverageMatrix: false in /api/capabilities).

ParameterTypeDescription
rowsstringtests (default) or hosts. Any other value is a 400 Invalid rows.
pagenumberPage of hosts, from 1 (default 1). 400 Invalid page for 0 or a non-number.
pageSizenumberHosts per page (default 25, at most 100). 400 Invalid pageSize for a non-number.
teststringA test or bundle UUID: only that test is listed, and only the hosts that have a cell for it. 400 Invalid test when it is not a UUID.
statestringprotected, detected, unprotected, no_verdict or risk_accepted: only hosts whose cell (for test, or for any test without it) is in that state. 400 Invalid state otherwise. A cyber-hygiene cell has a ratio and no state, so it never matches.

page, pageSize, test and state are used with rows=hosts only. They are checked on every request, so a bad value is a 400 with rows=tests too.

What a cell shows

verdictMeaning
protectedThe latest conclusive result was blocked, or the EDR prevented it.
detectedThe test ran and an EDR alert named it; nothing stopped it.
unprotectedThe test ran and nothing alerted.
no_verdictThe pair has results in the window, none of them conclusive. A pair whose newest run has no verdict still shows its older conclusive result, as the Defense Score does.
risk_acceptedA risk acceptance covers every result of the pair, with or without a verdict. It is not counted as caught. An acceptance on one stage of a chain does not accept the chain: the cell is judged by the other stages. Only for a caller with analytics:risk:read: without it the pair is left out, as from the Defense Score (no cell, no host that only such pairs put on the matrix, riskAccepted counts 0, state=risk_accepted lists no host).

"Caught" is protected plus detected. A multi-stage attack chain is one cell per host (protected if any stage of its latest run is). A cyber-hygiene bundle is one row whose cells carry a ratio and no verdict: compliant of evaluated controls by their latest results, plus notAssessed (controls that never had a conclusive result) and accepted (controls a risk acceptance covers). An attack cell also lists earlier: the pair's conclusive results on the days (UTC) before the run shown, the latest of each day, newest first, at most six.

rows=tests

{
"rows": "tests",
"windowLabel": "30d",
"hosts": [
{ "key": "org_1|HOST-02", "hostname": "HOST-02", "org": "org_1",
"counts": { "protected": 0, "detected": 1, "unprotected": 0, "noVerdict": 0, "riskAccepted": 0, "neverRun": 0 },
"ratio": { "compliant": 31, "evaluated": 48, "notAssessed": 2, "accepted": 0 } }
],
"hostCount": 1,
"tests": [
{ "key": "7659eeba-…", "testUuid": "7659eeba-…", "name": "Chain A", "kind": "chain", "category": "intel-driven",
"counts": { "protected": 0, "detected": 1, "unprotected": 0, "noVerdict": 0, "riskAccepted": 0, "neverRun": 0 },
"cells": [ { "i": 0, "verdict": "detected", "at": "2026-11-20T09:00:00.000Z", "earlier": ["unprotected"] } ] },
{ "key": "b0c1…", "testUuid": "b0c1…", "name": "Baseline", "kind": "controls", "category": "cyber-hygiene",
"counts": { "protected": 0, "detected": 0, "unprotected": 0, "noVerdict": 0, "riskAccepted": 0, "neverRun": 0 },
"ratio": { "compliant": 31, "evaluated": 48, "notAssessed": 2, "accepted": 0 },
"cells": [ { "i": 0, "ratio": { "compliant": 31, "evaluated": 48, "notAssessed": 2, "accepted": 0 }, "at": "2026-11-20T09:00:00.000Z" } ] }
],
"testCount": 2,
"cellsIncluded": true,
"truncated": false
}
  • hosts is every host with a result in the window, most exposed first (most unprotected cells, then most non-compliant controls, then the name). The order is the same for every row, and a cell's i is an index into it. A host is an organization plus a hostname (key), so one hostname in two organizations is two hosts. An enrolled machine with no result in the window is not listed.
  • tests lists attack tests first, the ones with the most unprotected hosts first, then cyber-hygiene bundles, lowest compliant share first. kind is test, chain (multi-stage) or controls (cyber-hygiene bundle). counts are the row's cells by state; neverRun is the number of listed hosts with no cell for the test.
  • Above 150 hosts the cells are left out, and with them the axis they index: cellsIncluded is false, every cells is null and hosts is empty, while hostCount, counts and ratio stay complete. Use rows=hosts to page through the hosts and cells of a large fleet.
  • At most 500 tests are listed; truncated is true and testCount gives the total when there are more.

rows=hosts returns tests (the same test objects, without cells), testCount, one page of hosts (each with cells whose i is an index into tests), hostCount (hosts matching the request, over all pages), page, pageSize and truncated. Hosts come in the same order as in rows=tests, with the same counts, whatever test and state say. With test and state it is the host list of one segment of a test's bar. At most 500 tests are listed here too.

A pair's runs come from /executions/paginated with testUuid=<testUuid>&hostnames=<hostname>&grouped=true (add org=<org> from the host when the caller has no organization of its own).

Where the matrix shows one cell and the score counts more. Both come from one test having two kinds of result on one host:

  • A multi-stage test with stage results, and a result of the same test that carries no bundle id (a run that reported one whole-test code and no stages). The score counts two pairs; the matrix shows one cell, the latest conclusive result of the two. The cell can read protected while the score still counts the older unprotected chain run.
  • A cyber-hygiene bundle with control results, and a whole-run result of the same bundle on that host. The score counts the whole-run result as one more pair; the matrix shows the controls' ratio only.

Everywhere else the cells add up to the any-stage, latest-result Defense Score of the same filters: protected + detected cells plus compliant controls are its protected pairs.

Score Movement​

GET /api/analytics/score-movement

What became of the failures in the selected range, and how new attack tests did on their first run. A failure is a test on an endpoint whose result the Defense Score counts as unprotected. The unit is one test on one endpoint: a multi-stage test and a run of the same test that ended before any stage count as one item. A cyber-hygiene control on an endpoint is its own item. It takes the same parameters as /defense-score (from, to, org and the shared filter parameters). basis, scoringMode and the outcome filters are ignored: it always reads the latest result per item, any-stage, with the same window cap of 365 days. An invalid range is a 400 Invalid date range. The answer is kept for 30 seconds per set of parameters, so repeated calls inside that time return the same numbers. Each user may call it 30 times a minute (429 after that); the Dashboard calls it once per load. Not available on backend-serverless (scoreMovement: false in /api/capabilities).

A failure is in play when it was failing at the start of the range (and in the score then), was an older failure that was re-tested in the range, or failed at some point in the range. Each one has an origin, decided at its first failing moment, and an outcome, from its latest result at the end of the range.

originMeaning
open_at_startIts result before the range was failing and was in the score at the start.
older_retestedIts result before the range was failing but older than the score window at the start; it was re-tested in the range.
regressionA protected result came before its first failing result in the range.
new_testIts first-ever result is failing, in the range, and the test is new (an attack test the organization had no result of in the 365 days before the range).
first_on_endpointIts first-ever result is failing, in the range, and it is not a new_test: a known test on a new endpoint, or any cyber-hygiene control.
Outcome (list)Meaning
fixedThe latest result is protected.
stillFailingThe latest result is failing, and the unbroken run of failing results ending with it has two or more results: it was re-tested and still gets through.
notRetestedThe latest result is failing, in the range, and it is the only result of that failing run.
leftUntestedNo result in the range: it left the score without being re-run. Only open_at_start failures can be here.
{
"window": { "from": "2026-10-27T00:00:00.000Z", "to": "2026-11-26T00:00:00.000Z", "label": "30d" },
"pairs": { "start": 120, "end": 132 },
"failing": { "start": 17, "end": 12 },
"scoreDifference": { "fixedButCounted": 1, "countedTwice": 0 },
"failures": {
"total": 24, "fixed": 12, "stillFailing": 4, "notRetested": 7, "leftUntested": 1, "fixRate": 50,
"origins": { "openAtStart": 17, "olderRetested": 1, "regression": 2, "newTest": 3, "firstOnEndpoint": 1 }
},
"newTests": { "tests": 3, "pairs": 15, "stopped": 12, "gotThrough": 3, "rate": 80, "gotThroughFixed": 1, "gotThroughOpen": 2 },
"regressed": { "total": 2, "fixed": 1 },
"firstOnEndpoint": { "pairs": 4, "stopped": 3 },
"riskAccepted": null,
"lists": {
"fixed": { "total": 12, "rows": [
{ "testUuid": "7659eeba-…", "testName": "Chain A", "hostname": "HOST-02", "origin": "open_at_start",
"failingSince": null, "openBeforePeriod": true, "fixedAt": "2026-11-14T09:00:00.000Z", "lastResultAt": "2026-11-14T09:00:00.000Z" } ] },
"stillFailing": { "total": 4, "rows": [] },
"notRetested": { "total": 7, "rows": [] },
"leftUntested": { "total": 1, "rows": [] },
"newStopped": { "total": 12, "rows": [] },
"newGotThrough": { "total": 3, "rows": [] }
}
}
FieldDescription
windowThe range as resolved (from, to, label).
pairsScore pairs in the Defense Score at the start and at the end of the range: the score's own counts, not merged per test and endpoint.
failingUnprotected score pairs in the Defense Score at the start and at the end of the range: the score's own counts, not merged per test and endpoint.
scoreDifferenceThe two reasons failing.end can exceed the open failures below: fixedButCounted (fixed items whose older chain failure the score still counts) and countedTwice (open items the score counts as two pairs).
failurestotal failures in play, split by outcome (fixed, stillFailing, notRetested, leftUntested; they add up to total), fixRate (fixed divided by total as a percentage with two decimals, null when there are none) and origins, the count per origin.
newTestsThe first result in the range of every item of a new attack test (cyber-hygiene is left out): tests and pairs counted, stopped and gotThrough on the first run, rate (stopped divided by pairs as a percentage with two decimals, null when none), and of those that got through, how many are fixed since (gotThroughFixed) and how many are still open (gotThroughOpen).
regressedItems with origin regression, and how many of them are fixed since.
firstOnEndpointItems with no earlier result that are not new-test items: pairs, and how many were stopped on their first run.
riskAcceptedOpen failures that a risk acceptance removes entirely; null when no risk acceptance applies.
listsThe items behind each figure: fixed, stillFailing, notRetested, leftUntested, and the first-run lists newStopped and newGotThrough. Each is { total, rows } with at most 200 rows; total is the full count.

The figures reconcile with the Defense Score: failing.end = stillFailing + notRetested + scoreDifference.fixedButCounted + scoreDifference.countedTwice.

A list row has testUuid, testName (the bundle name for a bundle), controlId (cyber-hygiene controls), hostname, origin (not on newStopped rows), failingSince (when the failing run began; null when it began before the range, with openBeforePeriod: true), fixedAt (the first protected result after the failing run; present on every row whose failure was fixed, also on a first-run row of an item fixed later) and lastResultAt.

A few properties to keep in mind. An item that flaps (fails, passes, fails) counts once, by where it ended. For standalone tests and controls the range is read as the first and last result per UTC day, so a result in the middle of a day is not seen; chain runs are all read. "First run" is per item, so when a new test runs on 3 endpoints and then on 40 more, the 40 later first runs count too. A test with no result in the 365 days before the range reads as new.

Test Results​

GET /api/analytics/test-results

Accepts the shared filter parameters, except that the date range, basis and scoringMode are fixed. For each test (or bundle) it takes the latest result on each host over the last 90 days and scores it like the Defense Score tile in any-stage mode (blocked or detected counts as protected). Returns an array of { testUuid, pairCount, protectedCount, hostCount, lastRunAt }. pairCount is the number of test x host pairs, protectedCount how many of them are protected, and hostCount the distinct hosts. Cyber-hygiene control results are folded into their bundle's testUuid. It feeds the Fleet result column of the test library.

Test Results by Stage​

GET /api/analytics/test-results/:uuid/stages

One test's fleet results, for the test detail page. :uuid is the test (or bundle) UUID; a malformed one returns 400. Accepts the shared filter parameters with the same fixed window as test-results: the latest result on each host over the last 90 days. Returns:

{
"headline": { "hostCount": 12, "pairCount": 12, "stoppedCount": 10, "lastRunAt": "2026-11-03T09:00:00.000Z" },
"stages": [
{ "controlId": "T1055", "validator": "Stage 1", "description": "…",
"blocked": 9, "detected": 2, "through": 1, "hosts": 12, "lastRunAt": "2026-11-03T09:00:00.000Z" }
],
"stoppedBeforeStage": 2
}
  • headline is scored like test-results and the Defense Score tile in any-stage mode: hostCount is the distinct hosts, pairCount the test x host pairs, stoppedCount how many of those pairs are protected (blocked or detected), and lastRunAt the newest result (null with no results). A multi-stage chain or standalone test has one pair per host, so pairCount equals hostCount; a cyber-hygiene bundle has one pair per control on each host, so compare stoppedCount with pairCount, not hostCount. Runs where an EDR killed the agent or blocked the test at launch count as protected here.
  • stages has one entry per control or stage ID (f0rtika.control_id; intel-driven chains use the stage's technique), scored like technique-outcomes: each host's latest result for that stage is blocked (is_protected), detected (an EDR detected it but did not block it) or through (neither). Runs with no stages (EDR-killed agent, launch block) are left out, as in the technique views. validator and description come from the newest control document and are omitted when empty. A standalone single-binary test has no stages ([]).
  • stoppedBeforeStage is the number of hosts whose latest result is such a stageless run, so they appear in the headline but in no stage.

Execution Activity​

GET /api/analytics/execution-activity?days=14

Takes the organization and days (1 to 90, default 14); it does not use the shared filters. Returns days[] (daily protected, got-through and inconclusive counts of test runs, one entry per UTC day, zero-filled), lastExecutionAt (all time), executions7d (test runs; the name predates the change), protectedPct7d (protected runs out of conclusive runs) and endpointsTested7d. A run is one standalone result or one bundle run. A multi-stage run is protected when any stage was blocked or detected, got through when stages ran without either, and inconclusive with no conclusive stage; a cyber-hygiene bundle run is protected only when every conclusive control passed. It feeds the testing cadence card.

The answer is kept for 30 seconds per organization and days, so repeated calls inside that time return the same numbers. Bundle runs are read up to a limit of 200,000 in the window; past it the response has truncated: true and the daily counts are a lower bound.

Only real test results are counted: upload confirmations (exit 200) and Skipped bundle stages (exit 0 on a bundle-control document) are left out everywhere, including lastExecutionAt. Protected means conclusive and blocked or detected; got through means conclusive and not protected; anything else is inconclusive. The *7d numbers cover the last 7 UTC days including today, the same days as the last seven bars.

Executions Activity​

GET /api/analytics/executions/activity

Test runs per time bucket over the filter window, for the strip above All Executions. Each user may call it 30 times a minute (429 after that); the same parameters asked again within 5 seconds get the same answer. Not available on backend-serverless (activityStrip capability).

ParameterTypeDescription
shared filtersThe shared filter parameters, except the outcome filters: result, errorNames and errorCodes are ignored, as by the coverage matrix. The response already splits each bucket by outcome. basis and scoringMode are ignored.
tzstringThe IANA time zone the buckets are cut in, for example America/Santo_Domingo. Default UTC. 400 Invalid tz for a zone the server does not know.
{
"interval": "day",
"timeZone": "America/Santo_Domingo",
"buckets": [
{ "from": "2026-11-10T04:00:00.000Z", "to": "2026-11-11T03:59:59.999Z", "protected": 3, "unprotected": 2, "noVerdict": 1 },
{ "from": "2026-11-11T04:00:00.000Z", "to": "2026-11-12T03:59:59.999Z", "protected": 0, "unprotected": 0, "noVerdict": 0 }
]
}
  • interval follows the window's length: hour up to 48 hours, day up to 62 days, week (starting Monday) beyond. A window longer than 365 days is cut to its last 365 days and the response carries capped: true.
  • buckets are oldest first and zero-filled. A bucket is the time during which the zone's clock shows the same hour, day or week, so a day is 23 or 25 hours when the clocks change. Every bucket is whole: the first starts at or before the window and the last ends at or after it, and each is counted in full. That keeps a bucket's two instants the same from one request to the next when the window is relative (from=now-30d), so they can be stored and compared.
  • from and to are both inclusive, so they can be passed as they are to /executions/paginated or the coverage matrix to read that stretch of time (with the same other filters and no outcome filter). Those two endpoints can return a little more than the bucket counted: they also list upload confirmations and runs whose every stage was Skipped, which this endpoint leaves out as it counts test runs only, and the grouped list shows two results of one test on one host in the same millisecond as one row.
  • What is counted: the same runs, by the same rules, as Execution Activity: a standalone result is one run, a bundle run is one run with its chain-level verdict, a cyber-hygiene run is protected only when every control passed; upload confirmations and Skipped stages are left out. noVerdict is that endpoint's inconclusive. Results under a risk acceptance are counted, by their verdict.
  • truncated: true means the limit of 200,000 bundle runs in the window was reached and the counts are a lower bound.
  • With no from, the window is the 7 days before to (before now when there is no to either). A from or to that is not one readable date is a 400 Invalid date range.

The answer is not cached.

Counts and Catalogs​

GET /api/analytics/unique-hostnames — distinct host count
GET /api/analytics/unique-tests — distinct test count (a bundle counts once, not once per stage)
GET /api/analytics/canonical-test-count — count of canonical (deduped) tests: standalone test names plus bundle names (`days`, default 90)
GET /api/analytics/organizations — known organizations
GET /api/analytics/available-tests — all tests with any execution
GET /api/analytics/executed-test-uuids — every test UUID that has been executed
GET /api/analytics/available-techniques — MITRE techniques with any data
GET /api/analytics/available-hostnames — hostnames seen in results
GET /api/analytics/available-categories
GET /api/analytics/available-severities
GET /api/analytics/available-threat-actors
GET /api/analytics/available-tags
GET /api/analytics/available-error-names
GET /api/analytics/available-error-codes
GET /api/analytics/available-bundle-names

These power the filter dropdowns in the UI. They accept the shared filter parameters but most ignore date filters by default so the dropdowns stay populated.

GET /api/analytics/filter-options returns all ten dropdown lists from one Elasticsearch query, which is what the Analytics page uses:

{
"tests": ["…"], "techniques": ["T1059"],
"hostnames": [{ "value": "host-1", "label": "host-1", "count": 8 }],
"categories": [], "severities": [], "threatActors": [], "tags": [],
"errorNames": [], "errorCodes": [], "bundleNames": []
}

Each list is the same as the matching available-* endpoint. Optional org, from and to scope the same eight lists those endpoints scope (everything except tests and techniques); with none, no date or org filter applies.

Archive Operations​

POST /api/analytics/executions/archive — archive by group keys
POST /api/analytics/executions/archive-by-date — archive everything before a date

Require analytics:executions:archive permission. Bodies: { "groupKeys": ["bundle::...", "standalone::..."] } (1 to 500 keys, as returned by the grouped executions list) and { "before": "<ISO date>" }. Both return { "success": true, "archived": n, "errors": [...] }. A caller in an organization archives only its own organization's results. See the Programmatic Access guide for the response envelope and idempotency notes.

Index Management​

GET /api/analytics/indices — list Achilles indices
POST /api/analytics/index/create — create a new index (requires analytics:index:create)

/indices takes an optional pattern (default achilles-results-*). It must name Achilles indices (achilles-* or archived-achilles*), else 400. /index/create takes { "index_name": "achilles-results-engagement1" } (lowercase letters, digits and hyphens).

Configure Elasticsearch​

GET /api/analytics/settings — fetch current settings (masked)
POST /api/analytics/settings — save settings (requires analytics:settings:write)
POST /api/analytics/settings/test — test a candidate configuration (requires analytics:settings:write)
  • The settings response masks cloudId and caCert and never returns the API key or password. It also has writeIndexPrefix (default achilles-results-) and writeIndexRollover (none, daily or monthly; default none).
  • The Elasticsearch connection is shared by the whole install. Saving settings and creating an index return 403 for a caller signed in to an organization.
  • Saved credentials are reused only when a save or test targets the saved cluster (same connection type, Cloud ID or node URL). For any other target, send the credentials in the request.

Stored encrypted at rest (AES-256-GCM) in ~/.projectachilles/analytics.json on filesystem deployments, or in Vercel Blob on serverless.

See also​