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”One side of a date range: an RFC 3339 timestamp in any UTC offset, used as given, or a bare YYYY-MM-DD naming a whole UTC day.
Inclusive start of the window. A bare YYYY-MM-DD starts it at
00:00:00Z of that day; an RFC 3339 timestamp in any UTC offset is used
as given. Defaults to the start of the day 90 days before today, in
end_date’s offset (UTC when neither bound is given).
Example
2026-01-01One side of a date range: an RFC 3339 timestamp in any UTC offset, used as given, or a bare YYYY-MM-DD naming a whole UTC day.
Inclusive end of the window. A bare YYYY-MM-DD ends it at
23:59:59.999999Z of that day; an RFC 3339 timestamp in any UTC offset is
used as given. Defaults to the end of today, in start_date’s offset
(UTC when neither bound is given).
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.
Where the evaluated risks stand against their deadlines at the window’s
end. Sums to total_risks_evaluated; all zero when nothing is evaluable.
object
Past the deadline at High urgency or above.
Past the deadline at Medium, Low or Info urgency.
Measured end on or before the deadline.
One entry per sampled boundary, oldest→newest, always the full 2–13
points for the period so index i sits at the same instant whatever
the population. A boundary with nothing evaluable is null, not a
fabricated 0% — chart it as a gap. When any entry is present, the last
one equals the headline (average_performance_percentage,
total_risks_evaluated, bands).
One sampled boundary of the SLA series: the mean consumption at that instant together with the population it averages over.
object
The evaluated risks split by standing against their deadline.
object
Past the deadline at High urgency or above.
Past the deadline at Medium, Low or Info urgency.
Measured end on or before the deadline.
Risks evaluable at this boundary — discovered by then, scored, with an
SLA configured. The denominator for bands. Always > 0: a boundary with
nothing to evaluate is a null entry in the series instead.
Mean SLA-window consumption as of this boundary, same definition as
average_performance_percentage (≥0, not capped at 100).
average_performance_percentage minus the same measure over the
immediately preceding window of the same length — the same number of
calendar days, ending the day before this window starts — in
percentage points. Negative means consumption fell, which is an
improvement. Each side is a snapshot of the backlog
evaluable in its own window, so composition — risks discovered or
closed between the two — moves the figure as well as remediation pace;
buckets carry each boundary’s evaluated count for readers who need to
separate the two. None when either window had nothing to evaluate — a
difference against an unmeasured baseline is not a movement.
Longest SLA window among the evaluated risks, in days. A range shorter
than this has not given its newest arrivals time to reach their
deadline, so it is structurally biased toward reading compliant; a
client compares this against its range to say so. None when nothing
is 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.
Superseded by buckets, which keeps every boundary so the points stay
aligned to the window.
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. The denominator for bands.
Examplegenerated
{ "byUrgency": [ 1 ], "closedCount": 1, "openCount": 1, "orgId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "periodDays": 1, "sla": { "averagePerformancePercentage": 1, "bands": { "pastDueCriticalOrHigh": 1, "pastDueMediumOrBelow": 1, "withinSla": 1 }, "buckets": [ { "bands": { "pastDueCriticalOrHigh": 1, "pastDueMediumOrBelow": 1, "withinSla": 1 }, "evaluated": 1, "percentage": 1 } ], "deltaPoints": 1, "longestSlaDays": 1, "performanceSeries": [ 1 ], "totalRisksEvaluated": 1 }}Organization not found