---
title: "diff a baseline set of expectations against another"
method: PUT
path: "/mockserver/baseline/compare"
tags: ["troubleshooting"]
---

# diff a baseline set of expectations against another

`PUT /mockserver/baseline/compare`

## Request

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

Compares a "baseline" array of expectations against a "current" array and returns a structured diff of what was added, removed and changed. When "current" is omitted the baseline is diffed against the instance's live active expectations, which makes this usable as a drift check against a committed baseline.

## Request body

- object
  - `baseline` Expectation[], required (unresolved $ref)
  - `current` Expectation[]: optional; when omitted the live active expectations are used (unresolved $ref)

## Response `200`

baseline diff report returned

- object: baseline diff report (added, removed and changed expectations)

## Other responses

- `400`: missing body, or the body did not contain a "baseline" array

---

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