Get aggregated risk metrics for an organization.
const url = 'https://api.adversarial.com/api/v1/organizations/123e4567-e89b-12d3-a456-426614174000/risk-metrics?start_date=2026-01-01&end_date=2026-12-31';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.adversarial.com/api/v1/organizations/123e4567-e89b-12d3-a456-426614174000/risk-metrics?start_date=2026-01-01&end_date=2026-12-31'Summarizes the organization’s risks over a recent time window: open and closed counts, a breakdown by urgency, and SLA remediation performance.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The UUID of the organization
Example
123e4567-e89b-12d3-a456-426614174000Query Parameters
Section titled “Query Parameters”Inclusive lower bound on the window. RFC 3339 timestamp or bare
YYYY-MM-DD; either way the window starts at 00:00:00Z of the UTC day
it falls on. Defaults to 90 days before today.
Example
2026-01-01Inclusive upper bound on the window. RFC 3339 timestamp or bare
YYYY-MM-DD; either way the window ends at 23:59:59.999999Z of the UTC
day it falls on. Defaults to end-of-day today.
Example
2026-12-31Urgency bands to include. Repeat the parameter to include several, e.g.
?urgency=Critical&urgency=High. Accepts the urgency levels plus the
literal null for risks that have not been scored. Omit to include
every band.
Responses
Section titled “Responses”Aggregated risk metrics for the organization
Organization risk metrics for dashboard and portfolio summaries.
object
Risks DISCOVERED in the window, bucketed by final urgency
(likelihood × impact). Fixed order [Critical, High, Medium, Low, Info, Unscored]; index 5 holds risks missing a likelihood or impact score.
Risks closed within the window (by closed_date), regardless of when
they were discovered.
Risks DISCOVERED within the window, whether or not they have since
closed — scoped to the window like closed_count. Equals the sum of
by_urgency.
Organization the metrics are scoped to.
Span of the requested [start_date, end_date] window in whole days,
measured over each risk’s discovered date. Echoed back so the client can
confirm the bounds it was served.
SLA remediation performance over the window.
object
Mean SLA-window consumption across evaluated risks, as a percentage (elapsed ÷ SLA window, averaged, rounded). Clamped to ≥0, NOT capped at 100 (over 100 = past deadline); 0 when no risks are evaluable.
The percentage sampled across the look-back, oldest→newest, starting at
the first boundary with an evaluable population — earlier boundaries are
omitted rather than reported as a fabricated 0%. Up to 2–13 points by
period; empty when no risks are evaluable. When non-empty, the final
point equals average_performance_percentage.
Number of risks contributing to the percentage: scored, with an SLA configured, and either closed inside the window or still open at its end — whenever they were discovered.
Examplegenerated
{ "byUrgency": [ 1 ], "closedCount": 1, "openCount": 1, "orgId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "periodDays": 1, "sla": { "averagePerformancePercentage": 1, "performanceSeries": [ 1 ], "totalRisksEvaluated": 1 }}Organization not found