Skip to content

Get aggregated risk metrics for an organization.

GET
/v1/organizations/{id}/risk-metrics
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.

id
required
string format: uuid

The UUID of the organization

Example
123e4567-e89b-12d3-a456-426614174000
start_date
One of:

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.

string

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-01
end_date
One of:

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.

string

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-31
urgency
Array | null

Urgency 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.

Aggregated risk metrics for the organization

Media typeapplication/json

Organization risk metrics for dashboard and portfolio summaries.

object
byUrgency
required

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.

Array<integer>
closedCount
required

Risks closed within the window (by closed_date), regardless of when they were discovered.

integer format: int64
openCount
required

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.

integer format: int64
orgId
required

Organization the metrics are scoped to.

string format: uuid
periodDays
required

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.

integer format: int32
sla
required

SLA remediation performance over the window.

object
averagePerformancePercentage
required

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.

integer format: int32
bands
required

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
pastDueCriticalOrHigh
required

Past the deadline at High urgency or above.

integer format: int32
pastDueMediumOrBelow
required

Past the deadline at Medium, Low or Info urgency.

integer format: int32
withinSla
required

Measured end on or before the deadline.

integer format: int32
buckets
required

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).

Array
One of:

One sampled boundary of the SLA series: the mean consumption at that instant together with the population it averages over.

object
bands
required

The evaluated risks split by standing against their deadline.

object
pastDueCriticalOrHigh
required

Past the deadline at High urgency or above.

integer format: int32
pastDueMediumOrBelow
required

Past the deadline at Medium, Low or Info urgency.

integer format: int32
withinSla
required

Measured end on or before the deadline.

integer format: int32
evaluated
required

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.

integer format: int32
percentage
required

Mean SLA-window consumption as of this boundary, same definition as average_performance_percentage (≥0, not capped at 100).

integer format: int32
deltaPoints

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.

integer | null format: int32
longestSlaDays

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.

integer | null format: int32
performanceSeries
required

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.

Array<integer>
totalRisksEvaluated
required

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.

integer format: int32
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