SOFTWARE TESTING GUIDE

Detecting API response changes

A practical workflow for comparing saved API response envelopes. Capture responses from two deployments, compare status, headers and body, and decide what needs review.

What the tool compares

The API response comparison tool accepts two JSON objects, each with:

It compares status numerically, header names case-insensitively, and the body structurally. It does not call either API.

Worked example

Baseline response from version 1.0.0:

{
  "status": 200,
  "headers": {
    "content-type": "application/json",
    "date": "Mon, 01 Jun 2026 10:00:00 GMT"
  },
  "body": {
    "id": 42,
    "name": "Ada",
    "active": true
  }
}

Candidate response from version 1.1.0:

{
  "status": 200,
  "headers": {
    "Content-Type": "application/json",
    "date": "Mon, 01 Jun 2026 10:01:00 GMT"
  },
  "body": {
    "id": 42,
    "name": "Ada Lovelace",
    "active": true,
    "plan": "pro"
  }
}

The tool reports:

If you add the ignore path /headers/date, the timestamp change is also excluded.

What to ignore

Some fields change on every request even when the API contract is stable. Common examples:

Ignore paths use JSON Pointer syntax and exclude the matched path and its descendants. Add one path per line.

What the tool cannot decide

Use the diff as a starting point for human review, consumer tests and contract checks.

Try it

Open the API response comparison tool and click “Load example” to see the same comparison. For plain JSON objects without the status/header envelope, use the JSON diff tool.

Limitations

Back to software testing guides