---
title: "verify a service-level objective over a window"
method: PUT
path: "/mockserver/verifySLO"
tags: ["slo"]
---

# verify a service-level objective over a window

`PUT /mockserver/verifySLO`

## Request

- Base URL: `http://localhost:1080`
- URL: `http://localhost:1080/mockserver/verifySLO`
- Auth: none declared

Evaluates a named set of objectives (latency percentiles, error rate) over a time window against the recorded forward-path SLI samples and returns a PASS / FAIL / INCONCLUSIVE verdict. The HTTP status encodes the verdict so a CI or chaos gate can assert on the status code alone: 200 when the verdict is PASS or INCONCLUSIVE, 406 when it is FAIL. A criteria PASSes only when all objectives hold (logical AND); it is INCONCLUSIVE when an indicator cannot be computed or the window holds fewer than minimumSampleCount samples. Off by default — returns 400 until sloTrackingEnabled=true.

## Request body

- SloCriteria: a named set of service-level objectives over a time window
  - `name` string: human-readable criteria name, echoed back in the verdict
  - `window` object: the time window to evaluate over
    - `type` 'LOOKBACK' | 'EXPLICIT'
    - `lookbackMillis` integer: LOOKBACK: window length ending now (uses the controllable clock)
    - `fromEpochMillis` integer: EXPLICIT: window start in epoch milliseconds
    - `toEpochMillis` integer: EXPLICIT: window end in epoch milliseconds
  - `minimumSampleCount` integer: minimum samples required in the window; below this the verdict is INCONCLUSIVE
  - `upstreamHosts` string[]: optional list of upstream hosts to restrict the evaluation to
  - `objectives` SloObjective[], required
    - `sli` 'LATENCY_P50' | 'LATENCY_P95' | 'LATENCY_P99' | 'ERROR_RATE', required: the service-level indicator to evaluate
    - `comparator` 'LESS_THAN' | 'LESS_THAN_OR_EQUAL' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUAL', required: how the observed value is compared to the threshold
    - `threshold` number, required: the objective threshold (milliseconds for latency SLIs, a 0.0-1.0 fraction for ERROR_RATE)
    - `scope` 'FORWARD' | 'INBOUND': which recorded traffic to evaluate; v1 records only FORWARD (proxied/forwarded upstream) samples

## Response `200`

verdict is PASS or INCONCLUSIVE

- SloVerdict: the overall verdict of an SLO evaluation (the AND of all objective results)
  - `name` string
  - `result` 'PASS' | 'FAIL' | 'INCONCLUSIVE'
  - `windowFromEpochMillis` integer
  - `windowToEpochMillis` integer
  - `sampleCount` integer
  - `objectiveResults` SloObjectiveResult[]
    - `sli` string
    - `comparator` string
    - `threshold` number
    - `observedValue` number, nullable
    - `result` 'PASS' | 'FAIL' | 'INCONCLUSIVE'
    - `detail` string, nullable: human-readable explanation of the objective result (e.g. sample count, observed vs threshold)

## Other responses

- `400`: malformed criteria
- `403`: SLO tracking is disabled (sloTrackingEnabled=false)
- `406`: verdict is FAIL (one or more objectives did not hold)

---

[API](https://skmtc.dev/mock-server/apis/mockserver-api.md) · [All operations](https://skmtc.dev/mock-server/apis/mockserver-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mock-server/apis/mockserver-api/revisions/9239b693996e?raw)
